Fix chaining ui boxes

This commit is contained in:
luboslenco
2022-12-21 12:08:01 +01:00
parent 6aa0606740
commit e4b630b862
+2 -1
View File
@@ -44,7 +44,6 @@ class UIBox {
var mx = mouse.x;
var my = mouse.y;
if ((clickToHide && (mx < left || mx > right || my < top || my > bottom)) || isEscape) {
if (modalOnHide != null) modalOnHide();
hide();
}
}
@@ -154,12 +153,14 @@ class UIBox {
}
static function hideInternal() {
if (modalOnHide != null) modalOnHide();
show = false;
App.redrawUI();
}
#if (krom_android || krom_ios)
static function tweenIn() {
iron.system.Tween.reset();
iron.system.Tween.to({target: UIBox, props: { tweenAlpha: 0.5 }, duration: 0.2, ease: iron.system.Tween.Ease.ExpoOut});
UIBox.hwnd.dragY = Std.int(kha.System.windowHeight() / 2);
iron.system.Tween.to({target: UIBox.hwnd, props: { dragY: 0 }, duration: 0.2, ease: iron.system.Tween.Ease.ExpoOut, tick: function() { App.redrawUI(); }});