reimagine the control scheme

This commit is contained in:
2025-09-25 09:35:40 +04:00
parent 742e4251fb
commit 301d858ea5
9 changed files with 126 additions and 38 deletions

View File

@@ -62,8 +62,8 @@ func _on_back_button_pressed() -> void:
GameManager.exit_to_main_menu()
func _input(event: InputEvent) -> void:
if event.is_action_pressed("ui_accept") and Input.is_action_pressed("ui_select"):
# Debug: Switch to clickomania when Space+Enter pressed together
if event.is_action_pressed("action_south") and Input.is_action_pressed("action_north"):
# Debug: Switch to clickomania when primary+secondary actions pressed together
if current_gameplay_mode == "match3":
set_gameplay_mode("clickomania")
DebugManager.log_debug("Switched to clickomania gameplay", "Game")

View File

@@ -301,7 +301,7 @@ func _debug_scene_structure() -> void:
func _input(event: InputEvent) -> void:
# Debug key to reset all visual states
if event.is_action_pressed("ui_menu_toggle") and DebugManager.is_debug_enabled():
if event.is_action_pressed("action_east") and DebugManager.is_debug_enabled():
reset_all_visual_states()
return
@@ -321,7 +321,7 @@ func _input(event: InputEvent) -> void:
elif event.is_action_pressed("move_right"):
_move_cursor(Vector2i.RIGHT)
keyboard_navigation_enabled = true
elif event.is_action_pressed("select_gem"):
elif event.is_action_pressed("action_south"):
if keyboard_navigation_enabled:
_select_tile_at_cursor()

View File

@@ -181,5 +181,3 @@ func _ready() -> void:
active_gem_types = [0, 1, 2, 3, 4] # Default to first 5 gems
_set_tile_type(tile_type)

View File

@@ -7,8 +7,8 @@ func _ready():
update_text()
func _input(event):
if event.is_action_pressed("any_key") or event is InputEventScreenTouch:
DebugManager.log_debug("Any key pressed: " + str(event), "PressAnyKey")
if event.is_action_pressed("action_south") or event is InputEventScreenTouch or (event is InputEventMouseButton and event.button_index == MOUSE_BUTTON_LEFT and event.pressed):
DebugManager.log_debug("Action pressed: " + str(event), "PressAnyKey")
any_key_pressed.emit()
get_viewport().set_input_as_handled()

View File

@@ -1,9 +1,9 @@
[gd_scene load_steps=5 format=3 uid="uid://ci2gk11211n0d"]
[ext_resource type="Script" uid="uid://b0uwk2jlm6g08" path="res://scenes/main/Main.gd" id="1_0wfyh"]
[ext_resource type="Script" uid="uid://rvuchiy0guv3" path="res://scenes/main/Main.gd" id="1_0wfyh"]
[ext_resource type="PackedScene" uid="uid://gbe1jarrwqsi" path="res://scenes/main/PressAnyKeyScreen.tscn" id="1_o5qli"]
[ext_resource type="Texture2D" uid="uid://c8y6tlvcgh2gn" path="res://assets/textures/backgrounds/beanstalk-dark.webp" id="2_sugp2"]
[ext_resource type="PackedScene" path="res://scenes/ui/DebugToggle.tscn" id="4_v7g8d"]
[ext_resource type="PackedScene" uid="uid://df2b4wn8j6cxl" path="res://scenes/ui/DebugToggle.tscn" id="4_v7g8d"]
[node name="main" type="Control"]
layout_mode = 3

View File

@@ -69,8 +69,8 @@ func _exit_settings():
back_to_main_menu.emit()
func _input(event):
if event.is_action_pressed("ui_cancel") or event.is_action_pressed("ui_menu_toggle"):
DebugManager.log_debug("ESC pressed in settings", "Settings")
if event.is_action_pressed("action_east") or event.is_action_pressed("pause_menu"):
DebugManager.log_debug("Cancel/back action pressed in settings", "Settings")
_exit_settings()
get_viewport().set_input_as_handled()