From f2be8ca3d08f2bccafb5bc8d19520da33b734546 Mon Sep 17 00:00:00 2001 From: Thomas Richter Date: Thu, 5 Feb 2026 00:10:16 +0100 Subject: [PATCH] style: move fullscreen button to top-left corner --- src/scenes/HuntingScene.js | 4 ++-- src/utils/fullscreen.js | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/scenes/HuntingScene.js b/src/scenes/HuntingScene.js index d955376..cec826a 100644 --- a/src/scenes/HuntingScene.js +++ b/src/scenes/HuntingScene.js @@ -49,8 +49,8 @@ export default class HuntingScene extends Phaser.Scene { const shootMessage = this.isMobile ? 'Hunt whales! Tap to shoot harpoon.' : 'Hunt whales! Click or press SPACE to shoot harpoon.'; this.showMessage(shootMessage); - // Fullscreen button (positioned to avoid HUD) - createFullscreenButton(this, { x: 30, y: 580 }); + // Fullscreen button + createFullscreenButton(this); } update() { diff --git a/src/utils/fullscreen.js b/src/utils/fullscreen.js index 2189de0..5a998d0 100644 --- a/src/utils/fullscreen.js +++ b/src/utils/fullscreen.js @@ -6,12 +6,12 @@ import { fontSize } from './responsive.js'; * Create a fullscreen toggle button in the corner of the screen * @param {Phaser.Scene} scene - The Phaser scene to add the button to * @param {object} options - Optional configuration - * @param {number} options.x - X position (default: 770) - * @param {number} options.y - Y position (default: 580) + * @param {number} options.x - X position (default: 30) + * @param {number} options.y - Y position (default: 20) */ export function createFullscreenButton(scene, options = {}) { - const x = options.x || 770; - const y = options.y || 580; + const x = options.x || 30; + const y = options.y || 20; // Button background const btn = scene.add.rectangle(x, y, 50, 30, 0x000000, 0.6);