add theming support, fix ui issues, add ui scaling option

This commit is contained in:
Persephone Bubblegum-Holiday 2025-08-13 00:21:27 -07:00
parent 61806723ba
commit 1ced41d096
18 changed files with 259 additions and 49 deletions

View file

@ -1,13 +1,13 @@
[gd_scene load_steps=21 format=3 uid="uid://1ikkb4b8mw1w"]
[ext_resource type="Theme" uid="uid://dbgs4id7y5d1c" path="res://UI/Themes/Dark.tres" id="1_dkd36"]
[ext_resource type="Script" uid="uid://b5nh5td5bdsfd" path="res://Scripts/MainMenu.gd" id="1_ocgay"]
[ext_resource type="Texture2D" uid="uid://dbh0vh85wks2l" path="res://UI/logo.png" id="2_6d82g"]
[ext_resource type="Texture2D" uid="uid://6mf6wucl3y6k" path="res://UI/MenuBG/BalconyBG.png" id="2_j6v32"]
[ext_resource type="Texture2D" uid="uid://dr6ir8mgbjrs7" path="res://UI/MenuBG/CStageBG.png" id="3_vaoig"]
[ext_resource type="Texture2D" uid="uid://dyyyg85g3jwip" path="res://UI/MenuBG/ProtoRoadBG.png" id="4_dkd36"]
[ext_resource type="Texture2D" uid="uid://cdp1csnrbd46w" path="res://UI/MenuBG/1StageBG.png" id="6_ha2rd"]
[ext_resource type="Script" uid="uid://c8dhm0nhxqlth" path="res://Scripts/OptionsPanel.gd" id="8_wdeli"]
[ext_resource type="Script" uid="uid://c8dhm0nhxqlth" path="res://Scripts/GraphicsOptions.gd" id="8_wdeli"]
[ext_resource type="Script" uid="uid://bmqi57p5yipll" path="res://Scripts/InterfaceOptions.gd" id="9_wyv1s"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_dkd36"]
@ -41,7 +41,6 @@ anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme = ExtResource("1_dkd36")
script = ExtResource("1_ocgay")
[node name="PleaseRestart" type="AcceptDialog" parent="."]
@ -735,28 +734,27 @@ vertical_alignment = 1
[node name="TabBar" type="TabBar" parent="SettingsScreen/DialogPanel"]
layout_mode = 1
anchors_preset = -1
anchor_top = 0.173
anchor_right = 1.019
anchor_bottom = 0.252
offset_left = -1.0
offset_top = -3.41601
offset_right = -10.0
offset_bottom = -19.184
anchor_top = 0.2
anchor_right = 1.0
anchor_bottom = 0.25
offset_left = 4.0
offset_right = -4.0
grow_horizontal = 2
grow_vertical = 2
current_tab = 0
tab_count = 1
tab_count = 2
tab_0/title = "Graphics"
tab_1/title = "Interface"
[node name="GraphicsPanel" type="Panel" parent="SettingsScreen/DialogPanel"]
layout_mode = 1
anchors_preset = -1
anchor_top = 0.218
anchor_top = 0.25
anchor_right = 1.0
anchor_bottom = 1.0
offset_top = 0.944
offset_right = 1.0
offset_bottom = -2.0
offset_left = 4.0
offset_right = -4.0
offset_bottom = -4.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("8_wdeli")
@ -891,6 +889,81 @@ text = "120"
horizontal_alignment = 2
vertical_alignment = 1
[node name="InterfacePanel" type="Panel" parent="SettingsScreen/DialogPanel"]
visible = false
layout_mode = 1
anchors_preset = -1
anchor_top = 0.25
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = 4.0
offset_right = -4.0
offset_bottom = -4.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("9_wyv1s")
[node name="ScalingLabel" type="Label" parent="SettingsScreen/DialogPanel/InterfacePanel"]
layout_mode = 1
anchors_preset = -1
anchor_right = 0.5
offset_left = 4.0
offset_top = 4.0
offset_right = -4.0
offset_bottom = 36.0
grow_horizontal = 2
text = "Interface Scaling:"
horizontal_alignment = 2
vertical_alignment = 1
[node name="ThemeLabel" type="Label" parent="SettingsScreen/DialogPanel/InterfacePanel"]
layout_mode = 1
anchors_preset = -1
anchor_right = 0.5
offset_left = 4.0
offset_top = 40.0
offset_right = -4.0
offset_bottom = 72.0
grow_horizontal = 2
grow_vertical = 2
text = "Theme:"
horizontal_alignment = 2
vertical_alignment = 1
[node name="ScalingOption" type="OptionButton" parent="SettingsScreen/DialogPanel/InterfacePanel"]
layout_mode = 1
anchors_preset = -1
anchor_left = 0.5
anchor_right = 1.0
offset_left = 4.0
offset_top = 4.0
offset_right = -4.0
offset_bottom = 36.0
alignment = 1
selected = 0
item_count = 2
popup/item_0/text = "Disabled"
popup/item_0/id = 0
popup/item_1/text = "Enabled"
popup/item_1/id = 1
[node name="ThemeOption" type="OptionButton" parent="SettingsScreen/DialogPanel/InterfacePanel"]
layout_mode = 1
anchors_preset = -1
anchor_left = 0.5
anchor_right = 1.0
offset_left = 4.0
offset_top = 40.0
offset_right = -4.0
offset_bottom = 72.0
alignment = 1
selected = 0
item_count = 2
popup/item_0/text = "Dark"
popup/item_0/id = 0
popup/item_1/text = "Light"
popup/item_1/id = 1
[node name="VersionLabel" type="Label" parent="."]
layout_mode = 1
anchors_preset = -1
@ -924,6 +997,9 @@ vertical_alignment = 1
[connection signal="pressed" from="CreditsScreen/InputEater" to="." method="_on_input_eater_pressed"]
[connection signal="pressed" from="SettingsScreen/InputEater" to="." method="_on_input_eater_pressed"]
[connection signal="tab_changed" from="SettingsScreen/DialogPanel/TabBar" to="SettingsScreen/DialogPanel/GraphicsPanel" method="_on_tab_bar_tab_changed"]
[connection signal="tab_changed" from="SettingsScreen/DialogPanel/TabBar" to="SettingsScreen/DialogPanel/InterfacePanel" method="_on_tab_bar_tab_changed"]
[connection signal="item_selected" from="SettingsScreen/DialogPanel/GraphicsPanel/AAOption" to="SettingsScreen/DialogPanel/GraphicsPanel" method="_on_option_aa_msaa_item_selected"]
[connection signal="item_selected" from="SettingsScreen/DialogPanel/GraphicsPanel/SSAAOption" to="SettingsScreen/DialogPanel/GraphicsPanel" method="_on_option_aa_ss_item_selected"]
[connection signal="value_changed" from="SettingsScreen/DialogPanel/GraphicsPanel/FOVSlider" to="SettingsScreen/DialogPanel/GraphicsPanel" method="_on_fov_slider_value_changed"]
[connection signal="item_selected" from="SettingsScreen/DialogPanel/InterfacePanel/ScalingOption" to="SettingsScreen/DialogPanel/InterfacePanel" method="_on_scaling_option_item_selected"]
[connection signal="item_selected" from="SettingsScreen/DialogPanel/InterfacePanel/ThemeOption" to="SettingsScreen/DialogPanel/InterfacePanel" method="_on_theme_option_item_selected"]