Fix ui align in distract free mode
This commit is contained in:
@@ -265,6 +265,11 @@ class UINodes {
|
||||
wy += iron.App.h() - Config.raw.layout[LayoutNodesH];
|
||||
}
|
||||
var ww = Config.raw.layout[LayoutNodesW];
|
||||
if (!UISidebar.inst.show) {
|
||||
ww += Config.raw.layout[LayoutSidebarW] + UIToolbar.inst.toolbarw;
|
||||
wx -= UIToolbar.inst.toolbarw;
|
||||
wy = 0;
|
||||
}
|
||||
var mx = mouse.x;
|
||||
var my = mouse.y;
|
||||
if (mx < wx || mx > wx + ww || my < wy) return;
|
||||
@@ -374,6 +379,9 @@ class UINodes {
|
||||
|
||||
public function drawGrid() {
|
||||
var ww = Config.raw.layout[LayoutNodesW];
|
||||
if (!UISidebar.inst.show) {
|
||||
ww += Config.raw.layout[LayoutSidebarW] + UIToolbar.inst.toolbarw;
|
||||
}
|
||||
var wh = iron.App.h();
|
||||
var w = ww + 100 * 2;
|
||||
var h = wh + 100 * 2;
|
||||
@@ -457,11 +465,19 @@ class UINodes {
|
||||
ww = Config.raw.layout[LayoutNodesW];
|
||||
wx = Std.int(iron.App.w()) + UIToolbar.inst.toolbarw;
|
||||
wy = UIHeader.inst.headerh * 2;
|
||||
if (!UISidebar.inst.show) {
|
||||
ww += Config.raw.layout[LayoutSidebarW] + UIToolbar.inst.toolbarw;
|
||||
wx -= UIToolbar.inst.toolbarw;
|
||||
wy = 0;
|
||||
}
|
||||
var ew = Std.int(ui.ELEMENT_W() * 0.7);
|
||||
wh = iron.App.h();
|
||||
if (UIView2D.inst.show) {
|
||||
wh = Config.raw.layout[LayoutNodesH];
|
||||
wy = iron.App.h() - Config.raw.layout[LayoutNodesH] + UIHeader.inst.headerh * 2;
|
||||
if (!UISidebar.inst.show) {
|
||||
wy -= UIHeader.inst.headerh * 2;
|
||||
}
|
||||
}
|
||||
if (ui.window(hwnd, wx, wy, ww, wh)) {
|
||||
|
||||
|
||||
@@ -898,7 +898,7 @@ class UISidebar {
|
||||
Krom.setMouseCursor(3) : // Horizontal
|
||||
Krom.setMouseCursor(4); // Vertical
|
||||
|
||||
if (ui.inputStarted) {
|
||||
if (Zui.current.inputStarted) {
|
||||
borderStarted = side;
|
||||
borderHandle = handle;
|
||||
App.isResizing = true;
|
||||
|
||||
@@ -64,6 +64,11 @@ class UIView2D {
|
||||
ww = Config.raw.layout[LayoutNodesW];
|
||||
wx = Std.int(iron.App.w()) + UIToolbar.inst.toolbarw;
|
||||
wy = UIHeader.inst.headerh * 2;
|
||||
if (!UISidebar.inst.show) {
|
||||
ww += Config.raw.layout[LayoutSidebarW] + UIToolbar.inst.toolbarw;
|
||||
wx -= UIToolbar.inst.toolbarw;
|
||||
wy = 0;
|
||||
}
|
||||
|
||||
if (!show) return;
|
||||
if (System.windowWidth() == 0 || System.windowHeight() == 0) return;
|
||||
|
||||
Reference in New Issue
Block a user