mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-04 07:22:19 +02:00
[UI/UX] "Stop trying to teach move" Defaulting to "No"
This commit is contained in:
parent
dd2f475ded
commit
8bdacafaa5
@ -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,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -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.setCursor(this.switchCheck ? this.switchCheckCursor : 0);
|
||||
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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user