From a1b09f3aeba8c028ea7472074600f0cb12a2ad0a Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Mon, 25 Mar 2024 12:33:35 -0400 Subject: [PATCH] Fix item bar hover logic --- src/data/splash-messages.ts | 3 +++ src/modifier/modifier.ts | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/data/splash-messages.ts b/src/data/splash-messages.ts index 822a69e11f0..f9f4f25d8b8 100644 --- a/src/data/splash-messages.ts +++ b/src/data/splash-messages.ts @@ -12,8 +12,11 @@ export const splashMessages = [ 'Infinite Fusion at Home!', 'Broken Egg Moves!', 'Mubstitute!', + 'That\'s Crazy!', 'Questionable Balancing!', 'Sudden Difficulty Spikes!', 'Based on an Unfinished Flash Game!', + 'More Addictive than Intended!', + 'Eevee Expo!', 'YNOproject!' ]; \ No newline at end of file diff --git a/src/modifier/modifier.ts b/src/modifier/modifier.ts index 0f517fb8b97..19f0e9eb020 100644 --- a/src/modifier/modifier.ts +++ b/src/modifier/modifier.ts @@ -57,7 +57,7 @@ export class ModifierBar extends Phaser.GameObjects.Container { icon.setVisible(false); this.add(icon); this.setModifierIconPosition(icon, visibleIconModifiers.length); - icon.setInteractive(new Phaser.Geom.Rectangle(0, 0, 32, 32), Phaser.Geom.Rectangle.Contains); + icon.setInteractive(new Phaser.Geom.Rectangle(0, 0, 32, 24), Phaser.Geom.Rectangle.Contains); icon.on('pointerover', () => { (this.scene as BattleScene).ui.showTooltip(modifier.type.name, modifier.type.getDescription(this.scene as BattleScene)); if (this.modifierCache && this.modifierCache.length > iconOverflowIndex) @@ -77,7 +77,8 @@ export class ModifierBar extends Phaser.GameObjects.Container { } updateModifierOverflowVisibility(ignoreLimit: boolean) { - for (let modifier of this.getAll().map(m => m as Phaser.GameObjects.Container).slice(0, this.getAll().length - iconOverflowIndex)) + const modifierIcons = this.getAll().reverse(); + for (let modifier of modifierIcons.map(m => m as Phaser.GameObjects.Container).slice(iconOverflowIndex)) modifier.setVisible(ignoreLimit); }