Fixed character sheet's close button being hovered even when hidden
This commit is contained in:
parent
5fb8a6ce58
commit
1000611ec1
|
@ -68,6 +68,7 @@ module TK.SpaceTac.UI {
|
||||||
|
|
||||||
this.xhidden = -this.view.getWidth();
|
this.xhidden = -this.view.getWidth();
|
||||||
this.container.x = this.xhidden;
|
this.container.x = this.xhidden;
|
||||||
|
this.container.setVisible(false);
|
||||||
|
|
||||||
this.image_portrait = this.builder.image("common-transparent", 435, 271, true);
|
this.image_portrait = this.builder.image("common-transparent", 435, 271, true);
|
||||||
|
|
||||||
|
@ -369,13 +370,9 @@ module TK.SpaceTac.UI {
|
||||||
this.view.audio.playOnce("ui-dialog-open");
|
this.view.audio.playOnce("ui-dialog-open");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.container.setVisible(true);
|
||||||
if (animate) {
|
if (animate) {
|
||||||
this.view.tweens.add({
|
this.view.animations.addAnimation(this.container, { x: this.xshown }, 400, "Circ.easeOut");
|
||||||
targets: this.container,
|
|
||||||
x: this.xshown,
|
|
||||||
duration: 400,
|
|
||||||
easing: 'Circ.easeInOut'
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
this.container.x = this.xshown;
|
this.container.x = this.xshown;
|
||||||
}
|
}
|
||||||
|
@ -384,19 +381,15 @@ module TK.SpaceTac.UI {
|
||||||
/**
|
/**
|
||||||
* Hide the sheet
|
* Hide the sheet
|
||||||
*/
|
*/
|
||||||
hide(animate = true) {
|
async hide(animate = true) {
|
||||||
this.view.audio.playOnce("ui-dialog-close");
|
this.view.audio.playOnce("ui-dialog-close");
|
||||||
|
|
||||||
if (animate) {
|
if (animate) {
|
||||||
this.view.tweens.add({
|
await this.view.animations.addAnimation(this.container, { x: this.xhidden }, 400, "Circ.easeIn");
|
||||||
targets: this.container,
|
|
||||||
x: this.xhidden,
|
|
||||||
duration: 400,
|
|
||||||
ease: 'Circ.easeInOut'
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
this.container.x = this.xhidden;
|
this.container.x = this.xhidden;
|
||||||
}
|
}
|
||||||
|
this.container.setVisible(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue