Show close button when running distract free mode on android and ios

This commit is contained in:
Lubos Lenco
2021-10-13 21:01:46 +02:00
parent 5d2841cfd7
commit f57f5f9ac5
+15
View File
@@ -649,6 +649,21 @@ class UISidebar {
}
public function render(g: kha.graphics2.Graphics) {
#if (krom_android || krom_ios)
if (!show) {
ui.inputEnabled = true;
g.end();
ui.begin(g);
if (ui.window(Id.handle(), 0, 0, 150, Std.int(ui.ELEMENT_H() + ui.ELEMENT_OFFSET()))) {
if (ui.button(tr("Close"))) {
toggleDistractFree();
}
}
ui.end();
g.begin(false);
}
#end
if (!show || System.windowWidth() == 0 || System.windowHeight() == 0) return;
ui.inputEnabled = App.uiEnabled;