mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-01-07 09:29:04 +00:00
dc30dd33b2
* moving enums * import updates * fix tsconfig paths importing (#2184) * reverse index.ts addition --------- Co-authored-by: Devin Korb <meepdarknessmeep@gmail.com>
28 lines
799 B
TypeScript
28 lines
799 B
TypeScript
import BattleScene from "../battle-scene";
|
|
import { Mode } from "./ui";
|
|
import UiHandler from "./ui-handler";
|
|
import {Button} from "#enums/buttons";
|
|
|
|
export default abstract class AwaitableUiHandler extends UiHandler {
|
|
protected awaitingActionInput: boolean;
|
|
protected onActionInput: Function;
|
|
public tutorialActive: boolean = false;
|
|
|
|
constructor(scene: BattleScene, mode: Mode) {
|
|
super(scene, mode);
|
|
}
|
|
|
|
processTutorialInput(button: Button): boolean {
|
|
if ((button === Button.ACTION || button === Button.CANCEL) && this.onActionInput) {
|
|
this.getUi().playSelect();
|
|
const originalOnActionInput = this.onActionInput;
|
|
this.onActionInput = null;
|
|
originalOnActionInput();
|
|
this.awaitingActionInput = false;
|
|
return true;
|
|
}
|
|
|
|
return false;
|
|
}
|
|
}
|