Release 0.2.0: device-aware controls, spear, settings, shaders

Show touch controls only on touch platforms and keyboard hints only on
desktop, via a shared Controls.use_touch_ui() gate (is_touchscreen_available
is unreliable with emulate_touch_from_mouse). Bumps version to 0.2.0.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-08-09 19:39:37 +03:00
parent ce6f3d7075
commit 56593c58cf
35 changed files with 1885 additions and 242 deletions
+16 -1
View File
@@ -15,8 +15,8 @@ const REBINDABLE_ACTIONS: PackedStringArray = [
&"move_left",
&"move_right",
&"ability_kick",
&"ability_slam",
&"ability_dash",
&"ability_slam",
&"ability_roll",
]
@@ -25,6 +25,21 @@ func _ready() -> void:
load_saved()
## Whether to drive the game with the on-screen touch UI (joystick + buttons)
## instead of keyboard hints. DisplayServer.is_touchscreen_available() can't be
## used here: `emulate_touch_from_mouse` (on for desktop testing) makes it report
## true on every desktop. Gate on the actual runtime platform instead — real
## mobile/native and mobile web browsers — plus the DP force flag for testing.
func use_touch_ui() -> bool:
if DP.b("force_touch_controls"):
return true
return (
OS.has_feature("mobile")
or OS.has_feature("web_android")
or OS.has_feature("web_ios")
)
## Returns the first keyboard event bound to an action, or null.
func get_key_event(action: StringName) -> InputEventKey:
for event: InputEvent in InputMap.action_get_events(action):