mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-06-21 09:02:47 +02:00
Play select sound on successful submission or cancel
This commit is contained in:
parent
d1859a77a3
commit
b2f1fe17c2
@ -90,6 +90,7 @@ export class ChangePasswordFormUiHandler extends FormModalUiHandler {
|
|||||||
|
|
||||||
pokerogueApi.account.changePassword({ password: passwordInput.text }).then(error => {
|
pokerogueApi.account.changePassword({ password: passwordInput.text }).then(error => {
|
||||||
if (!error && originalSubmitAction) {
|
if (!error && originalSubmitAction) {
|
||||||
|
globalScene.ui.playSelect();
|
||||||
originalSubmitAction();
|
originalSubmitAction();
|
||||||
// Only clear inputs if the action was successful
|
// Only clear inputs if the action was successful
|
||||||
for (const input of this.inputs) {
|
for (const input of this.inputs) {
|
||||||
@ -104,7 +105,7 @@ export class ChangePasswordFormUiHandler extends FormModalUiHandler {
|
|||||||
// Upon pressing cancel, the inputs should be cleared
|
// Upon pressing cancel, the inputs should be cleared
|
||||||
const originalCancelAction = this.cancelAction;
|
const originalCancelAction = this.cancelAction;
|
||||||
this.cancelAction = () => {
|
this.cancelAction = () => {
|
||||||
console.log("Change password form cancelled");
|
globalScene.ui.playSelect();
|
||||||
for (const input of this.inputs) {
|
for (const input of this.inputs) {
|
||||||
input.setText("");
|
input.setText("");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user