Update touch icons
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 41 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 72 KiB After Width: | Height: | Size: 70 KiB |
@@ -28,6 +28,13 @@ class BoxPreferences {
|
||||
|
||||
@:access(zui.Zui)
|
||||
public static function show() {
|
||||
|
||||
#if arm_touchui
|
||||
var modalH = kha.System.windowHeight() - UIHeader.inst.headerh;
|
||||
#else
|
||||
var modalH = 400;
|
||||
#end
|
||||
|
||||
UIBox.showCustom(function(ui: Zui) {
|
||||
if (ui.tab(htab, tr("Interface"), true)) {
|
||||
|
||||
@@ -568,7 +575,17 @@ plugin.drawUI = function(ui) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}, 600, 400, function() { Config.save(); });
|
||||
}, 600, modalH, function() { Config.save(); });
|
||||
|
||||
#if arm_touchui
|
||||
// Align modal to the left side
|
||||
var appw = kha.System.windowWidth();
|
||||
var apph = kha.System.windowHeight();
|
||||
var mw = @:privateAccess Std.int(UIBox.modalW * App.uiBox.SCALE());
|
||||
var mh = @:privateAccess Std.int(UIBox.modalH * App.uiBox.SCALE());
|
||||
UIBox.hwnd.dragX = Std.int(-appw / 2 + mw / 2);
|
||||
UIBox.hwnd.dragY = Std.int(-apph / 2 + mh / 2 + UIHeader.inst.headerh);
|
||||
#end
|
||||
}
|
||||
|
||||
public static function fetchThemes() {
|
||||
|
||||
@@ -39,11 +39,6 @@ class UIMenubar {
|
||||
if (iconButton(ui, 3)) Project.projectSave();
|
||||
if (iconButton(ui, 4)) Project.importAsset();
|
||||
if (iconButton(ui, 5)) BoxExport.showTextures();
|
||||
ui.enabled = History.undos > 0;
|
||||
if (iconButton(ui, 6)) History.undo();
|
||||
ui.enabled = History.redos > 0;
|
||||
if (iconButton(ui, 7)) History.redo();
|
||||
ui.enabled = true;
|
||||
if (UIMenu.show && UIMenu.menuCategory == MenuViewport) ui.fill(0, 2, 32 + 4, 32, ui.t.HIGHLIGHT_COL);
|
||||
if (iconButton(ui, 8)) showMenu(ui, MenuViewport);
|
||||
if (UIMenu.show && UIMenu.menuCategory == MenuMode) ui.fill(0, 2, 32 + 4, 32, ui.t.HIGHLIGHT_COL);
|
||||
@@ -52,6 +47,11 @@ class UIMenubar {
|
||||
if (iconButton(ui, 10)) showMenu(ui, MenuCamera);
|
||||
if (UIMenu.show && UIMenu.menuCategory == MenuHelp) ui.fill(0, 2, 32 + 4, 32, ui.t.HIGHLIGHT_COL);
|
||||
if (iconButton(ui, 11)) showMenu(ui, MenuHelp);
|
||||
ui.enabled = History.undos > 0;
|
||||
if (iconButton(ui, 6)) History.undo();
|
||||
ui.enabled = History.redos > 0;
|
||||
if (iconButton(ui, 7)) History.redo();
|
||||
ui.enabled = true;
|
||||
#else
|
||||
var categories = [tr("File"), tr("Edit"), tr("Viewport"), tr("Mode"), tr("Camera"), tr("Help")];
|
||||
for (i in 0...categories.length) {
|
||||
@@ -112,7 +112,7 @@ class UIMenubar {
|
||||
UIMenu.menuY = Std.int(Ext.MENUBAR_H(ui));
|
||||
#if arm_touchui
|
||||
var menuW = Std.int(App.defaultElementW * App.uiMenu.SCALE() * 2.0);
|
||||
UIMenu.menuX -= Std.int((menuW - ui._w) / 2);
|
||||
UIMenu.menuX -= Std.int((menuW - ui._w) / 2) + Std.int(UIHeader.inst.headerh / 2);
|
||||
UIMenu.menuY += 4;
|
||||
#end
|
||||
}
|
||||
@@ -122,7 +122,7 @@ class UIMenubar {
|
||||
var col = ui.t.WINDOW_BG_COL;
|
||||
if (col < 0) col += untyped 4294967296;
|
||||
var light = col > 0xff666666 + 4294967296;
|
||||
var iconAccent = light ? 0xff666666 : 0xffbbbbbb;
|
||||
var iconAccent = light ? 0xff666666 : 0xff999999;
|
||||
var img = Res.get("icons.k");
|
||||
var rect = Res.tile50(img, i, 2);
|
||||
return ui.image(img, iconAccent, null, rect.x, rect.y, rect.w, rect.h) == State.Released;
|
||||
|
||||
Reference in New Issue
Block a user