This commit is contained in:
2025-12-08 18:53:18 +01:00
parent 0323a3279b
commit 462516e45d
3 changed files with 794 additions and 11 deletions

View File

@@ -30,6 +30,30 @@ class StoryScene extends Phaser.Scene {
});
subtitle.setOrigin(0.5);
// Accessibility Info Panel (Prominent)
const accessibilityInfo = this.add.text(width / 2, 190,
'♿ ACCESSIBILITY OPTIONS AVAILABLE BELOW ↓\nFor players with visual, motor, or cognitive needs',
{
fontSize: '14px',
fontFamily: 'Courier New',
color: '#44ff44',
align: 'center',
backgroundColor: '#1a1a2e',
padding: { x: 15, y: 8 }
}
);
accessibilityInfo.setOrigin(0.5);
// Pulsing animation for visibility
this.tweens.add({
targets: accessibilityInfo,
alpha: 0.7,
yoyo: true,
repeat: -1,
duration: 1500,
ease: 'Sine.easeInOut'
});
// Main Menu Buttons
this.createMainMenu(width, height);
@@ -46,11 +70,36 @@ class StoryScene extends Phaser.Scene {
createMainMenu(width, height) {
const buttons = [
{ label: '▶ NEW GAME', color: '#00ff41', action: () => this.startNewGame() },
{ label: '📁 LOAD GAME', color: '#4477ff', action: () => this.loadGame() },
{ label: '⚙️ SETTINGS', color: '#ffaa00', action: () => this.showSettings() },
{ label: '♿ ACCESSIBILITY', color: '#44ff44', action: () => this.showAccessibility() },
{ label: '❌ EXIT', color: '#ff4444', action: () => this.exitGame() }
{
label: '▶ NEW GAME',
color: '#00ff41',
action: () => this.startNewGame(),
description: 'Start a new adventure'
},
{
label: '📁 LOAD GAME',
color: '#4477ff',
action: () => this.loadGame(),
description: 'Continue your saved game'
},
{
label: '⚙️ SETTINGS',
color: '#ffaa00',
action: () => this.showSettings(),
description: 'Graphics, audio, controls'
},
{
label: '♿ ACCESSIBILITY',
color: '#44ff44',
action: () => this.showAccessibility(),
description: 'Options for disabilities: Vision, Motor, Cognitive, Epilepsy'
},
{
label: '❌ EXIT',
color: '#ff4444',
action: () => this.exitGame(),
description: 'Close the game'
}
];
const startY = 230;
@@ -72,15 +121,27 @@ class StoryScene extends Phaser.Scene {
});
text.setOrigin(0.5);
// Description text (hidden by default)
const desc = this.add.text(width / 2, y + 40, btn.description, {
fontSize: '12px',
fontFamily: 'Courier New',
color: '#888888',
align: 'center'
});
desc.setOrigin(0.5);
desc.setAlpha(0); // Hidden initially
// Make interactive
bg.setInteractive({ useHandCursor: true });
bg.on('pointerover', () => {
bg.setFillStyle(0x2a2a4e);
text.setScale(1.1);
desc.setAlpha(1); // Show description
});
bg.on('pointerout', () => {
bg.setFillStyle(0x1a1a2e);
text.setScale(1.0);
desc.setAlpha(0); // Hide description
});
bg.on('pointerdown', () => {
// Flash effect