Cleanup
This commit is contained in:
+2
-2
@@ -335,7 +335,7 @@ class App {
|
||||
}
|
||||
}
|
||||
|
||||
if (UIFiles.show || UIBox.show) UIBox.update();
|
||||
if (UIBox.show) UIBox.update();
|
||||
|
||||
var decal = Context.tool == ToolDecal || Context.tool == ToolText;
|
||||
var isPicker = Context.tool == ToolPicker;
|
||||
@@ -373,7 +373,7 @@ class App {
|
||||
var usingMenu = false;
|
||||
if (UIMenu.show) usingMenu = mouse.y + App.y() > UITrait.inst.headerh;
|
||||
|
||||
uienabled = !UIFiles.show && !UIBox.show && !usingMenu;
|
||||
uienabled = !UIBox.show && !usingMenu;
|
||||
if (UIFiles.show) UIFiles.render(g);
|
||||
else if (UIBox.show) UIBox.render(g);
|
||||
else if (UIMenu.show) UIMenu.render(g);
|
||||
|
||||
@@ -72,7 +72,7 @@ class UIBox {
|
||||
var mx = mouse.x + iron.App.x();
|
||||
var my = mouse.y + iron.App.y();
|
||||
if (mx < left || mx > right || my < top || my > bottom) {
|
||||
UIFiles.show = UIBox.show = false;
|
||||
UIBox.show = false;
|
||||
App.redrawUI();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,8 +19,8 @@ class UIFiles {
|
||||
|
||||
// Krom with native file dialogs
|
||||
#if kha_krom
|
||||
show = false;
|
||||
if (untyped Krom.openDialog != null) {
|
||||
show = false;
|
||||
path = untyped isSave ? Krom.saveDialog(filters, "") : Krom.openDialog(filters, "");
|
||||
if (path != null) {
|
||||
if (!App.checkAscii(path)) return;
|
||||
|
||||
@@ -450,7 +450,7 @@ class UITrait {
|
||||
}
|
||||
|
||||
if (kb.started(Config.keymap.view_distract_free) ||
|
||||
(kb.started("escape") && !show && !UIFiles.show && !UIBox.show)) {
|
||||
(kb.started("escape") && !show && !UIBox.show)) {
|
||||
toggleDistractFree();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user