exit from game using gamepad
This commit is contained in:
@@ -178,6 +178,12 @@ quit_game={
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":true,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194335,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
ui_back={
|
||||
"deadzone": 0.2,
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194305,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":6,"pressure":0.0,"pressed":false,"script":null)
|
||||
]
|
||||
}
|
||||
|
||||
[internationalization]
|
||||
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -119,7 +119,7 @@ func change_value(direction: int):
|
||||
DebugManager.log_info("Value changed to: " + new_value + " (index: " + str(current_index) + ")", "ValueStepper")
|
||||
|
||||
## Override this method for custom value application logic
|
||||
func _apply_value_change(new_value: String, index: int):
|
||||
func _apply_value_change(new_value: String, _index: int):
|
||||
match data_source:
|
||||
"language":
|
||||
SettingsManager.set_setting("language", new_value)
|
||||
|
||||
Reference in New Issue
Block a user