feat: add fullscreen mode toggle button

- Add src/utils/fullscreen.js with createFullscreenButton() helper
- Fullscreen button appears in bottom-right corner of all scenes
- Click to toggle fullscreen mode
- Uses Phaser's built-in scale manager

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Thomas Richter
2026-02-05 00:05:03 +01:00
parent 1154a78908
commit be41f912a2
6 changed files with 95 additions and 0 deletions

View File

@@ -1,5 +1,6 @@
import Phaser from 'phaser';
import { fontSize } from '../utils/responsive.js';
import { createFullscreenButton } from '../utils/fullscreen.js';
export default class TransitionScene extends Phaser.Scene {
constructor() {
@@ -100,6 +101,9 @@ export default class TransitionScene extends Phaser.Scene {
// Proceed to next scene
this.scene.start(this.nextScene, { inventory: this.inventory });
});
// Fullscreen button
createFullscreenButton(this);
}
getDestinationContent(destination) {