Merge remote-tracking branch 'origin/summaryOption1' into summaryOption1

This commit is contained in:
Frutescens 2024-07-06 13:16:59 -07:00
commit ea7d0ce59e
1 changed files with 6 additions and 6 deletions

View File

@ -4,7 +4,6 @@ import { Mode } from "./ui";
import i18next from "i18next";
import {Button} from "#enums/buttons";
export default class ConfirmUiHandler extends AbstractOptionSelectUiHandler {
public static readonly windowWidth: integer = 48;
@ -21,7 +20,7 @@ export default class ConfirmUiHandler extends AbstractOptionSelectUiHandler {
}
show(args: any[]): boolean {
if (args.length === 4 && args[0] instanceof Function && args[1] instanceof Function && args[2] instanceof Function && args[3]) {
if (args.length === 3 && args[0].toString().includes("newPokemon")) {
const config: OptionSelectConfig = {
options: [
{
@ -44,19 +43,20 @@ export default class ConfirmUiHandler extends AbstractOptionSelectUiHandler {
}
}
],
delay: args.length >= 8 && args[7] !== null ? args[7] as integer : 0
delay: args.length >= 7 && args[6] !== null ? args[6] as integer : 0
};
super.show([ config ]);
this.switchCheck = args.length >= 5 && args[4] !== null && args[4] as boolean;
this.switchCheck = args.length >= 4 && args[3] !== null && args[3] as boolean;
const xOffset = (args.length >= 6 && args[5] !== null ? args[5] as number : 0);
const yOffset = (args.length >= 7 && args[6] !== null ? args[6] as number : 0);
const xOffset = (args.length >= 5 && args[4] !== null ? args[4] as number : 0);
const yOffset = (args.length >= 6 && args[5] !== null ? args[5] as number : 0);
this.optionSelectContainer.setPosition((this.scene.game.canvas.width / 6) - 1 + xOffset, -48 + yOffset);
this.setCursor(this.switchCheck ? this.switchCheckCursor : 0);
return true;
} else if (args.length >= 2 && args[0] instanceof Function && args[1] instanceof Function) {
const config: OptionSelectConfig = {