Show checker for transparent layer
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 46 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 129 KiB After Width: | Height: | Size: 130 KiB |
@@ -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) {
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user