Fix menubar closing when using touch ui

This commit is contained in:
luboslenco
2022-12-13 16:06:35 +01:00
parent 3648a4e336
commit 182005778e
2 changed files with 4 additions and 0 deletions
+1
View File
@@ -121,6 +121,7 @@ class UIMenubar {
var menuW = Std.int(App.defaultElementW * App.uiMenu.SCALE() * 2.0); var menuW = Std.int(App.defaultElementW * App.uiMenu.SCALE() * 2.0);
UIMenu.menuX -= Std.int((menuW - ui._w) / 2) + Std.int(UIHeader.inst.headerh / 2); UIMenu.menuX -= Std.int((menuW - ui._w) / 2) + Std.int(UIHeader.inst.headerh / 2);
UIMenu.menuY += 4; UIMenu.menuY += 4;
UIMenu.keepOpen = true;
} }
} }
+3
View File
@@ -847,6 +847,9 @@ class UINodes {
menuCategory = i; menuCategory = i;
popupX = wx + ui._x; popupX = wx + ui._x;
popupY = wy + ui._y; popupY = wy + ui._y;
if (Config.raw.touch_ui) {
showMenuFirst = true;
}
} }
if (i < cats.length - 1) { if (i < cats.length - 1) {
ui._x += ew + 3; ui._x += ew + 3;