Make sure ui box fits inside window bounds

This commit is contained in:
luboslenco
2023-05-15 15:03:19 +02:00
parent 5e22373d40
commit 77f3b4f664
+2
View File
@@ -65,6 +65,8 @@ class UIBox {
var apph = System.windowHeight();
var mw = Std.int(modalW * ui.SCALE());
var mh = Std.int(modalH * ui.SCALE());
if (mw > appw) mw = appw;
if (mh > apph) mh = apph;
var left = Std.int(appw / 2 - mw / 2);
var top = Std.int(apph / 2 - mh / 2);