Scale file browser and nodes

This commit is contained in:
unknown
2018-10-23 11:50:57 +02:00
parent e94a522360
commit 7b833ee9ef
2 changed files with 9 additions and 4 deletions
+7 -4
View File
@@ -18,7 +18,7 @@ class App {
public static var font:kha.Font = null;
public static var theme:zui.Themes.TTheme;
public static var color_wheel:kha.Image;
static var uimodal:Zui;
public static var uimodal:Zui;
static var modalW = 625;
static var modalH = 545;
static var lastW = -1;
@@ -77,7 +77,10 @@ class App {
iron.Scene.active.root.addTrait(new UIView2D());
iron.Scene.active.root.addTrait(new arm.trait.FlyCamera());
iron.Scene.active.root.addTrait(new arm.trait.OrbitCamera());
iron.App.notifyOnRender2D(render);
iron.App.notifyOnInit(function() {
iron.App.notifyOnRender2D(render); // Draw on top
});
});
});
});
@@ -400,7 +403,7 @@ class App {
UITrait.inst.ddirty = 2;
}
uimodal.beginLayout(g, right - 100, bottom - 30, 100);
uimodal.beginLayout(g, right - Std.int(uimodal.ELEMENT_W()), bottom - Std.int(uimodal.ELEMENT_H() * 1.2), Std.int(uimodal.ELEMENT_W()));
if (uimodal.button("OK")) {
showFiles = false;
filesDone(path);
@@ -408,7 +411,7 @@ class App {
}
uimodal.endLayout(false);
uimodal.beginLayout(g, right - 200, bottom - 30, 100);
uimodal.beginLayout(g, right - Std.int(uimodal.ELEMENT_W() * 2), bottom - Std.int(uimodal.ELEMENT_H() * 1.2), Std.int(uimodal.ELEMENT_W()));
if (uimodal.button("Cancel")) {
showFiles = false;
UITrait.inst.ddirty = 2;
+2
View File
@@ -2291,6 +2291,8 @@ void main() {
if (!hscale.changed && hscaleWasChanged) {
apconfig.window_scale = hscale.value;
ui.setScale(hscale.value);
arm.App.uimodal.setScale(hscale.value);
UINodes.inst.ui.setScale(hscale.value);
windowW = Std.int(defaultWindowW * apconfig.window_scale);
arm.App.resize();
}