Fix scaling and controls for desktop displays
- Remove max scale bounds to support unlimited display sizes (4K, 8K, ultrawide) - Remove duplicate width/height from scale config to fix desktop scaling - Fix HuntingScene to default to mouse mode on all platforms (was incorrectly starting in keyboard mode on desktop) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -22,18 +22,11 @@ const config = {
|
|||||||
scale: {
|
scale: {
|
||||||
mode: Phaser.Scale.FIT,
|
mode: Phaser.Scale.FIT,
|
||||||
autoCenter: Phaser.Scale.CENTER_BOTH,
|
autoCenter: Phaser.Scale.CENTER_BOTH,
|
||||||
width: 800,
|
|
||||||
height: 600,
|
|
||||||
min: {
|
min: {
|
||||||
width: 320,
|
width: 320,
|
||||||
height: 240
|
height: 240
|
||||||
},
|
},
|
||||||
max: {
|
fullscreenTarget: 'game-container'
|
||||||
width: 1920,
|
|
||||||
height: 1080
|
|
||||||
},
|
|
||||||
fullscreenTarget: 'game-container',
|
|
||||||
expandParent: false
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -22,8 +22,8 @@ export default class HuntingScene extends Phaser.Scene {
|
|||||||
// Detect mobile device
|
// Detect mobile device
|
||||||
this.isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
this.isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
||||||
|
|
||||||
// Default to touch on mobile, keyboard on desktop
|
// Default to mouse/touch mode on all platforms
|
||||||
this.useKeyboard = !this.isMobile;
|
this.useKeyboard = false;
|
||||||
|
|
||||||
// Ocean background
|
// Ocean background
|
||||||
this.add.rectangle(400, 300, 800, 600, 0x1e5a8e);
|
this.add.rectangle(400, 300, 800, 600, 0x1e5a8e);
|
||||||
|
|||||||
Reference in New Issue
Block a user