Rework option select and add game stats

This commit is contained in:
Flashfyre committed 2024-01-11 12:26:32 -05:00
1 parent 13aa20630d
commit fcf1c4f574
14 files changed
+585 -169

No files matched your search

-26
View File
@@ -3,8 +3,6 @@ import AbstractOptionSelectUiHandler from "./abstact-option-select-ui-handler";
import { Mode } from "./ui";
export default class OptionSelectUiHandler extends AbstractOptionSelectUiHandler {
private options: string[] = [];
constructor(scene: BattleScene) {
super(scene, Mode.OPTION_SELECT);
}
@@ -12,28 +10,4 @@ export default class OptionSelectUiHandler extends AbstractOptionSelectUiHandler
getWindowWidth(): integer {
return 64;
}
getWindowHeight(): integer {
return (this.getOptions().length + 1) * 16;
}
getOptions(): string[] {
return this.options;
}
show(args: any[]): boolean {
if (args.length < 2 || args.length % 2 === 1)
return false;
const optionNames: string[] = [];
const optionFuncs: Function[] = [];
args.map((arg, i) => (i % 2 ? optionFuncs : optionNames).push(arg));
this.options = optionNames;
this.setupOptions();
return super.show(optionFuncs);
}
}