Fixed cursor-close out freeze and replaced hall of fame background

This commit is contained in:
Frutescens 2024-08-02 11:12:42 -07:00
parent 3bc91e4562
commit 08efc32fa7
3 changed files with 7 additions and 3 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -90,8 +90,10 @@ export default class RunHistoryUiHandler extends MessageUiHandler {
if (button === Button.ACTION || button === Button.CANCEL) {
if (button === Button.ACTION) {
const cursor = this.cursor + this.scrollCursor;
if (this.runs[cursor].hasData) {
if (this.runs[cursor]) {
this.scene.ui.setOverlayMode(Mode.RUN_INFO, this.runs[cursor].entryData, true);
} else {
return false;
}
success = true;
return success;
@ -135,6 +137,7 @@ export default class RunHistoryUiHandler extends MessageUiHandler {
if (timestamps.length > 1) {
timestampsNo.sort((a, b) => a - b);
}
console.log(timestamps);
const entryCount = timestamps.length;
for (let s = 0; s < entryCount; s++) {
const entry = new RunEntry(this.scene, response, timestampsNo[s].toString(), s);

View File

@ -564,7 +564,6 @@ export default class GameInfoUiHandler extends UiHandler {
showParty(partyVisible: boolean): void {
const allContainers = this.partyContainer.getAll("name", "PkmnInfo");
allContainers.forEach((c: Phaser.GameObjects.Container) => {
console.log(c.getByName("PkmnMoves"));
(c.getByName("PkmnMoves") as Phaser.GameObjects.Container).setVisible(partyVisible);
(c.getByName("PkmnInfoText") as Phaser.GameObjects.Container).setVisible(partyVisible);
(c.getByName("PkmnStatsText") as Phaser.GameObjects.Container).setVisible(partyVisible);
@ -624,7 +623,9 @@ export default class GameInfoUiHandler extends UiHandler {
this.runResultContainer.removeAll(true);
this.partyContainer.removeAll(true);
this.gameStatsContainer.removeAll(true);
this.hallofFameContainer.removeAll(true);
if (this.victory) {
this.hallofFameContainer.removeAll(true);
}
super.clear();
this.gameStatsContainer.setVisible(false);
ui.revertMode();