This commit is contained in:
luboslenco
2023-02-23 13:59:23 +01:00
parent 8a65305776
commit d27f4718e5
4 changed files with 7 additions and 7 deletions
-1
View File
@@ -2,7 +2,6 @@ package arm.ui;
import kha.input.KeyCode;
import zui.Zui;
import zui.Id;
import arm.sys.Path;
import arm.io.ImportAsset;
import arm.Enums;
+5 -3
View File
@@ -28,7 +28,8 @@ class TabSwatches {
@:access(zui.Zui)
public static function draw() {
var ui = UISidebar.inst.ui;
if (ui.tab(UIStatus.inst.statustab, tr("Swatches"))) {
var statush = Config.raw.layout[LayoutStatusH];
if (ui.tab(UIStatus.inst.statustab, tr("Swatches")) && statush > UIStatus.defaultStatusH * ui.SCALE()) {
ui.beginSticky();
if (Config.raw.touch_ui) {
@@ -75,9 +76,8 @@ class TabSwatches {
ui.endSticky();
ui.separator(3, false);
var statusw = kha.System.windowWidth();
var slotw = Std.int(26 * ui.SCALE());
var num = Std.int(statusw / (slotw + 3));
var num = Std.int(ui._w / (slotw + 3));
var dragPositionSet = false;
var uix = 0.0;
@@ -130,6 +130,7 @@ class TabSwatches {
ui.changed = false;
var h = Id.handle();
h.color = Context.swatch.base;
Context.swatch.base = zui.Ext.colorWheel(ui, h, false, null, 11 * ui.t.ELEMENT_H * ui.SCALE(), true, function () {
Context.colorPickerPreviousTool = Context.tool;
Context.selectTool(ToolPicker);
@@ -152,6 +153,7 @@ class TabSwatches {
var hheight = Id.handle();
hheight.value = Context.swatch.height;
Context.swatch.height = ui.slider(hheight, "Height", 0, 1, true);
if (ui.changed || ui.isTyping) UIMenu.keepOpen = true;
if (ui.inputReleased) Context.setSwatch(Context.swatch); // Trigger material preview update
}, 16, Std.int(Input.getMouse().x - 200 * ui.SCALE()), Std.int(Input.getMouse().y - 250 * ui.SCALE()));
+1 -2
View File
@@ -76,9 +76,8 @@ class TabSwatches {
ui.endSticky();
ui.separator(3, false);
var statusw = kha.System.windowWidth() - UIToolbar.inst.toolbarw - Config.raw.layout[LayoutSidebarW];
var slotw = Std.int(26 * ui.SCALE());
var num = Std.int(statusw / (slotw + 3));
var num = Std.int(ui._w / (slotw + 3));
var dragPositionSet = false;
var uix = 0.0;
+1 -1
View File
@@ -291,7 +291,7 @@ class RenderPathBase {
#if rp_voxels
public static function drawVoxels() {
if (Config.raw.rp_gi != false) {
var voxelize = path.voxelize() && Context.ddirty > 0 && taaFrame > 0;
var voxelize = Context.ddirty > 0 && taaFrame > 0;
if (voxelize) {
path.clearImage("voxels", 0x00000000);
path.setTarget("");