From ec51ba7417b9d77a116a46743f3054cb51dab1fb Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Tue, 9 Apr 2024 09:14:11 -0400 Subject: [PATCH] Add back ability to hold down confirm and cancel buttons --- src/battle-scene.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/battle-scene.ts b/src/battle-scene.ts index d6712f657..4c71a5370 100644 --- a/src/battle-scene.ts +++ b/src/battle-scene.ts @@ -1083,12 +1083,15 @@ export default class BattleScene extends SceneBase { inputSuccess = this.ui.processInput(Button.RIGHT); vibrationLength = 5; this.setLastProcessedMovementTime(Button.RIGHT) - } else if (this.buttonJustPressed(Button.SUBMIT)) { + } else if (this.buttonJustPressed(Button.SUBMIT) || this.repeatInputDurationJustPassed(Button.SUBMIT)) { inputSuccess = this.ui.processInput(Button.SUBMIT) || this.ui.processInput(Button.ACTION); - } else if (this.buttonJustPressed(Button.ACTION)) { + this.setLastProcessedMovementTime(Button.SUBMIT); + } else if (this.buttonJustPressed(Button.ACTION) || this.repeatInputDurationJustPassed(Button.ACTION)) { inputSuccess = this.ui.processInput(Button.ACTION); - } else if (this.buttonJustPressed(Button.CANCEL)) { + this.setLastProcessedMovementTime(Button.ACTION); + } else if (this.buttonJustPressed(Button.CANCEL)|| this.repeatInputDurationJustPassed(Button.CANCEL)) { inputSuccess = this.ui.processInput(Button.CANCEL); + this.setLastProcessedMovementTime(Button.CANCEL); } else if (this.buttonJustPressed(Button.MENU)) { switch (this.ui?.getMode()) { case Mode.MESSAGE: