Add Option 3 touch camera: gesture hold and button toggle modes
- Settings: new touch_camera_mode ("gesture"|"buttons"), persisted to camera section
- GameScreen: CamGestureTimer (3 s), CamCtrlPanel with Orbit/Pan/Zoom toggle buttons
- game_screen: gesture timer fires orbit/pan/zoom after 3-second stationary hold;
button mode shows on-screen toggles; single-finger drag now gated behind active mode
- InGameSettings: Camera Controls section with Touch Camera OptionButton
Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
This commit is contained in:
@@ -14,6 +14,7 @@ const SECTION := "audio"
|
||||
const SECTION_GAMEPLAY := "gameplay"
|
||||
const SECTION_VISUAL := "visual"
|
||||
const SECTION_HIGHLIGHTS := "highlights"
|
||||
const SECTION_CAMERA := "camera"
|
||||
|
||||
## Audio bus names as configured in the Godot project.
|
||||
const BUS_MUSIC := "Music"
|
||||
@@ -73,6 +74,15 @@ var skybox_mode : String = "live" :
|
||||
_save()
|
||||
settings_changed.emit()
|
||||
|
||||
## How touch camera control is activated.
|
||||
## "gesture" — hold finger(s) still for 3 s to activate (1 = orbit, 2 = zoom, 3 = pan).
|
||||
## "buttons" — tap the on-screen Orbit / Pan / Zoom toggle buttons.
|
||||
var touch_camera_mode : String = "gesture" :
|
||||
set(v):
|
||||
touch_camera_mode = v
|
||||
_save()
|
||||
settings_changed.emit()
|
||||
|
||||
## Per-type highlight texture URL overrides entered by the player.
|
||||
## Keys: "movement", "attack", "ability", "terramorpha", "selector"
|
||||
## Value: URL string, or "" to use the server default.
|
||||
@@ -147,6 +157,7 @@ func _load() -> void:
|
||||
sfx_muted = bool(cfg.get_value(SECTION, "sfx_muted", false))
|
||||
camera_follow_unit = bool(cfg.get_value(SECTION_GAMEPLAY, "camera_follow_unit", true))
|
||||
click_to_focus_camera = bool(cfg.get_value(SECTION_GAMEPLAY, "click_to_focus_camera", false))
|
||||
touch_camera_mode = str(cfg.get_value(SECTION_CAMERA, "touch_camera_mode", "gesture"))
|
||||
skybox_mode = str(cfg.get_value(SECTION_VISUAL, "skybox_mode", "live"))
|
||||
var raw_overrides = cfg.get_value(SECTION_HIGHLIGHTS, "highlight_overrides", {})
|
||||
if raw_overrides is Dictionary:
|
||||
@@ -161,6 +172,7 @@ func _save() -> void:
|
||||
cfg.set_value(SECTION, "sfx_muted", sfx_muted)
|
||||
cfg.set_value(SECTION_GAMEPLAY, "camera_follow_unit", camera_follow_unit)
|
||||
cfg.set_value(SECTION_GAMEPLAY, "click_to_focus_camera", click_to_focus_camera)
|
||||
cfg.set_value(SECTION_CAMERA, "touch_camera_mode", touch_camera_mode)
|
||||
cfg.set_value(SECTION_VISUAL, "skybox_mode", skybox_mode)
|
||||
cfg.set_value(SECTION_HIGHLIGHTS, "highlight_overrides", highlight_overrides)
|
||||
cfg.save(SAVE_PATH)
|
||||
|
||||
Reference in New Issue
Block a user