mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-06 00:12:16 +02:00
finalised the minor UI changes
This commit is contained in:
parent
4fcb9856f0
commit
464d5087cb
4
package-lock.json
generated
4
package-lock.json
generated
@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "pokemon-rogue-battle",
|
||||
"version": "1.0.1",
|
||||
"version": "1.0.3",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "pokemon-rogue-battle",
|
||||
"version": "1.0.1",
|
||||
"version": "1.0.3",
|
||||
"dependencies": {
|
||||
"@material/material-color-utilities": "^0.2.7",
|
||||
"crypto-js": "^4.2.0",
|
||||
|
@ -383,6 +383,7 @@ export default class PartyUiHandler extends MessageUiHandler {
|
||||
}
|
||||
|
||||
const slotCount = this.partySlots.length;
|
||||
const battlerCount = this.scene.currentBattle.getBattlerCount();
|
||||
|
||||
switch (button) {
|
||||
case Button.UP:
|
||||
@ -392,14 +393,20 @@ export default class PartyUiHandler extends MessageUiHandler {
|
||||
success = this.setCursor(this.cursor < 6 ? this.cursor < slotCount - 1 ? this.cursor + 1 : 6 : 0);
|
||||
break;
|
||||
case Button.LEFT:
|
||||
if (this.cursor >= this.scene.currentBattle.getBattlerCount() && this.cursor <= 6)
|
||||
if (this.cursor >= battlerCount && this.cursor <= 6)
|
||||
success = this.setCursor(0);
|
||||
break;
|
||||
case Button.RIGHT:
|
||||
const battlerCount = this.scene.currentBattle.getBattlerCount();
|
||||
if (slotCount > battlerCount && this.cursor < battlerCount)
|
||||
success = this.setCursor(this.lastCursor < 6 || this.lastCursor ? battlerCount : battlerCount);
|
||||
if (slotCount === battlerCount){
|
||||
success = this.setCursor(6);
|
||||
break;
|
||||
} else if (battlerCount >= 2 && slotCount > battlerCount && this.getCursor() === 0 && this.lastCursor === 1){
|
||||
success = this.setCursor(2);
|
||||
break;
|
||||
} else if (slotCount > battlerCount && this.cursor < battlerCount){
|
||||
success = this.setCursor(this.lastCursor < 6 ? this.lastCursor || battlerCount : battlerCount);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -364,9 +364,16 @@ export default class SummaryUiHandler extends UiHandler {
|
||||
case Button.LEFT:
|
||||
this.moveSelect = false;
|
||||
this.setCursor(Page.STATS);
|
||||
if (this.summaryUiMode === SummaryUiMode.LEARN_MOVE){
|
||||
this.hideMoveEffect();
|
||||
this.destroyBlinkCursor();
|
||||
success = true;
|
||||
break;
|
||||
} else {
|
||||
this.hideMoveSelect();
|
||||
success = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@ -376,11 +383,13 @@ export default class SummaryUiHandler extends UiHandler {
|
||||
success = true;
|
||||
}
|
||||
} else if (button === Button.CANCEL) {
|
||||
if (this.summaryUiMode === SummaryUiMode.LEARN_MOVE)
|
||||
if (this.summaryUiMode === SummaryUiMode.LEARN_MOVE){
|
||||
this.hideMoveSelect();
|
||||
else
|
||||
success = true;
|
||||
} else {
|
||||
ui.setMode(Mode.PARTY);
|
||||
success = true;
|
||||
}
|
||||
} else {
|
||||
const pages = Utils.getEnumValues(Page);
|
||||
switch (button) {
|
||||
@ -524,6 +533,11 @@ export default class SummaryUiHandler extends UiHandler {
|
||||
this.setCursor(0, true);
|
||||
this.showMoveEffect();
|
||||
}
|
||||
else if (this.cursor===Page.MOVES) {
|
||||
this.moveCursorObj = null;
|
||||
this.showMoveSelect();
|
||||
this.showMoveEffect();
|
||||
}
|
||||
}
|
||||
else
|
||||
this.summaryPageTransitionContainer.x -= 214;
|
||||
@ -841,6 +855,7 @@ export default class SummaryUiHandler extends UiHandler {
|
||||
}
|
||||
|
||||
getSelectedMove(): Move {
|
||||
console.log("selected moves")
|
||||
if (this.cursor !== Page.MOVES)
|
||||
return null;
|
||||
|
||||
@ -852,6 +867,7 @@ export default class SummaryUiHandler extends UiHandler {
|
||||
}
|
||||
|
||||
showMoveSelect() {
|
||||
console.log("show move select")
|
||||
this.moveSelect = true;
|
||||
this.extraMoveRowContainer.setVisible(true);
|
||||
this.selectedMoveIndex = -1;
|
||||
@ -860,6 +876,7 @@ export default class SummaryUiHandler extends UiHandler {
|
||||
}
|
||||
|
||||
hideMoveSelect() {
|
||||
console.log("hide move select")
|
||||
if (this.summaryUiMode === SummaryUiMode.LEARN_MOVE) {
|
||||
this.moveSelectFunction(4);
|
||||
return;
|
||||
@ -868,6 +885,12 @@ export default class SummaryUiHandler extends UiHandler {
|
||||
this.moveSelect = false;
|
||||
this.extraMoveRowContainer.setVisible(false);
|
||||
this.moveDescriptionText.setText('');
|
||||
|
||||
this.destroyBlinkCursor();
|
||||
this.hideMoveEffect();
|
||||
}
|
||||
|
||||
destroyBlinkCursor(){
|
||||
if (this.moveCursorBlinkTimer) {
|
||||
this.moveCursorBlinkTimer.destroy();
|
||||
this.moveCursorBlinkTimer = null;
|
||||
@ -880,8 +903,6 @@ export default class SummaryUiHandler extends UiHandler {
|
||||
this.selectedMoveCursorObj.destroy();
|
||||
this.selectedMoveCursorObj = null;
|
||||
}
|
||||
|
||||
this.hideMoveEffect();
|
||||
}
|
||||
|
||||
showMoveEffect(instant?: boolean) {
|
||||
|
Loading…
Reference in New Issue
Block a user