updejt
This commit is contained in:
@@ -283,42 +283,53 @@ class AccessibilitySystem {
|
||||
|
||||
// EPILEPSY WARNING
|
||||
showEpilepsyWarning(onContinue) {
|
||||
const warning = this.scene.add.container(
|
||||
this.scene.cameras.main.centerX,
|
||||
this.scene.cameras.main.centerY
|
||||
// Get UIScene for proper positioning
|
||||
const uiScene = this.scene.scene.get('UIScene') || this.scene;
|
||||
|
||||
const warning = uiScene.add.container(
|
||||
uiScene.scale.width / 2,
|
||||
uiScene.scale.height / 2
|
||||
);
|
||||
warning.setDepth(10000);
|
||||
warning.setDepth(99999); // ALWAYS ON TOP
|
||||
warning.setScrollFactor(0);
|
||||
|
||||
const bg = this.scene.add.rectangle(0, 0, 600, 400, 0x000000, 0.95);
|
||||
// Dark background overlay
|
||||
const bg = uiScene.add.rectangle(0, 0, 700, 500, 0x000000, 0.98);
|
||||
bg.setStrokeStyle(4, 0xff0000);
|
||||
|
||||
const title = this.scene.add.text(0, -150, '⚠️ EPILEPSY WARNING', {
|
||||
fontSize: '32px',
|
||||
const title = uiScene.add.text(0, -180, '⚠️ EPILEPSY WARNING', {
|
||||
fontSize: '36px',
|
||||
color: '#ff0000',
|
||||
fontStyle: 'bold'
|
||||
fontStyle: 'bold',
|
||||
stroke: '#000000',
|
||||
strokeThickness: 4
|
||||
}).setOrigin(0.5);
|
||||
|
||||
const text = this.scene.add.text(0, -50,
|
||||
const text = uiScene.add.text(0, -60,
|
||||
'This game contains flashing lights\n' +
|
||||
'that may trigger seizures in people with\n' +
|
||||
'photosensitive epilepsy.\n\n' +
|
||||
'Player discretion is advised.',
|
||||
{
|
||||
fontSize: '18px',
|
||||
fontSize: '20px',
|
||||
color: '#ffffff',
|
||||
align: 'center',
|
||||
wordWrap: { width: 500 }
|
||||
wordWrap: { width: 600 },
|
||||
lineSpacing: 8
|
||||
}
|
||||
).setOrigin(0.5);
|
||||
|
||||
const enableBtn = this.scene.add.text(0, 100, '[ ENABLE PROTECTION ]', {
|
||||
fontSize: '20px',
|
||||
const enableBtn = uiScene.add.text(0, 120, '[ ENABLE PROTECTION ]', {
|
||||
fontSize: '24px',
|
||||
color: '#00ff00',
|
||||
backgroundColor: '#003300',
|
||||
padding: { x: 20, y: 10 }
|
||||
padding: { x: 30, y: 15 },
|
||||
fontStyle: 'bold'
|
||||
}).setOrigin(0.5);
|
||||
|
||||
enableBtn.setInteractive({ useHandCursor: true });
|
||||
enableBtn.on('pointerover', () => enableBtn.setScale(1.1));
|
||||
enableBtn.on('pointerout', () => enableBtn.setScale(1.0));
|
||||
enableBtn.on('pointerdown', () => {
|
||||
this.settings.photosensitivity = true;
|
||||
this.applySettings();
|
||||
@@ -327,12 +338,16 @@ class AccessibilitySystem {
|
||||
if (onContinue) onContinue();
|
||||
});
|
||||
|
||||
const continueBtn = this.scene.add.text(0, 150, '[ CONTINUE WITHOUT ]', {
|
||||
fontSize: '16px',
|
||||
color: '#888888'
|
||||
const continueBtn = uiScene.add.text(0, 180, '[ CONTINUE WITHOUT ]', {
|
||||
fontSize: '18px',
|
||||
color: '#888888',
|
||||
backgroundColor: '#222222',
|
||||
padding: { x: 20, y: 10 }
|
||||
}).setOrigin(0.5);
|
||||
|
||||
continueBtn.setInteractive({ useHandCursor: true });
|
||||
continueBtn.on('pointerover', () => continueBtn.setScale(1.1));
|
||||
continueBtn.on('pointerout', () => continueBtn.setScale(1.0));
|
||||
continueBtn.on('pointerdown', () => {
|
||||
warning.destroy();
|
||||
if (onContinue) onContinue();
|
||||
|
||||
Reference in New Issue
Block a user