add theming support, fix ui issues, add ui scaling option
This commit is contained in:
parent
61806723ba
commit
1ced41d096
18 changed files with 259 additions and 49 deletions
|
@ -6,6 +6,7 @@
|
||||||
layout_mode = 3
|
layout_mode = 3
|
||||||
anchors_preset = 0
|
anchors_preset = 0
|
||||||
script = ExtResource("1_ttcva")
|
script = ExtResource("1_ttcva")
|
||||||
|
color = "MovementOff"
|
||||||
|
|
||||||
[node name="ColorRect" type="ColorRect" parent="."]
|
[node name="ColorRect" type="ColorRect" parent="."]
|
||||||
layout_mode = 0
|
layout_mode = 0
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
layout_mode = 3
|
layout_mode = 3
|
||||||
anchors_preset = 0
|
anchors_preset = 0
|
||||||
script = ExtResource("1_2om8h")
|
script = ExtResource("1_2om8h")
|
||||||
|
color = "MovementOn"
|
||||||
|
|
||||||
[node name="ColorRect" type="ColorRect" parent="."]
|
[node name="ColorRect" type="ColorRect" parent="."]
|
||||||
layout_mode = 0
|
layout_mode = 0
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
[gd_scene load_steps=7 format=3 uid="uid://dtkqaw5533rxy"]
|
[gd_scene load_steps=6 format=3 uid="uid://dtkqaw5533rxy"]
|
||||||
|
|
||||||
[ext_resource type="StyleBox" uid="uid://d17amc25o63p1" path="res://UI/Themes/MovementsPanelOverride.tres" id="1_d1xev"]
|
|
||||||
[ext_resource type="Script" uid="uid://tn3aaldu7mm2" path="res://Scripts/MovementRow.gd" id="1_rm5t0"]
|
[ext_resource type="Script" uid="uid://tn3aaldu7mm2" path="res://Scripts/MovementRow.gd" id="1_rm5t0"]
|
||||||
[ext_resource type="Texture2D" uid="uid://cn5xdrxdv622h" path="res://UI/SmallX.png" id="2_e7anl"]
|
[ext_resource type="Texture2D" uid="uid://cn5xdrxdv622h" path="res://UI/TransportControls/SmallX.png" id="2_e7anl"]
|
||||||
[ext_resource type="Texture2D" uid="uid://d007317123e27" path="res://UI/SmallLock.png" id="3_ldhn8"]
|
[ext_resource type="Texture2D" uid="uid://d007317123e27" path="res://UI/TransportControls/SmallLock.png" id="3_ldhn8"]
|
||||||
|
|
||||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_rm5t0"]
|
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_rm5t0"]
|
||||||
bg_color = Color(0, 1, 0, 1)
|
bg_color = Color(0, 1, 0, 1)
|
||||||
|
@ -71,7 +70,7 @@ theme_override_styles/pressed = SubResource("StyleBoxFlat_ldhn8")
|
||||||
toggle_mode = true
|
toggle_mode = true
|
||||||
icon = ExtResource("3_ldhn8")
|
icon = ExtResource("3_ldhn8")
|
||||||
|
|
||||||
[node name="MovementsBG" type="Panel" parent="."]
|
[node name="MovementsBG" type="ColorRect" parent="."]
|
||||||
layout_mode = 1
|
layout_mode = 1
|
||||||
anchors_preset = -1
|
anchors_preset = -1
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
|
@ -79,7 +78,8 @@ anchor_bottom = 1.0
|
||||||
offset_left = 264.0
|
offset_left = 264.0
|
||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
theme_override_styles/panel = ExtResource("1_d1xev")
|
theme_type_variation = &"MovementBG"
|
||||||
|
color = Color(0.0941176, 0.0941176, 0.0941176, 1)
|
||||||
|
|
||||||
[node name="InvisibleMask" type="Control" parent="MovementsBG"]
|
[node name="InvisibleMask" type="Control" parent="MovementsBG"]
|
||||||
clip_contents = true
|
clip_contents = true
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
[gd_scene load_steps=26 format=3 uid="uid://oiehbor0dlqx"]
|
[gd_scene load_steps=25 format=3 uid="uid://oiehbor0dlqx"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://dfiwoln8mdwm8" path="res://Scripts/EditorScreen.gd" id="1_sd512"]
|
[ext_resource type="Script" uid="uid://dfiwoln8mdwm8" path="res://Scripts/EditorScreen.gd" id="1_sd512"]
|
||||||
[ext_resource type="Theme" uid="uid://dbgs4id7y5d1c" path="res://UI/Themes/Dark.tres" id="1_v0ton"]
|
|
||||||
[ext_resource type="Texture2D" uid="uid://xllpr3qc064c" path="res://UI/TransportControls/Play.png" id="3_g6u4d"]
|
[ext_resource type="Texture2D" uid="uid://xllpr3qc064c" path="res://UI/TransportControls/Play.png" id="3_g6u4d"]
|
||||||
[ext_resource type="Texture2D" uid="uid://dgacnkv2dc65s" path="res://UI/TransportControls/PlayBackwards.png" id="3_mr8sb"]
|
[ext_resource type="Texture2D" uid="uid://dgacnkv2dc65s" path="res://UI/TransportControls/PlayBackwards.png" id="3_mr8sb"]
|
||||||
[ext_resource type="Texture2D" uid="uid://dts4eh6hyt8p3" path="res://UI/TransportControls/SkipBackwards.png" id="3_r4ytj"]
|
[ext_resource type="Texture2D" uid="uid://dts4eh6hyt8p3" path="res://UI/TransportControls/SkipBackwards.png" id="3_r4ytj"]
|
||||||
|
@ -46,7 +45,6 @@ anchor_right = 1.0
|
||||||
anchor_bottom = 1.0
|
anchor_bottom = 1.0
|
||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
theme = ExtResource("1_v0ton")
|
|
||||||
script = ExtResource("1_sd512")
|
script = ExtResource("1_sd512")
|
||||||
|
|
||||||
[node name="OpenAudioFileDialog" type="FileDialog" parent="."]
|
[node name="OpenAudioFileDialog" type="FileDialog" parent="."]
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
[gd_scene load_steps=17 format=3 uid="uid://cd67bfok34xhy"]
|
[gd_scene load_steps=16 format=3 uid="uid://cd67bfok34xhy"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://pwg37gka2qr4" path="res://Scripts/InGameMenu.gd" id="1_cp535"]
|
[ext_resource type="Script" uid="uid://pwg37gka2qr4" path="res://Scripts/InGameMenu.gd" id="1_cp535"]
|
||||||
[ext_resource type="Theme" uid="uid://dbgs4id7y5d1c" path="res://UI/Themes/Dark.tres" id="1_fxnf3"]
|
|
||||||
[ext_resource type="Texture2D" uid="uid://cttgtbu1xllwq" path="res://UI/TransportControls/Stop.png" id="3_5t5ap"]
|
[ext_resource type="Texture2D" uid="uid://cttgtbu1xllwq" path="res://UI/TransportControls/Stop.png" id="3_5t5ap"]
|
||||||
[ext_resource type="Texture2D" uid="uid://bwhgy4u37jmo1" path="res://UI/TransportControls/Pause.png" id="4_j5gkc"]
|
[ext_resource type="Texture2D" uid="uid://bwhgy4u37jmo1" path="res://UI/TransportControls/Pause.png" id="4_j5gkc"]
|
||||||
[ext_resource type="Texture2D" uid="uid://xllpr3qc064c" path="res://UI/TransportControls/Play.png" id="5_4hvdi"]
|
[ext_resource type="Texture2D" uid="uid://xllpr3qc064c" path="res://UI/TransportControls/Play.png" id="5_4hvdi"]
|
||||||
|
@ -35,7 +34,6 @@ anchor_right = 1.0
|
||||||
anchor_bottom = 1.0
|
anchor_bottom = 1.0
|
||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
theme = ExtResource("1_fxnf3")
|
|
||||||
script = ExtResource("1_cp535")
|
script = ExtResource("1_cp535")
|
||||||
|
|
||||||
[node name="BG" type="ColorRect" parent="."]
|
[node name="BG" type="ColorRect" parent="."]
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
[gd_scene load_steps=21 format=3 uid="uid://1ikkb4b8mw1w"]
|
[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="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://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://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://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://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="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"]
|
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_dkd36"]
|
||||||
|
|
||||||
|
@ -41,7 +41,6 @@ anchor_right = 1.0
|
||||||
anchor_bottom = 1.0
|
anchor_bottom = 1.0
|
||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
theme = ExtResource("1_dkd36")
|
|
||||||
script = ExtResource("1_ocgay")
|
script = ExtResource("1_ocgay")
|
||||||
|
|
||||||
[node name="PleaseRestart" type="AcceptDialog" parent="."]
|
[node name="PleaseRestart" type="AcceptDialog" parent="."]
|
||||||
|
@ -735,28 +734,27 @@ vertical_alignment = 1
|
||||||
[node name="TabBar" type="TabBar" parent="SettingsScreen/DialogPanel"]
|
[node name="TabBar" type="TabBar" parent="SettingsScreen/DialogPanel"]
|
||||||
layout_mode = 1
|
layout_mode = 1
|
||||||
anchors_preset = -1
|
anchors_preset = -1
|
||||||
anchor_top = 0.173
|
anchor_top = 0.2
|
||||||
anchor_right = 1.019
|
anchor_right = 1.0
|
||||||
anchor_bottom = 0.252
|
anchor_bottom = 0.25
|
||||||
offset_left = -1.0
|
offset_left = 4.0
|
||||||
offset_top = -3.41601
|
offset_right = -4.0
|
||||||
offset_right = -10.0
|
|
||||||
offset_bottom = -19.184
|
|
||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
current_tab = 0
|
current_tab = 0
|
||||||
tab_count = 1
|
tab_count = 2
|
||||||
tab_0/title = "Graphics"
|
tab_0/title = "Graphics"
|
||||||
|
tab_1/title = "Interface"
|
||||||
|
|
||||||
[node name="GraphicsPanel" type="Panel" parent="SettingsScreen/DialogPanel"]
|
[node name="GraphicsPanel" type="Panel" parent="SettingsScreen/DialogPanel"]
|
||||||
layout_mode = 1
|
layout_mode = 1
|
||||||
anchors_preset = -1
|
anchors_preset = -1
|
||||||
anchor_top = 0.218
|
anchor_top = 0.25
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
anchor_bottom = 1.0
|
anchor_bottom = 1.0
|
||||||
offset_top = 0.944
|
offset_left = 4.0
|
||||||
offset_right = 1.0
|
offset_right = -4.0
|
||||||
offset_bottom = -2.0
|
offset_bottom = -4.0
|
||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
script = ExtResource("8_wdeli")
|
script = ExtResource("8_wdeli")
|
||||||
|
@ -891,6 +889,81 @@ text = "120"
|
||||||
horizontal_alignment = 2
|
horizontal_alignment = 2
|
||||||
vertical_alignment = 1
|
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="."]
|
[node name="VersionLabel" type="Label" parent="."]
|
||||||
layout_mode = 1
|
layout_mode = 1
|
||||||
anchors_preset = -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="CreditsScreen/InputEater" to="." method="_on_input_eater_pressed"]
|
||||||
[connection signal="pressed" from="SettingsScreen/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/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/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="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="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"]
|
||||||
|
|
|
@ -139,6 +139,10 @@ func set_transport_enabled(enabled: bool):
|
||||||
transport_enabled = enabled
|
transport_enabled = enabled
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
|
$SubViewport.msaa_3d = Globalvariables.msaa
|
||||||
|
$SubViewport.screen_space_aa = Globalvariables.ssaa
|
||||||
|
get_window().set_theme(load(Globalvariables.theme_index[Globalvariables.theme]))
|
||||||
|
$ColorRect.color = get_window().theme.get_color("color", "EditorBG")
|
||||||
get_tree().get_root().size_changed.connect(_on_size_changed)
|
get_tree().get_root().size_changed.connect(_on_size_changed)
|
||||||
erase_all.connect(_erase_all)
|
erase_all.connect(_erase_all)
|
||||||
$MenuBar/MenuButton.get_popup().id_pressed.connect(_showtape_menu_button_pressed)
|
$MenuBar/MenuButton.get_popup().id_pressed.connect(_showtape_menu_button_pressed)
|
||||||
|
|
|
@ -4,10 +4,20 @@ var FOV = 80
|
||||||
var config = ConfigFile.new()
|
var config = ConfigFile.new()
|
||||||
var msaa = 1
|
var msaa = 1
|
||||||
var ssaa = 1
|
var ssaa = 1
|
||||||
|
var scaling = 0
|
||||||
|
var theme = 0
|
||||||
|
|
||||||
|
var theme_index = [
|
||||||
|
"res://UI/Themes/Dark.tres",
|
||||||
|
"res://UI/Themes/Light.tres",
|
||||||
|
"res://UI/Themes/AppleII.tres",
|
||||||
|
"res://UI/Themes/HotDogStand.tres"
|
||||||
|
]
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
msaa = get_viewport().msaa_3d
|
msaa = get_viewport().msaa_3d
|
||||||
ssaa = get_viewport().screen_space_aa
|
ssaa = get_viewport().screen_space_aa
|
||||||
|
loadConfig()
|
||||||
|
|
||||||
func updateConfig():
|
func updateConfig():
|
||||||
msaa = get_viewport().msaa_3d
|
msaa = get_viewport().msaa_3d
|
||||||
|
@ -15,6 +25,8 @@ func updateConfig():
|
||||||
config.set_value("GRAPHICS", "fov", FOV)
|
config.set_value("GRAPHICS", "fov", FOV)
|
||||||
config.set_value("GRAPHICS", "msaa", msaa)
|
config.set_value("GRAPHICS", "msaa", msaa)
|
||||||
config.set_value("GRAPHICS", "ssaa", ssaa)
|
config.set_value("GRAPHICS", "ssaa", ssaa)
|
||||||
|
config.set_value("INTERFACE", "scaling", scaling)
|
||||||
|
config.set_value("INTERFACE", "theme", theme)
|
||||||
config.save("user://settings.cfg")
|
config.save("user://settings.cfg")
|
||||||
|
|
||||||
func loadConfig():
|
func loadConfig():
|
||||||
|
@ -27,18 +39,20 @@ func loadConfig():
|
||||||
FOV = config.get_value("GRAPHICS", "fov")
|
FOV = config.get_value("GRAPHICS", "fov")
|
||||||
msaa = config.get_value("GRAPHICS", "msaa")
|
msaa = config.get_value("GRAPHICS", "msaa")
|
||||||
ssaa = config.get_value("GRAPHICS", "ssaa")
|
ssaa = config.get_value("GRAPHICS", "ssaa")
|
||||||
|
scaling = config.get_value("INTERFACE", "scaling")
|
||||||
|
theme = config.get_value("INTERFACE", "theme")
|
||||||
print("config loaded.")
|
print("config loaded.")
|
||||||
|
|
||||||
# set msaa
|
# set msaa
|
||||||
var index = msaa
|
match (msaa):
|
||||||
if index == 0: # Disabled
|
0:
|
||||||
get_viewport().msaa_3d = Viewport.MSAA_DISABLED
|
get_viewport().msaa_3d = Viewport.MSAA_DISABLED
|
||||||
elif index == 1: # 2×
|
1:
|
||||||
get_viewport().msaa_3d = Viewport.MSAA_2X
|
get_viewport().msaa_3d = Viewport.MSAA_2X
|
||||||
elif index == 2: # 4×
|
2:
|
||||||
get_viewport().msaa_3d = Viewport.MSAA_4X
|
get_viewport().msaa_3d = Viewport.MSAA_4X
|
||||||
elif index == 3: # 8×
|
3:
|
||||||
get_viewport().msaa_3d = Viewport.MSAA_8X
|
get_viewport().msaa_3d = Viewport.MSAA_8X
|
||||||
|
|
||||||
# set ssaa
|
get_viewport().screen_space_aa = ssaa as Viewport.ScreenSpaceAA
|
||||||
get_viewport().screen_space_aa = int(index == 1) as Viewport.ScreenSpaceAA
|
get_window().content_scale_mode = scaling as Window.ContentScaleMode
|
||||||
|
|
|
@ -3,27 +3,26 @@ extends Panel
|
||||||
@export var thisTab = 0
|
@export var thisTab = 0
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
$AAOption.selected = get_viewport().msaa_3d
|
$AAOption.select(get_viewport().msaa_3d)
|
||||||
$SSAAOption.selected = get_viewport().screen_space_aa
|
$SSAAOption.select(get_viewport().screen_space_aa)
|
||||||
$FOVSlider.value = Globalvariables.FOV
|
$FOVSlider.value = Globalvariables.FOV
|
||||||
$FOVSlider/CurrentLabel.text = str(int(Globalvariables.FOV))
|
$FOVSlider/CurrentLabel.text = str(int(Globalvariables.FOV))
|
||||||
|
|
||||||
func _on_tab_bar_tab_changed(tab: int) -> void:
|
func _on_tab_bar_tab_changed(tab: int) -> void:
|
||||||
if (thisTab == tab):
|
if (thisTab == tab):
|
||||||
self.show()
|
visible = true
|
||||||
else:
|
else:
|
||||||
self.hide()
|
visible = false
|
||||||
|
|
||||||
func updateconfig():
|
|
||||||
Globalvariables.updateConfig()
|
|
||||||
|
|
||||||
func _on_fov_slider_value_changed(value: float) -> void:
|
func _on_fov_slider_value_changed(value: float) -> void:
|
||||||
Globalvariables.FOV = value
|
Globalvariables.FOV = value
|
||||||
$FOVSlider/CurrentLabel.text = str(int(value))
|
$FOVSlider/CurrentLabel.text = str(int(value))
|
||||||
|
Globalvariables.updateConfig()
|
||||||
|
|
||||||
|
|
||||||
func _on_option_aa_ss_item_selected(index: int) -> void:
|
func _on_option_aa_ss_item_selected(index: int) -> void:
|
||||||
get_viewport().screen_space_aa = int(index == 1) as Viewport.ScreenSpaceAA
|
get_viewport().screen_space_aa = int(index == 1) as Viewport.ScreenSpaceAA
|
||||||
|
Globalvariables.updateConfig()
|
||||||
|
|
||||||
|
|
||||||
func _on_option_aa_msaa_item_selected(index: int) -> void:
|
func _on_option_aa_msaa_item_selected(index: int) -> void:
|
||||||
|
@ -35,4 +34,4 @@ func _on_option_aa_msaa_item_selected(index: int) -> void:
|
||||||
get_viewport().msaa_3d = Viewport.MSAA_4X
|
get_viewport().msaa_3d = Viewport.MSAA_4X
|
||||||
elif index == 3: # 8×
|
elif index == 3: # 8×
|
||||||
get_viewport().msaa_3d = Viewport.MSAA_8X
|
get_viewport().msaa_3d = Viewport.MSAA_8X
|
||||||
|
Globalvariables.updateConfig()
|
|
@ -18,6 +18,8 @@ var stage
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
stage = FreeRoamMaps.MapIndex[get_node("../").current_map]["stage"]
|
stage = FreeRoamMaps.MapIndex[get_node("../").current_map]["stage"]
|
||||||
|
|
||||||
|
set_theme(load(Globalvariables.theme_index[Globalvariables.theme]))
|
||||||
|
|
||||||
var cosmetics_offset = 0
|
var cosmetics_offset = 0
|
||||||
var cosmetics_count = 0
|
var cosmetics_count = 0
|
||||||
for cosmetic_subtable in stage["cosmetics"]:
|
for cosmetic_subtable in stage["cosmetics"]:
|
||||||
|
|
23
Scripts/InterfaceOptions.gd
Normal file
23
Scripts/InterfaceOptions.gd
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
extends Panel
|
||||||
|
|
||||||
|
@export var thisTab = 1
|
||||||
|
|
||||||
|
func _ready() -> void:
|
||||||
|
$ScalingOption.select(Globalvariables.scaling)
|
||||||
|
$ThemeOption.select(Globalvariables.theme)
|
||||||
|
|
||||||
|
func _on_tab_bar_tab_changed(tab: int) -> void:
|
||||||
|
if (thisTab == tab):
|
||||||
|
visible = true
|
||||||
|
else:
|
||||||
|
visible = false
|
||||||
|
|
||||||
|
func _on_scaling_option_item_selected(index: int) -> void:
|
||||||
|
Globalvariables.scaling = index
|
||||||
|
get_window().content_scale_mode = index as Window.ContentScaleMode
|
||||||
|
Globalvariables.updateConfig()
|
||||||
|
|
||||||
|
func _on_theme_option_item_selected(index: int) -> void:
|
||||||
|
Globalvariables.theme = index
|
||||||
|
get_window().set_theme(load(Globalvariables.theme_index[Globalvariables.theme]))
|
||||||
|
Globalvariables.updateConfig()
|
1
Scripts/InterfaceOptions.gd.uid
Normal file
1
Scripts/InterfaceOptions.gd.uid
Normal file
|
@ -0,0 +1 @@
|
||||||
|
uid://bmqi57p5yipll
|
|
@ -8,12 +8,12 @@ func _ready():
|
||||||
$Buttons/EditorButton.grab_focus()
|
$Buttons/EditorButton.grab_focus()
|
||||||
|
|
||||||
Globalvariables.loadConfig()
|
Globalvariables.loadConfig()
|
||||||
print(Globalvariables.FOV)
|
|
||||||
print(Globalvariables.msaa)
|
|
||||||
$SettingsScreen/DialogPanel/GraphicsPanel/FOVSlider.value = Globalvariables.FOV
|
$SettingsScreen/DialogPanel/GraphicsPanel/FOVSlider.value = Globalvariables.FOV
|
||||||
$SettingsScreen/DialogPanel/GraphicsPanel/AAOption.selected = Globalvariables.msaa
|
$SettingsScreen/DialogPanel/GraphicsPanel/AAOption.selected = Globalvariables.msaa
|
||||||
$SettingsScreen/DialogPanel/GraphicsPanel/SSAAOption.selected = Globalvariables.ssaa
|
$SettingsScreen/DialogPanel/GraphicsPanel/SSAAOption.selected = Globalvariables.ssaa
|
||||||
|
|
||||||
|
get_window().set_theme(load(Globalvariables.theme_index[Globalvariables.theme]))
|
||||||
|
|
||||||
var moddir = DirAccess.open("user://Mods")
|
var moddir = DirAccess.open("user://Mods")
|
||||||
if moddir == null:
|
if moddir == null:
|
||||||
print("Mod folder was not found. Creating.")
|
print("Mod folder was not found. Creating.")
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
extends Control
|
extends Control
|
||||||
|
|
||||||
@export var x_offset : int = 0
|
@export var x_offset : int = 0
|
||||||
|
@export var color : String
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
self.size.x += x_offset
|
self.size.x += x_offset
|
||||||
|
$ColorRect.color = get_window().theme.get_color("color", color)
|
||||||
|
|
|
@ -108,6 +108,7 @@ func _update_out_flow(new_value: float, _internalid: int) -> void:
|
||||||
out_flow = new_value
|
out_flow = new_value
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
|
$MovementsBG.color = get_window().theme.get_color("color", "MovementOff")
|
||||||
if (flow_path != "None"):
|
if (flow_path != "None"):
|
||||||
var flow_control = get_node(flow_path + str(movement_bit) + animatronic + movement_name + current_stage)
|
var flow_control = get_node(flow_path + str(movement_bit) + animatronic + movement_name + current_stage)
|
||||||
flow_control.in_value_updated.connect(self._update_in_flow)
|
flow_control.in_value_updated.connect(self._update_in_flow)
|
||||||
|
|
|
@ -13,4 +13,7 @@ corner_radius_bottom_right = 4
|
||||||
corner_radius_bottom_left = 4
|
corner_radius_bottom_left = 4
|
||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
|
EditorBG/colors/color = Color(0.188235, 0.188235, 0.188235, 1)
|
||||||
|
MovementOff/colors/color = Color(0.0941176, 0.0941176, 0.0941176, 1)
|
||||||
|
MovementOn/colors/color = Color(0, 1, 0, 1)
|
||||||
Panel/styles/panel = SubResource("StyleBoxFlat_6oevq")
|
Panel/styles/panel = SubResource("StyleBoxFlat_6oevq")
|
||||||
|
|
87
UI/Themes/Light.tres
Normal file
87
UI/Themes/Light.tres
Normal file
|
@ -0,0 +1,87 @@
|
||||||
|
[gd_resource type="Theme" load_steps=7 format=3 uid="uid://cr6pxthv8rvl5"]
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_qxkmj"]
|
||||||
|
content_margin_left = 4.0
|
||||||
|
content_margin_top = 4.0
|
||||||
|
content_margin_right = 4.0
|
||||||
|
content_margin_bottom = 4.0
|
||||||
|
bg_color = Color(0.815686, 0.815686, 0.815686, 1)
|
||||||
|
corner_radius_top_left = 4
|
||||||
|
corner_radius_top_right = 4
|
||||||
|
corner_radius_bottom_right = 4
|
||||||
|
corner_radius_bottom_left = 4
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_iwa6l"]
|
||||||
|
content_margin_left = 4.0
|
||||||
|
content_margin_top = 4.0
|
||||||
|
content_margin_right = 4.0
|
||||||
|
content_margin_bottom = 4.0
|
||||||
|
bg_color = Color(0.878431, 0.878431, 0.878431, 1)
|
||||||
|
corner_radius_top_left = 4
|
||||||
|
corner_radius_top_right = 4
|
||||||
|
corner_radius_bottom_right = 4
|
||||||
|
corner_radius_bottom_left = 4
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_8v7jq"]
|
||||||
|
content_margin_left = 4.0
|
||||||
|
content_margin_top = 4.0
|
||||||
|
content_margin_right = 4.0
|
||||||
|
content_margin_bottom = 4.0
|
||||||
|
bg_color = Color(0.752941, 0.752941, 0.752941, 1)
|
||||||
|
corner_radius_top_left = 4
|
||||||
|
corner_radius_top_right = 4
|
||||||
|
corner_radius_bottom_right = 4
|
||||||
|
corner_radius_bottom_left = 4
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_6oevq"]
|
||||||
|
bg_color = Color(0.937255, 0.937255, 0.937255, 1)
|
||||||
|
border_width_left = 1
|
||||||
|
border_width_top = 1
|
||||||
|
border_width_right = 1
|
||||||
|
border_width_bottom = 1
|
||||||
|
border_color = Color(0.666667, 0.666667, 0.666667, 1)
|
||||||
|
corner_radius_top_left = 4
|
||||||
|
corner_radius_top_right = 4
|
||||||
|
corner_radius_bottom_right = 4
|
||||||
|
corner_radius_bottom_left = 4
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_m2mg1"]
|
||||||
|
bg_color = Color(0.815686, 0.815686, 0.815686, 1)
|
||||||
|
corner_radius_top_left = 4
|
||||||
|
corner_radius_top_right = 4
|
||||||
|
corner_radius_bottom_right = 4
|
||||||
|
corner_radius_bottom_left = 4
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ghtf4"]
|
||||||
|
bg_color = Color(0.878431, 0.878431, 0.878431, 1)
|
||||||
|
corner_radius_top_left = 4
|
||||||
|
corner_radius_top_right = 4
|
||||||
|
corner_radius_bottom_right = 4
|
||||||
|
corner_radius_bottom_left = 4
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
Button/colors/font_color = Color(0, 0, 0, 1)
|
||||||
|
Button/colors/font_disabled_color = Color(0, 0, 0, 0.501961)
|
||||||
|
Button/colors/font_focus_color = Color(0, 0, 0, 1)
|
||||||
|
Button/colors/font_hover_color = Color(0, 0, 0, 1)
|
||||||
|
Button/colors/font_hover_pressed_color = Color(0, 0, 0, 1)
|
||||||
|
Button/colors/font_pressed_color = Color(0, 0, 0, 1)
|
||||||
|
Button/colors/icon_disabled_color = Color(0, 0, 0, 0.501961)
|
||||||
|
Button/colors/icon_focus_color = Color(0, 0, 0, 1)
|
||||||
|
Button/colors/icon_hover_color = Color(0, 0, 0, 1)
|
||||||
|
Button/colors/icon_hover_pressed_color = Color(0, 0, 0, 1)
|
||||||
|
Button/colors/icon_normal_color = Color(0, 0, 0, 1)
|
||||||
|
Button/colors/icon_pressed_color = Color(0, 0, 0, 1)
|
||||||
|
Button/styles/hover = SubResource("StyleBoxFlat_qxkmj")
|
||||||
|
Button/styles/normal = SubResource("StyleBoxFlat_iwa6l")
|
||||||
|
Button/styles/pressed = SubResource("StyleBoxFlat_8v7jq")
|
||||||
|
EditorBG/colors/color = Color(1, 1, 1, 1)
|
||||||
|
Label/colors/font_color = Color(0, 0, 0, 1)
|
||||||
|
MovementOff/colors/color = Color(0.878431, 0.878431, 0.878431, 1)
|
||||||
|
MovementOn/colors/color = Color(0, 0.466667, 1, 1)
|
||||||
|
Panel/styles/panel = SubResource("StyleBoxFlat_6oevq")
|
||||||
|
PopupMenu/colors/font_color = Color(0, 0, 0, 1)
|
||||||
|
PopupMenu/colors/font_hover_color = Color(0, 0, 0, 1)
|
||||||
|
PopupMenu/colors/font_separator_color = Color(0, 0, 0, 1)
|
||||||
|
PopupMenu/styles/hover = SubResource("StyleBoxFlat_m2mg1")
|
||||||
|
PopupMenu/styles/panel = SubResource("StyleBoxFlat_ghtf4")
|
Loading…
Add table
Add a link
Reference in a new issue