[Beta] Revert "[UI/UX] Default cursor to no when stop trying to teach move" (#5990)

Revert "[UI/UX] Default cursor to no when stop trying to teach move"

This reverts commit ba2158ec64.
This commit is contained in:
damocleas 2025-06-14 17:40:18 -04:00 committed by GitHub
parent 7cf51d48a7
commit 73e0a2905b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 1 additions and 35 deletions

View File

@ -1,13 +0,0 @@
// biome-ignore lint/correctness/noUnusedImports: Used in tsdoc
import type ConfirmUiHandler from "#app/ui/confirm-ui-handler";
/**
* Used by {@linkcode ConfirmUiHandler} to determine whether the cursor should start on Yes or No
*/
export const ConfirmUiMode = Object.freeze({
/** Start cursor on Yes */
DEFAULT_YES: 1,
/** Start cursor on No */
DEFAULT_NO: 2
});
export type ConfirmUiMode = typeof ConfirmUiMode[keyof typeof ConfirmUiMode];

View File

@ -12,7 +12,6 @@ import { UiMode } from "#enums/ui-mode";
import i18next from "i18next";
import { PlayerPartyMemberPokemonPhase } from "#app/phases/player-party-member-pokemon-phase";
import type Pokemon from "#app/field/pokemon";
import { ConfirmUiMode } from "#enums/confirm-ui-mode";
import { LearnMoveType } from "#enums/learn-move-type";
export class LearnMovePhase extends PlayerPartyMemberPokemonPhase {
@ -164,10 +163,6 @@ export class LearnMovePhase extends PlayerPartyMemberPokemonPhase {
globalScene.ui.setMode(this.messageMode);
this.replaceMoveCheck(move, pokemon);
},
false,
0,
0,
ConfirmUiMode.DEFAULT_NO,
);
}

View File

@ -4,11 +4,8 @@ import { UiMode } from "#enums/ui-mode";
import i18next from "i18next";
import { Button } from "#enums/buttons";
import { globalScene } from "#app/global-scene";
import { ConfirmUiMode } from "#enums/confirm-ui-mode";
export default class ConfirmUiHandler extends AbstractOptionSelectUiHandler {
private confirmUiMode: ConfirmUiMode;
public static readonly windowWidth: number = 48;
private switchCheck: boolean;
@ -108,16 +105,7 @@ 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_YES;
switch (this.confirmUiMode) {
case ConfirmUiMode.DEFAULT_YES:
this.setCursor(this.switchCheck ? this.switchCheckCursor : 0);
break;
case ConfirmUiMode.DEFAULT_NO:
this.setCursor(this.switchCheck ? this.switchCheckCursor : 1);
break;
}
return true;
}

View File

@ -92,10 +92,6 @@ describe("Learn Move Phase", () => {
game.onNextPrompt("LearnMovePhase", UiMode.CONFIRM, () => {
game.scene.ui.processInput(Button.ACTION);
});
game.onNextPrompt("LearnMovePhase", UiMode.CONFIRM, () => {
game.scene.ui.setCursor(0);
game.scene.ui.processInput(Button.ACTION);
});
await game.phaseInterceptor.to(LearnMovePhase);
const levelReq = bulbasaur.getLevelMoves(5)[0][0];