Polish #8

Merged
brianfertig merged 5 commits from Polish into main 2026-09-01 04:46:30 +00:00
1 changed files with 5 additions and 5 deletions
Showing only changes of commit f2108e6258 - Show all commits

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);
}