exit from game using gamepad

This commit is contained in:
2025-09-26 00:57:20 +04:00
parent ca233f4171
commit 3e960a955c
3 changed files with 11 additions and 2 deletions

View File

@@ -92,7 +92,10 @@ func _on_back_button_pressed() -> void:
GameManager.exit_to_main_menu()
func _input(event: InputEvent) -> void:
if event.is_action_pressed("action_south") and Input.is_action_pressed("action_north"):
if event.is_action_pressed("ui_back"):
# Handle gamepad/keyboard back action - same as back button
_on_back_button_pressed()
elif 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")