[UI/UX] "Stop trying to teach move" Defaulting to "No"

This commit is contained in:
dobin 2025-06-03 14:09:27 +09:00
parent dd2f475ded
commit 8bdacafaa5
2 changed files with 22 additions and 1 deletions

View File

@ -13,6 +13,7 @@ import i18next from "i18next";
import { PlayerPartyMemberPokemonPhase } from "#app/phases/player-party-member-pokemon-phase";
import type Pokemon from "#app/field/pokemon";
import { SelectModifierPhase } from "#app/phases/select-modifier-phase";
import { ConfirmUiMode } from "#app/ui/confirm-ui-handler";
export enum LearnMoveType {
/** For learning a move via level-up, evolution, or other non-item-based event */
@ -171,6 +172,10 @@ export class LearnMovePhase extends PlayerPartyMemberPokemonPhase {
globalScene.ui.setMode(this.messageMode);
this.replaceMoveCheck(move, pokemon);
},
false,
0,
0,
ConfirmUiMode.REJECT_MOVE,
);
}

View File

@ -5,7 +5,14 @@ import i18next from "i18next";
import { Button } from "#enums/buttons";
import { globalScene } from "#app/global-scene";
export enum ConfirmUiMode {
DEFAULT,
REJECT_MOVE,
}
export default class ConfirmUiHandler extends AbstractOptionSelectUiHandler {
private confirmUiMode: ConfirmUiMode;
public static readonly windowWidth: number = 48;
private switchCheck: boolean;
@ -105,7 +112,16 @@ export default class ConfirmUiHandler extends AbstractOptionSelectUiHandler {
this.optionSelectContainer.setPosition(globalScene.game.canvas.width / 6 - 1 + xOffset, -48 + yOffset);
this.confirmUiMode = args.length >= 6 ? (args[5] as ConfirmUiMode) : ConfirmUiMode.DEFAULT;
switch (this.confirmUiMode) {
case ConfirmUiMode.DEFAULT:
this.setCursor(this.switchCheck ? this.switchCheckCursor : 0);
break;
case ConfirmUiMode.REJECT_MOVE:
this.setCursor(this.switchCheck ? this.switchCheckCursor : 1);
break;
}
return true;
}