temporary fix for #210 and implementing #205: restructuring menu and adding stage management override to a11y settings

This commit is contained in:
betalars 2025-08-15 00:22:13 +02:00
parent c892bb93e3
commit b5ffb06c79
8 changed files with 36 additions and 22 deletions

View File

@ -203,40 +203,40 @@ fill = 1
fill_from = Vector2(0.538462, 0.491453)
fill_to = Vector2(1.3, -0.3)
[sub_resource type="InputEventKey" id="InputEventKey_jirkf"]
[sub_resource type="InputEventKey" id="InputEventKey_kt5p7"]
device = -1
physical_keycode = 87
unicode = 119
[sub_resource type="InputEventJoypadMotion" id="InputEventJoypadMotion_kt5p7"]
[sub_resource type="InputEventJoypadMotion" id="InputEventJoypadMotion_mivr6"]
device = -1
axis = 1
axis_value = -1.0
[sub_resource type="InputEventKey" id="InputEventKey_mivr6"]
[sub_resource type="InputEventKey" id="InputEventKey_52c3j"]
device = -1
physical_keycode = 65
unicode = 97
[sub_resource type="InputEventJoypadMotion" id="InputEventJoypadMotion_52c3j"]
[sub_resource type="InputEventJoypadMotion" id="InputEventJoypadMotion_b7q2n"]
device = -1
axis_value = -1.0
[sub_resource type="InputEventKey" id="InputEventKey_b7q2n"]
[sub_resource type="InputEventKey" id="InputEventKey_qhf78"]
device = -1
physical_keycode = 68
unicode = 100
[sub_resource type="InputEventJoypadMotion" id="InputEventJoypadMotion_qhf78"]
[sub_resource type="InputEventJoypadMotion" id="InputEventJoypadMotion_gatj6"]
device = -1
axis_value = 1.0
[sub_resource type="InputEventKey" id="InputEventKey_gatj6"]
[sub_resource type="InputEventKey" id="InputEventKey_ol51q"]
device = -1
physical_keycode = 83
unicode = 115
[sub_resource type="InputEventJoypadMotion" id="InputEventJoypadMotion_ol51q"]
[sub_resource type="InputEventJoypadMotion" id="InputEventJoypadMotion_2rqk2"]
device = -1
axis = 1
axis_value = 1.0
@ -466,6 +466,10 @@ text = "show Content Notes"
layout_mode = 2
text = "reduce motion and flickering"
[node name="A11Y" type="Button" parent="Menu/VBoxContainer"]
layout_mode = 2
text = "More Options"
[node name="Label3" type="Label" parent="Menu/VBoxContainer"]
layout_mode = 2
theme_type_variation = &"HeaderMedium"
@ -500,10 +504,6 @@ popup/item_1/id = 2
layout_mode = 2
text = "Privacy Info"
[node name="A11Y" type="Button" parent="Menu/VBoxContainer"]
layout_mode = 2
text = "Accessibility"
[node name="Control" type="Control" parent="Menu"]
layout_mode = 1
anchors_preset = 2
@ -525,7 +525,7 @@ stretch_mode = 5
script = ExtResource("5_6w5b4")
action = "player_forwards"
icon = 4
events = Array[InputEvent]([SubResource("InputEventKey_jirkf"), SubResource("InputEventJoypadMotion_kt5p7")])
events = Array[InputEvent]([SubResource("InputEventKey_kt5p7"), SubResource("InputEventJoypadMotion_mivr6")])
metadata/_custom_type_script = "uid://bbs1u7ojno7xo"
[node name="ActionPrompt2" type="TextureRect" parent="Menu/Control"]
@ -540,7 +540,7 @@ stretch_mode = 5
script = ExtResource("5_6w5b4")
action = "player_left"
icon = 4
events = Array[InputEvent]([SubResource("InputEventKey_mivr6"), SubResource("InputEventJoypadMotion_52c3j")])
events = Array[InputEvent]([SubResource("InputEventKey_52c3j"), SubResource("InputEventJoypadMotion_b7q2n")])
metadata/_custom_type_script = "uid://bbs1u7ojno7xo"
[node name="ActionPrompt4" type="TextureRect" parent="Menu/Control"]
@ -555,7 +555,7 @@ stretch_mode = 5
script = ExtResource("5_6w5b4")
action = "player_right"
icon = 4
events = Array[InputEvent]([SubResource("InputEventKey_b7q2n"), SubResource("InputEventJoypadMotion_qhf78")])
events = Array[InputEvent]([SubResource("InputEventKey_qhf78"), SubResource("InputEventJoypadMotion_gatj6")])
metadata/_custom_type_script = "uid://bbs1u7ojno7xo"
[node name="ActionPrompt3" type="TextureRect" parent="Menu/Control"]
@ -570,7 +570,7 @@ stretch_mode = 5
script = ExtResource("5_6w5b4")
action = "player_backwards"
icon = 4
events = Array[InputEvent]([SubResource("InputEventKey_gatj6"), SubResource("InputEventJoypadMotion_ol51q")])
events = Array[InputEvent]([SubResource("InputEventKey_ol51q"), SubResource("InputEventJoypadMotion_2rqk2")])
metadata/_custom_type_script = "uid://bbs1u7ojno7xo"
[node name="Label" type="Label" parent="Menu/Control"]
@ -727,9 +727,9 @@ libraries = {
[connection signal="pressed" from="Menu/VBoxContainer2/PressStart" to="." method="_on_start_button_pressed"]
[connection signal="toggled" from="Menu/VBoxContainer/CNBox" to="." method="_on_cn_box_toggled"]
[connection signal="toggled" from="Menu/VBoxContainer/MotionBox" to="." method="_on_motion_box_toggled"]
[connection signal="pressed" from="Menu/VBoxContainer/A11Y" to="." method="show_accessibility_settings"]
[connection signal="item_selected" from="Menu/VBoxContainer/SpeechButton" to="." method="_on_speech_button_item_selected"]
[connection signal="item_selected" from="Menu/VBoxContainer/TextButton" to="." method="_on_text_button_item_selected"]
[connection signal="pressed" from="Menu/VBoxContainer/Button" to="Menu/PrivacyPanel" method="show"]
[connection signal="pressed" from="Menu/VBoxContainer/A11Y" to="." method="show_accessibility_settings"]
[connection signal="leave_stage" from="Menu/PrivacyPanel/PrivacyAndDataProtection" to="Menu/PrivacyPanel" method="hide"]
[connection signal="pressed" from="PauseContainer/PauseMenu/VBoxContainer/A11Y2" to="." method="show_accessibility_settings"]

View File

@ -571,3 +571,4 @@ To see its beauty. It helped a lot.,To see its beauty. It helped a lot.,Weil es
"I was unsure at first, but signed up for it nonetheless.","I was unsure at first, but signed up for it nonetheless.","Ich war mir erst nicht sicher, aber hab mich dann doch eingetraten.",,,
"This is where I understood that Lukas never asked me, that I froze because he jumped me, and that I am not alone.","This is where I understood that Lukas never asked me, that I froze because he jumped me, and that I am not alone.","Da habe ich verstanden, dass Lukas mich nie gefragt hatte, dass ich eingefroren bin, weil er mich überumpelt hat, dass er hätte mitbekommen müssen, wie ich weggetreten bin und, dass ich damit wirklich nicht alleine bin.",,,
"It still took me some time to fully accept, that I was not to blame.","It still took me some time to fully accept, that I was not to blame.","Es hat trotzdem noch eine Weile gebraucht, bis die Schuldgefühle weg waren.",,,
More Options,More Options,Mehr Optionen,,,

1 keys en de es ja notes
571
572
573
574

View File

@ -6,8 +6,21 @@ signal leave_stage
var has_stage:bool = false:
set(stage):
has_stage = stage
if is_node_ready() and has_stage:
is_active = has_stage
# used to override state management in case menu is being used while game is paused.
var is_active:bool = false:
set(active):
if is_node_ready() and active:
screenreader_check.grab_focus()
if not active and is_active:
leave_stage.emit()
if has_stage:
State.leave_stage(self)
is_active = active
if (is_active and not has_stage) and not get_tree().paused:
push_warning("%s has been set active but not been given the stage while the tree is unpaused!")
@export var is_in_beginning: bool = false
@ -58,10 +71,10 @@ func update_ui_from_state():
scale_slider.value = State.ui_scaling
func _on_save_button_pressed() -> void:
leave_stage.emit()
is_active = false
State.save_settings()
State.leave_stage(self)
func _input(event: InputEvent) -> void:
if event.is_action_pressed("ui_cancel") and has_stage:
State.leave_stage(self)
if event.is_action_pressed("ui_cancel") and is_active:
is_active = false
get_viewport().set_input_as_handled()