Fix chaining ui boxes
This commit is contained in:
@@ -44,7 +44,6 @@ class UIBox {
|
|||||||
var mx = mouse.x;
|
var mx = mouse.x;
|
||||||
var my = mouse.y;
|
var my = mouse.y;
|
||||||
if ((clickToHide && (mx < left || mx > right || my < top || my > bottom)) || isEscape) {
|
if ((clickToHide && (mx < left || mx > right || my < top || my > bottom)) || isEscape) {
|
||||||
if (modalOnHide != null) modalOnHide();
|
|
||||||
hide();
|
hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -154,12 +153,14 @@ class UIBox {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static function hideInternal() {
|
static function hideInternal() {
|
||||||
|
if (modalOnHide != null) modalOnHide();
|
||||||
show = false;
|
show = false;
|
||||||
App.redrawUI();
|
App.redrawUI();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if (krom_android || krom_ios)
|
#if (krom_android || krom_ios)
|
||||||
static function tweenIn() {
|
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});
|
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);
|
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(); }});
|
iron.system.Tween.to({target: UIBox.hwnd, props: { dragY: 0 }, duration: 0.2, ease: iron.system.Tween.Ease.ExpoOut, tick: function() { App.redrawUI(); }});
|
||||||
|
|||||||
Reference in New Issue
Block a user