mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-14 04:12:18 +02:00
make form buttons uninteractible until tweens finished instead
This commit is contained in:
parent
41fd698165
commit
14614eb60a
@ -111,7 +111,7 @@ export abstract class FormModalUiHandler extends ModalUiHandler {
|
||||
if (this.buttonBgs.length) {
|
||||
this.buttonBgs[0].off("pointerdown");
|
||||
this.buttonBgs[0].on("pointerdown", () => {
|
||||
if (this.submitAction) {
|
||||
if (this.submitAction && globalScene.tweens.getTweensOf(this.modalContainer).length === 0) {
|
||||
this.submitAction();
|
||||
}
|
||||
});
|
||||
|
@ -181,10 +181,6 @@ export default class LoginFormUiHandler extends FormModalUiHandler {
|
||||
}
|
||||
|
||||
private processExternalProvider(config: ModalConfig): void {
|
||||
this.externalPartyContainer.destroy();
|
||||
this.infoContainer.destroy();
|
||||
this.buildExternalPartyContainer();
|
||||
this.buildInfoContainer();
|
||||
this.externalPartyTitle.setText(i18next.t("menu:orUse") ?? "");
|
||||
this.externalPartyTitle.setX(20 + this.externalPartyTitle.text.length);
|
||||
this.externalPartyTitle.setVisible(true);
|
||||
@ -222,6 +218,7 @@ export default class LoginFormUiHandler extends FormModalUiHandler {
|
||||
};
|
||||
|
||||
this.usernameInfoImage.on("pointerdown", () => {
|
||||
if (globalScene.tweens.getTweensOf(this.infoContainer).length === 0) {
|
||||
const localStorageKeys = Object.keys(localStorage); // this gets the keys for localStorage
|
||||
const keyToFind = "data_";
|
||||
const dataKeys = localStorageKeys.filter(ls => ls.indexOf(keyToFind) >= 0);
|
||||
@ -249,6 +246,7 @@ export default class LoginFormUiHandler extends FormModalUiHandler {
|
||||
return onFail(this.ERR_NO_SAVES);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
this.saveDownloadImage.on("pointerdown", () => {
|
||||
|
@ -122,7 +122,11 @@ export abstract class ModalUiHandler extends UiHandler {
|
||||
|
||||
for (let a = 0; a < this.buttonBgs.length; a++) {
|
||||
if (a < this.buttonBgs.length) {
|
||||
this.buttonBgs[a].on("pointerdown", (_) => config.buttonActions[a]());
|
||||
this.buttonBgs[a].on("pointerdown", (_) => {
|
||||
if (globalScene.tweens.getTweensOf(this.modalContainer).length === 0) {
|
||||
config.buttonActions[a]();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user