Merge commit '522080d52e14899d1d18e41489f45e86f9a6bf4e' into alpha

This commit is contained in:
betalars 2023-07-19 13:55:26 +02:00
commit 0b60ce6eba
2 changed files with 185 additions and 19 deletions

View File

@ -8,9 +8,107 @@
[sub_resource type="GDScript" id="GDScript_a78qq"] [sub_resource type="GDScript" id="GDScript_a78qq"]
script/source = "extends Panel script/source = "extends Panel
@onready var show_navigation_buttons = $\"CenterContainer/PanelContainer/VBoxContainer/TabContainer/physical Accessibility/Container2/margin/show nav ui\"
func starting(): func starting():
$\"CenterContainer/PanelContainer/VBoxContainer/TabContainer/physical Accessibility/navbuttons/Next\".grab_focus() $\"CenterContainer/PanelContainer/VBoxContainer/TabContainer/physical Accessibility/navbuttons/Next\".grab_focus()
# toggle for disable rendering
func _on_disable_rendering_toggled(button_pressed):
State.disable_rendering = button_pressed
# toggle for simplified controls
func _on_simplified_controls_toggled(button_pressed):
State.simplified_navigation = button_pressed # this is how you reach the global state
show_navigation_buttons.disabled = not button_pressed # if simpl. controls was toggled - disabled = false
# toggle for show nav buttons
func _on_show_nav_ui_toggled(button_pressed):
State.show_navigation_buttons = button_pressed
# toggle streaming notes
func _on_streaming_notes_toggled(button_pressed):
State.streaming_content_notes = button_pressed
# select font
# still needs handling to change the style
func _on_font_style_selected(index):
match index:
0:
print_debug(\"messy handwriting selected\")
#self.theme.set_font(\"NanumBrushScript.ttf\")
return
1:
print_debug(\"easy handwriting selected\")
#owner.theme.set_font(\"NanumPenScript.ttf\")
return
2:
print_debug(\"legible serif selected\")
#owner.theme.set_font(\"Eczar-VariableFont_wght.ttf\")
return
3:
print_debug(\"hyperlegible sans selected\")
#owner.theme.set_font(\"AtkinsonHyperlegible.ttf\")
return
4:
print_debug(\"system front selected\")
#owner.theme.set_font(SystemFont.fallbacks[0])
return
func _on_subtitle_option_selected(index):
match index:
0:
State.enable_subtitles = false
State.enable_closed_caption = false
1:
State.enable_subtitles = true
State.enable_closed_caption = false
2:
State.enable_subtitles = true
State.enable_closed_caption = true
print_debug(State.print_settings())
# Volume Settings
func _on_mute_soundtrack_toggled(button_pressed):
AudioServer.set_bus_mute(AudioServer.get_bus_index(\"music\"),button_pressed)
func _on_mute_sfx_toggled(button_pressed):
AudioServer.set_bus_mute(AudioServer.get_bus_index(\"sfx\"),button_pressed)
func _on_music_volume_changed(value):
AudioServer.set_bus_volume_db(AudioServer.get_bus_index(\"music\"), linear_to_db(value))
func _on_sfx_volume_changed(value):
AudioServer.set_bus_volume_db(AudioServer.get_bus_index(\"sfx\"), linear_to_db(value))
func _on_text_volume_changed(value):
AudioServer.set_bus_volume_db(AudioServer.get_bus_index(\"text\"), linear_to_db(value))
func _on_master_volume_changed(value):
AudioServer.set_bus_volume_db(AudioServer.get_bus_index(\"Master\"), linear_to_db(value))
# Final Page
func _on_content_notes_toggled(button_pressed):
State.show_content_notes = button_pressed
func _on_provide_summaries_toggled(button_pressed):
State.provide_summaries = button_pressed
func _on_allow_skipping_toggled(button_pressed):
State.allow_skipping = button_pressed
" "
[sub_resource type="GDScript" id="GDScript_ia432"] [sub_resource type="GDScript" id="GDScript_ia432"]
@ -18,6 +116,9 @@ script/source = "extends TabContainer
var focus_list: Array var focus_list: Array
@onready var disable_rendering = $\"physical Accessibility/Container2/margin2/show nav buttons\"
@onready var simplified_controls = $\"physical Accessibility/Container2/simplified controls\"
func _ready(): func _ready():
for child in get_children(): for child in get_children():
focus_list.append(_find_selectable_in(child)) focus_list.append(_find_selectable_in(child))
@ -58,6 +159,14 @@ func previous():
focus_list[current_tab].grab_focus() focus_list[current_tab].grab_focus()
else: else:
current_tab -= 1 current_tab -= 1
func _on_screenreader_toggled(button_pressed):
State.screen_reader = button_pressed # this is how you reach the global state
disable_rendering.disabled = not button_pressed # if screenreader was toggled - disabled = false
simplified_controls.button_pressed = button_pressed
State.simplified_navigation = button_pressed
" "
[sub_resource type="GDScript" id="GDScript_v567h"] [sub_resource type="GDScript" id="GDScript_v567h"]
@ -148,7 +257,6 @@ layout_mode = 2
[node name="Screenreader" type="CheckBox" parent="CenterContainer/PanelContainer/VBoxContainer/TabContainer/physical Accessibility/Container2"] [node name="Screenreader" type="CheckBox" parent="CenterContainer/PanelContainer/VBoxContainer/TabContainer/physical Accessibility/Container2"]
layout_mode = 2 layout_mode = 2
button_pressed = true
text = "activate Screenreader" text = "activate Screenreader"
script = SubResource("GDScript_v567h") script = SubResource("GDScript_v567h")
@ -170,7 +278,6 @@ layout_mode = 2
[node name="show nav ui" type="CheckBox" parent="CenterContainer/PanelContainer/VBoxContainer/TabContainer/physical Accessibility/Container2/margin"] [node name="show nav ui" type="CheckBox" parent="CenterContainer/PanelContainer/VBoxContainer/TabContainer/physical Accessibility/Container2/margin"]
layout_mode = 2 layout_mode = 2
disabled = true disabled = true
button_pressed = true
text = "show Navigation Buttons" text = "show Navigation Buttons"
[node name="GridContainer" type="GridContainer" parent="CenterContainer/PanelContainer/VBoxContainer/TabContainer/physical Accessibility/Container2"] [node name="GridContainer" type="GridContainer" parent="CenterContainer/PanelContainer/VBoxContainer/TabContainer/physical Accessibility/Container2"]
@ -206,7 +313,7 @@ layout_mode = 2
text = "Subtitles:" text = "Subtitles:"
[node name="VSeparator2" type="VSeparator" parent="CenterContainer/PanelContainer/VBoxContainer/TabContainer/physical Accessibility/Container2/GridContainer"] [node name="VSeparator2" type="VSeparator" parent="CenterContainer/PanelContainer/VBoxContainer/TabContainer/physical Accessibility/Container2/GridContainer"]
custom_minimum_size = Vector2(30, 0) custom_minimum_size = Vector2(30, 60)
layout_mode = 2 layout_mode = 2
[node name="ItemList2" type="OptionButton" parent="CenterContainer/PanelContainer/VBoxContainer/TabContainer/physical Accessibility/Container2/GridContainer"] [node name="ItemList2" type="OptionButton" parent="CenterContainer/PanelContainer/VBoxContainer/TabContainer/physical Accessibility/Container2/GridContainer"]
@ -221,6 +328,18 @@ popup/item_1/id = 1
popup/item_2/text = "text and audio" popup/item_2/text = "text and audio"
popup/item_2/id = 2 popup/item_2/id = 2
[node name="Label3" type="Label" parent="CenterContainer/PanelContainer/VBoxContainer/TabContainer/physical Accessibility/Container2/GridContainer"]
layout_mode = 2
text = "UI scale:"
[node name="VSeparator3" type="VSeparator" parent="CenterContainer/PanelContainer/VBoxContainer/TabContainer/physical Accessibility/Container2/GridContainer"]
custom_minimum_size = Vector2(30, 60)
layout_mode = 2
[node name="HSlider" type="HSlider" parent="CenterContainer/PanelContainer/VBoxContainer/TabContainer/physical Accessibility/Container2/GridContainer"]
custom_minimum_size = Vector2(0, 60)
layout_mode = 2
[node name="navbuttons" type="VSplitContainer" parent="CenterContainer/PanelContainer/VBoxContainer/TabContainer/physical Accessibility"] [node name="navbuttons" type="VSplitContainer" parent="CenterContainer/PanelContainer/VBoxContainer/TabContainer/physical Accessibility"]
layout_mode = 2 layout_mode = 2
size_flags_horizontal = 4 size_flags_horizontal = 4
@ -270,7 +389,7 @@ text = "Music"
layout_mode = 2 layout_mode = 2
size_flags_horizontal = 3 size_flags_horizontal = 3
size_flags_vertical = 4 size_flags_vertical = 4
max_value = 2.0 max_value = 1.0
step = 0.05 step = 0.05
value = 1.0 value = 1.0
ticks_on_borders = true ticks_on_borders = true
@ -284,9 +403,9 @@ text = "Sounds"
layout_mode = 2 layout_mode = 2
size_flags_horizontal = 3 size_flags_horizontal = 3
size_flags_vertical = 4 size_flags_vertical = 4
max_value = 2.0 max_value = 1.0
step = 0.05 step = 0.05
value = 1.0 value = 0.5
[node name="Label4" type="Label" parent="CenterContainer/PanelContainer/VBoxContainer/TabContainer/Audio Settings/VBoxContainer/GridContainer"] [node name="Label4" type="Label" parent="CenterContainer/PanelContainer/VBoxContainer/TabContainer/Audio Settings/VBoxContainer/GridContainer"]
layout_mode = 2 layout_mode = 2
@ -297,9 +416,22 @@ text = "Speech
layout_mode = 2 layout_mode = 2
size_flags_horizontal = 3 size_flags_horizontal = 3
size_flags_vertical = 4 size_flags_vertical = 4
max_value = 2.0 max_value = 1.0
step = 0.05 step = 0.05
value = 1.0 value = 0.5
[node name="Label5" type="Label" parent="CenterContainer/PanelContainer/VBoxContainer/TabContainer/Audio Settings/VBoxContainer/GridContainer"]
layout_mode = 2
text = "Sum
"
[node name="Sum" type="HSlider" parent="CenterContainer/PanelContainer/VBoxContainer/TabContainer/Audio Settings/VBoxContainer/GridContainer"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 4
max_value = 1.0
step = 0.05
value = 0.5
[node name="Audio Sliders" type="HBoxContainer" parent="CenterContainer/PanelContainer/VBoxContainer/TabContainer/Audio Settings/VBoxContainer"] [node name="Audio Sliders" type="HBoxContainer" parent="CenterContainer/PanelContainer/VBoxContainer/TabContainer/Audio Settings/VBoxContainer"]
layout_mode = 2 layout_mode = 2
@ -449,6 +581,10 @@ text = "show content notes relevant to the current context"
layout_mode = 2 layout_mode = 2
text = "prompt me with content notes before playing a scene" text = "prompt me with content notes before playing a scene"
[node name="CheckBox3" type="CheckBox" parent="CenterContainer/PanelContainer/VBoxContainer/TabContainer/Content Notes/ScrollContainer/Content Notes/VBoxContainer5/VBoxContainer"]
layout_mode = 2
text = "I would like to be able to skip scenes and get a summary."
[node name="navbuttons" type="VSplitContainer" parent="CenterContainer/PanelContainer/VBoxContainer/TabContainer/Content Notes"] [node name="navbuttons" type="VSplitContainer" parent="CenterContainer/PanelContainer/VBoxContainer/TabContainer/Content Notes"]
layout_mode = 2 layout_mode = 2
size_flags_horizontal = 4 size_flags_horizontal = 4
@ -533,13 +669,29 @@ grow_horizontal = 2
grow_vertical = 2 grow_vertical = 2
text = "I stream this game, please show content notes." text = "I stream this game, please show content notes."
[connection signal="toggled" from="CenterContainer/PanelContainer/VBoxContainer/TabContainer/physical Accessibility/Container2/Screenreader" to="CenterContainer/PanelContainer/VBoxContainer/TabContainer" method="_on_screenreader_toggled"]
[connection signal="toggled" from="CenterContainer/PanelContainer/VBoxContainer/TabContainer/physical Accessibility/Container2/margin2/show nav buttons" to="." method="_on_disable_rendering_toggled"]
[connection signal="toggled" from="CenterContainer/PanelContainer/VBoxContainer/TabContainer/physical Accessibility/Container2/simplified controls" to="." method="_on_simplified_controls_toggled"]
[connection signal="toggled" from="CenterContainer/PanelContainer/VBoxContainer/TabContainer/physical Accessibility/Container2/margin/show nav ui" to="." method="_on_show_nav_ui_toggled"]
[connection signal="item_selected" from="CenterContainer/PanelContainer/VBoxContainer/TabContainer/physical Accessibility/Container2/GridContainer/ItemList" to="." method="_on_font_style_selected"]
[connection signal="item_selected" from="CenterContainer/PanelContainer/VBoxContainer/TabContainer/physical Accessibility/Container2/GridContainer/ItemList2" to="." method="_on_subtitle_option_selected"]
[connection signal="pressed" from="CenterContainer/PanelContainer/VBoxContainer/TabContainer/physical Accessibility/navbuttons/Next" to="CenterContainer/PanelContainer/VBoxContainer/TabContainer" method="next"] [connection signal="pressed" from="CenterContainer/PanelContainer/VBoxContainer/TabContainer/physical Accessibility/navbuttons/Next" to="CenterContainer/PanelContainer/VBoxContainer/TabContainer" method="next"]
[connection signal="pressed" from="CenterContainer/PanelContainer/VBoxContainer/TabContainer/physical Accessibility/navbuttons/previous" to="CenterContainer/PanelContainer/VBoxContainer/TabContainer" method="previous"] [connection signal="pressed" from="CenterContainer/PanelContainer/VBoxContainer/TabContainer/physical Accessibility/navbuttons/previous" to="CenterContainer/PanelContainer/VBoxContainer/TabContainer" method="previous"]
[connection signal="toggled" from="CenterContainer/PanelContainer/VBoxContainer/TabContainer/Audio Settings/VBoxContainer/CheckBox" to="." method="_on_mute_soundtrack_toggled"]
[connection signal="toggled" from="CenterContainer/PanelContainer/VBoxContainer/TabContainer/Audio Settings/VBoxContainer/CheckBox2" to="." method="_on_mute_sfx_toggled"]
[connection signal="value_changed" from="CenterContainer/PanelContainer/VBoxContainer/TabContainer/Audio Settings/VBoxContainer/GridContainer/Music" to="." method="_on_music_volume_changed"]
[connection signal="value_changed" from="CenterContainer/PanelContainer/VBoxContainer/TabContainer/Audio Settings/VBoxContainer/GridContainer/Sounds" to="." method="_on_sfx_volume_changed"]
[connection signal="value_changed" from="CenterContainer/PanelContainer/VBoxContainer/TabContainer/Audio Settings/VBoxContainer/GridContainer/Speech" to="." method="_on_text_volume_changed"]
[connection signal="value_changed" from="CenterContainer/PanelContainer/VBoxContainer/TabContainer/Audio Settings/VBoxContainer/GridContainer/Sum" to="." method="_on_master_volume_changed"]
[connection signal="pressed" from="CenterContainer/PanelContainer/VBoxContainer/TabContainer/Audio Settings/navbuttons/Next" to="CenterContainer/PanelContainer/VBoxContainer/TabContainer" method="next"] [connection signal="pressed" from="CenterContainer/PanelContainer/VBoxContainer/TabContainer/Audio Settings/navbuttons/Next" to="CenterContainer/PanelContainer/VBoxContainer/TabContainer" method="next"]
[connection signal="pressed" from="CenterContainer/PanelContainer/VBoxContainer/TabContainer/Audio Settings/navbuttons/previous" to="CenterContainer/PanelContainer/VBoxContainer/TabContainer" method="previous"] [connection signal="pressed" from="CenterContainer/PanelContainer/VBoxContainer/TabContainer/Audio Settings/navbuttons/previous" to="CenterContainer/PanelContainer/VBoxContainer/TabContainer" method="previous"]
[connection signal="pressed" from="CenterContainer/PanelContainer/VBoxContainer/TabContainer/Content Notes/show content Notes" to="CenterContainer/PanelContainer/VBoxContainer/TabContainer/Content Notes/ScrollContainer/Content Notes" method="show"] [connection signal="pressed" from="CenterContainer/PanelContainer/VBoxContainer/TabContainer/Content Notes/show content Notes" to="CenterContainer/PanelContainer/VBoxContainer/TabContainer/Content Notes/ScrollContainer/Content Notes" method="show"]
[connection signal="pressed" from="CenterContainer/PanelContainer/VBoxContainer/TabContainer/Content Notes/show content Notes" to="CenterContainer/PanelContainer/VBoxContainer/TabContainer/Content Notes/show content Notes" method="set_disabled" binds= [true]] [connection signal="pressed" from="CenterContainer/PanelContainer/VBoxContainer/TabContainer/Content Notes/show content Notes" to="CenterContainer/PanelContainer/VBoxContainer/TabContainer/Content Notes/show content Notes" method="set_disabled" binds= [true]]
[connection signal="toggled" from="CenterContainer/PanelContainer/VBoxContainer/TabContainer/Content Notes/ScrollContainer/Content Notes/VBoxContainer5/VBoxContainer/CheckBox" to="." method="_on_content_notes_toggled"]
[connection signal="toggled" from="CenterContainer/PanelContainer/VBoxContainer/TabContainer/Content Notes/ScrollContainer/Content Notes/VBoxContainer5/VBoxContainer/CheckBox2" to="." method="_on_provide_summaries_toggled"]
[connection signal="toggled" from="CenterContainer/PanelContainer/VBoxContainer/TabContainer/Content Notes/ScrollContainer/Content Notes/VBoxContainer5/VBoxContainer/CheckBox3" to="." method="_on_allow_skipping_toggled"]
[connection signal="pressed" from="CenterContainer/PanelContainer/VBoxContainer/TabContainer/Content Notes/navbuttons/Next" to="CenterContainer/PanelContainer/VBoxContainer/TabContainer" method="next"] [connection signal="pressed" from="CenterContainer/PanelContainer/VBoxContainer/TabContainer/Content Notes/navbuttons/Next" to="CenterContainer/PanelContainer/VBoxContainer/TabContainer" method="next"]
[connection signal="pressed" from="CenterContainer/PanelContainer/VBoxContainer/TabContainer/Content Notes/navbuttons/previous" to="CenterContainer/PanelContainer/VBoxContainer/TabContainer" method="previous"] [connection signal="pressed" from="CenterContainer/PanelContainer/VBoxContainer/TabContainer/Content Notes/navbuttons/previous" to="CenterContainer/PanelContainer/VBoxContainer/TabContainer" method="previous"]
[connection signal="pressed" from="CenterContainer/PanelContainer/VBoxContainer/TabContainer/Managing Expectations/navbuttons/Next" to="CenterContainer/PanelContainer/VBoxContainer/TabContainer" method="next"] [connection signal="pressed" from="CenterContainer/PanelContainer/VBoxContainer/TabContainer/Managing Expectations/navbuttons/Next" to="CenterContainer/PanelContainer/VBoxContainer/TabContainer" method="next"]
[connection signal="pressed" from="CenterContainer/PanelContainer/VBoxContainer/TabContainer/Managing Expectations/navbuttons/previous" to="CenterContainer/PanelContainer/VBoxContainer/TabContainer" method="previous"] [connection signal="pressed" from="CenterContainer/PanelContainer/VBoxContainer/TabContainer/Managing Expectations/navbuttons/previous" to="CenterContainer/PanelContainer/VBoxContainer/TabContainer" method="previous"]
[connection signal="toggled" from="continue/CheckBox" to="." method="_on_streaming_notes_toggled"]

View File

@ -1,15 +1,15 @@
extends Node extends Node
# For Startup Scene:
var screen_reader:bool = false var screen_reader:bool = false # Screenreader
var disable_rendering: bool = false var disable_rendering: bool = false # show nav button
var simplified_navigation:bool = false var simplified_navigation:bool = false # simplified controls
var show_navigation_buttons: bool = false var show_navigation_buttons: bool = false # show nav ui
var enable_subtitles: bool = false var enable_subtitles: bool = false # ItemList2
var enable_closed_caption: bool = false var enable_closed_caption: bool = false # ItemList2
var reduce_motion: bool = false var reduce_motion: bool = false # ?
var streaming_content_notes: bool = false var streaming_content_notes: bool = false # continue/CheckBox
var show_content_notes: bool = false var show_content_notes: bool = false # ContentNotes/.../Checkbox
var provide_summaries: bool = false var provide_summaries: bool = false # ContentNotes/.../Checkbox2
var allow_skipping: bool = false var allow_skipping: bool = false
var stage_list:Array = [] var stage_list:Array = []
@ -87,3 +87,17 @@ func transition_stage_to(thief: Object):
func queue_for_stage(target: Object, index: int = 1): func queue_for_stage(target: Object, index: int = 1):
stage_list.insert(index, target) stage_list.insert(index, target)
func print_settings():
print_debug("Screenreader: ", screen_reader, " / ",
"Disable rendering: ", disable_rendering, " / ",
"Simplified controls: ", simplified_navigation, " / ",
"Show navigation buttons: ", show_navigation_buttons, " / ",
"Enable subtitles: ", enable_subtitles, " / ",
"Enable CC: ", enable_closed_caption, " / ")