Improve nested input handling
This commit is contained in:
@@ -541,8 +541,7 @@ class UINodes {
|
||||
|
||||
if (!show || System.windowWidth() == 0 || System.windowHeight() == 0) return;
|
||||
|
||||
if (!App.uiEnabled && ui.inputRegistered) ui.unregisterInput();
|
||||
if (App.uiEnabled && !ui.inputRegistered) ui.registerInput();
|
||||
ui.inputEnabled = App.uiEnabled;
|
||||
|
||||
g.end();
|
||||
|
||||
|
||||
@@ -646,12 +646,9 @@ class UISidebar {
|
||||
}
|
||||
|
||||
public function render(g: kha.graphics2.Graphics) {
|
||||
if (System.windowWidth() == 0 || System.windowHeight() == 0) return;
|
||||
if (!show || System.windowWidth() == 0 || System.windowHeight() == 0) return;
|
||||
|
||||
if (!App.uiEnabled && ui.inputRegistered) ui.unregisterInput();
|
||||
if (App.uiEnabled && !ui.inputRegistered) ui.registerInput();
|
||||
|
||||
if (!show) return;
|
||||
ui.inputEnabled = App.uiEnabled;
|
||||
|
||||
g.end();
|
||||
ui.begin(g);
|
||||
|
||||
Reference in New Issue
Block a user