mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-06-21 00:52:47 +02:00
Revert "[UI/UX] Default cursor to no when stop trying to teach move"
This reverts commit ba2158ec64
.
This commit is contained in:
parent
7cf51d48a7
commit
9e751066e7
@ -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];
|
@ -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,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
this.setCursor(this.switchCheck ? this.switchCheckCursor : 0);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -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];
|
||||
|
Loading…
Reference in New Issue
Block a user