Fix controller access to settings controls

This commit is contained in:
Alexander Sellite 2026-08-18 10:22:32 -04:00
parent 52dc2810ba
commit 173371e6fc
4 changed files with 86 additions and 1 deletions

View file

@ -63,7 +63,8 @@ func focus_reset_button() -> void:
func _on_reset_button_gui_input(event: InputEvent) -> void:
if (
event.is_action_pressed("ui_up")
event.is_action_pressed("ui_left")
or event.is_action_pressed("ui_up")
or event.is_action_pressed("ui_focus_prev")
):
return_to_settings_requested.emit()

View file

@ -206,6 +206,7 @@ func _populate_option_buttons() -> void:
func _connect_controls() -> void:
_apply_button.pressed.connect(_apply_settings)
_back_button.pressed.connect(close_panel)
_back_button.gui_input.connect(_on_back_button_gui_input)
_world_pixelation.item_selected.connect(
_on_world_pixelation_selected
)
@ -257,6 +258,16 @@ func _connect_controls() -> void:
)
func _on_back_button_gui_input(event: InputEvent) -> void:
if (
event.is_action_pressed("ui_right")
or event.is_action_pressed("ui_down")
or event.is_action_pressed("ui_focus_next")
):
crisp_reset_focus_requested.emit()
get_viewport().set_input_as_handled()
func _configure_style() -> void:
UtilityPageStyle.apply_page(self)
_main_panel.add_theme_stylebox_override(

View file

@ -77,6 +77,7 @@ unique_name_in_owner = true
custom_minimum_size = Vector2(180, 52)
layout_mode = 2
focus_mode = 2
focus_neighbor_bottom = NodePath("../../ContentPanel/ContentMargin/PageStack/AccessibilityPage/Grid/AutoClickToggle")
text = "accessibility"
script = ExtResource("3_tab")
@ -481,6 +482,8 @@ unique_name_in_owner = true
custom_minimum_size = Vector2(330, 52)
layout_mode = 2
focus_mode = 2
focus_neighbor_top = NodePath("../../../../../../TabBar/AccessibilityTab")
focus_neighbor_bottom = NodePath("../AutoClickIntervalSlider")
toggle_mode = true
text = "off"
@ -498,6 +501,8 @@ unique_name_in_owner = true
custom_minimum_size = Vector2(330, 52)
layout_mode = 2
focus_mode = 2
focus_neighbor_top = NodePath("../AutoClickToggle")
focus_neighbor_bottom = NodePath("../../../../../../FooterGroup/FooterLayout/Footer/ApplySettingsButton")
min_value = 0.1
max_value = 0.5
step = 0.01
@ -662,6 +667,7 @@ unique_name_in_owner = true
custom_minimum_size = Vector2(180, 44)
layout_mode = 2
focus_mode = 2
focus_neighbor_right = NodePath("../SettingsBackButton")
text = "apply"
[node name="SettingsBackButton" type="Button" parent="MainPanel/OuterMargin/Layout/FooterGroup/FooterLayout/Footer"]
@ -669,4 +675,5 @@ unique_name_in_owner = true
custom_minimum_size = Vector2(180, 44)
layout_mode = 2
focus_mode = 2
focus_neighbor_left = NodePath("../ApplySettingsButton")
text = "back"