Remove default category selection in favor of a hint prompt

- Drop the `_lastCategory` module-level state and the logic that pre-selected a tab on scene entry.
- Show a "Select a category above to see its games" hint instead, destroyed once the user picks a category.
This commit is contained in:
Brian Fertig 2026-08-31 19:39:09 -06:00
parent 4ecfcaee50
commit f2108e6258
1 changed files with 5 additions and 5 deletions

View File

@ -6,8 +6,6 @@ import { addFullscreenButton } from '../ui/FullscreenButton.js';
import { playMenuMusic, stopMenuMusic } from '../ui/MenuMusic.js';
import { TutorialModal } from '../ui/TutorialModal.js';
let _lastCategory = null;
const CATEGORIES = [
{ key: 'tabletop', label: 'Tabletop' },
{ key: 'cards', label: 'Cards & Dice' },
@ -107,14 +105,16 @@ export default class GameMenuScene extends Phaser.Scene {
this._tabIcons[key] = icon;
});
const startKey = allActiveCats.find(c => c.key === _lastCategory) ? _lastCategory : allActiveCats[0].key;
this.showCategory(startKey);
// No category is selected by default — the user picks one to see games.
this._hintText = this.add.text(cx, 540, 'Select a category above to see its games', {
fontSize: '26px', color: COLORS.mutedHex,
}).setOrigin(0.5);
new Button(this, cx, GAME_HEIGHT - 60, 'Back', () => this.scene.start('Landing'), { variant: 'ghost' });
}
showCategory(key) {
_lastCategory = key;
if (this._hintText) { this._hintText.destroy(); this._hintText = null; }
for (const [k, btn] of Object.entries(this._tabs)) {
btn.setActive(k === key);
}