From 95aca1906bad7f5ef0e151cc56a5a2b3f0e1d42a Mon Sep 17 00:00:00 2001 From: Lubos Lenco Date: Mon, 12 Apr 2021 13:39:05 +0200 Subject: [PATCH] Improve icon display in browser --- Sources/arm/ui/UIFiles.hx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Sources/arm/ui/UIFiles.hx b/Sources/arm/ui/UIFiles.hx index c023e7b5..034b941b 100644 --- a/Sources/arm/ui/UIFiles.hx +++ b/Sources/arm/ui/UIFiles.hx @@ -19,7 +19,7 @@ class UIFiles { static var files: Array = null; static var iconMap: Map = null; static var selected = -1; - static var showExtensions = true; + static var showExtensions = false; static var offline = false; public static function show(filters: String, isSave: Bool, filesDone: String->Void) { @@ -156,8 +156,13 @@ class UIFiles { iron.App.notifyOnInit(function() { if (Layers.pipeCopyRGB == null) Layers.makePipeCopyRGB(); icon = kha.Image.createRenderTarget(image.width, image.height); - icon.g2.begin(false); - icon.g2.drawImage(Project.materials[0].image, 0, 0); // Used for alpha cutout + if (f.endsWith(".arm")) { // Used for material sphere alpha cutout + icon.g2.begin(false); + icon.g2.drawImage(Project.materials[0].image, 0, 0); + } + else { + icon.g2.begin(true, 0xffffffff); + } icon.g2.pipeline = Layers.pipeCopyRGB; icon.g2.drawImage(image, 0, 0); icon.g2.pipeline = null;