diff --git a/Assets/common/icons.png b/Assets/common/icons.png index 0a5edfd3..32589a41 100644 Binary files a/Assets/common/icons.png and b/Assets/common/icons.png differ diff --git a/Assets/common/icons2x.png b/Assets/common/icons2x.png index 9c31763e..147a039c 100644 Binary files a/Assets/common/icons2x.png and b/Assets/common/icons2x.png differ diff --git a/Sources/arm/Context.hx b/Sources/arm/Context.hx index 19b85c55..c5c66de2 100644 --- a/Sources/arm/Context.hx +++ b/Sources/arm/Context.hx @@ -10,6 +10,7 @@ import arm.util.RenderUtil; import arm.util.ParticleUtil; import arm.ui.UITrait; import arm.ui.UINodes; +import arm.ui.UIView2D; import arm.node.MaterialParser; import arm.Tool; import arm.Project; @@ -90,6 +91,7 @@ class Context { if (current != null) current.begin(false); UITrait.inst.hwnd.redraws = 2; + UIView2D.inst.hwnd.redraws = 2; } public static function selectTool(i: Int) { diff --git a/Sources/arm/data/LayerSlot.hx b/Sources/arm/data/LayerSlot.hx index d21d0d32..31560ae3 100644 --- a/Sources/arm/data/LayerSlot.hx +++ b/Sources/arm/data/LayerSlot.hx @@ -248,7 +248,7 @@ class LayerSlot { l.texpaint_pack.g2.pipeline = null; l.texpaint_pack.g2.end(); - l.texpaint_preview.g2.begin(true, 0xff000000); + l.texpaint_preview.g2.begin(true, 0x00000000); l.texpaint_preview.g2.drawScaledImage(texpaint_preview, 0, 0, texpaint_preview.width, texpaint_preview.height); l.texpaint_preview.g2.end(); @@ -260,7 +260,7 @@ class LayerSlot { l.texpaint_mask.g2.pipeline = null; l.texpaint_mask.g2.end(); - l.texpaint_mask_preview.g2.begin(true, 0xff000000); + l.texpaint_mask_preview.g2.begin(true, 0x00000000); l.texpaint_mask_preview.g2.drawScaledImage(texpaint_mask_preview, 0, 0, texpaint_mask_preview.width, texpaint_mask_preview.height); l.texpaint_mask_preview.g2.end(); } diff --git a/Sources/arm/ui/TabLayers.hx b/Sources/arm/ui/TabLayers.hx index ee67f5ce..af32e023 100644 --- a/Sources/arm/ui/TabLayers.hx +++ b/Sources/arm/ui/TabLayers.hx @@ -134,10 +134,18 @@ class TabLayers { if (l.getChildren() == null) { var icon = l.material_mask == null ? l.texpaint_preview : l.material_mask.imageIcon; + if (l.material_mask == null) { + var r = Res.tile50(icons, 4, 1); + var _x = ui._x; + var _y = ui._y; + ui.curRatio--; + ui.image(icons, 0xffffffff, null, r.x, r.y, r.w, r.h); + ui._x = _x; + ui._y = _y; + } state = ui.image(icon, 0xffffffff, iconH); } else { // Group - var icons = Res.get("icons.k"); var folder = Res.tile50(icons, 2, 1); state = ui.image(icons, ui.t.LABEL_COL - 0x00202020, iconH, folder.x, folder.y, folder.w, folder.h); } @@ -173,6 +181,14 @@ class TabLayers { ui._x += Std.int(4 * ui.SCALE()); ui._y += 3; + // var r = Res.tile50(icons, 4, 1); + // var _x = ui._x; + // var _y = ui._y; + // ui.curRatio--; + // ui.image(icons, 0xffffffff, null, r.x, r.y, r.w, r.h); + // ui._x = _x; + // ui._y = _y; + ui.g.pipeline = UIView2D.inst.pipe; #if kha_opengl ui.currentWindow.texture.g4.setPipeline(UIView2D.inst.pipe); diff --git a/Sources/arm/ui/UITrait.hx b/Sources/arm/ui/UITrait.hx index 074f9777..18e40451 100644 --- a/Sources/arm/ui/UITrait.hx +++ b/Sources/arm/ui/UITrait.hx @@ -743,7 +743,7 @@ class UITrait { var target = l.texpaint_mask_preview; var source = l.texpaint_mask; var g2 = target.g2; - g2.begin(true, 0xff000000); + g2.begin(true, 0x00000000); g2.drawScaledImage(source, 0, 0, target.width, target.height); g2.end(); } @@ -757,7 +757,7 @@ class UITrait { var target = Context.layerIsMask ? l.texpaint_mask_preview : l.texpaint_preview; var source = Context.layerIsMask ? l.texpaint_mask : l.texpaint; var g2 = target.g2; - g2.begin(true, 0xff000000); + g2.begin(true, 0x00000000); g2.drawScaledImage(source, 0, 0, target.width, target.height); g2.end(); hwnd.redraws = 2;