visual adjustments to options window
This commit is contained in:
parent
b1ab298f1b
commit
61806723ba
4 changed files with 93 additions and 57 deletions
|
@ -115,9 +115,9 @@ anchors_preset = 2
|
||||||
anchor_top = 1.0
|
anchor_top = 1.0
|
||||||
anchor_bottom = 1.0
|
anchor_bottom = 1.0
|
||||||
offset_left = 60.0
|
offset_left = 60.0
|
||||||
offset_top = -380.0
|
offset_top = -420.0
|
||||||
offset_right = 324.0
|
offset_right = 324.0
|
||||||
offset_bottom = -11.0
|
offset_bottom = -52.0
|
||||||
grow_vertical = 0
|
grow_vertical = 0
|
||||||
|
|
||||||
[node name="EditorButton" type="Button" parent="Buttons"]
|
[node name="EditorButton" type="Button" parent="Buttons"]
|
||||||
|
@ -761,44 +761,54 @@ grow_horizontal = 2
|
||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
script = ExtResource("8_wdeli")
|
script = ExtResource("8_wdeli")
|
||||||
|
|
||||||
[node name="HBoxContainer" type="HBoxContainer" parent="SettingsScreen/DialogPanel/GraphicsPanel"]
|
[node name="AntialiasingLabel" type="Label" parent="SettingsScreen/DialogPanel/GraphicsPanel"]
|
||||||
layout_direction = 2
|
|
||||||
layout_mode = 1
|
layout_mode = 1
|
||||||
anchors_preset = 15
|
anchors_preset = -1
|
||||||
anchor_right = 1.0
|
anchor_right = 0.5
|
||||||
anchor_bottom = 1.0
|
offset_left = 4.0
|
||||||
|
offset_top = 4.0
|
||||||
|
offset_right = -4.0
|
||||||
|
offset_bottom = 36.0
|
||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
grow_vertical = 2
|
|
||||||
theme_override_constants/separation = -25
|
|
||||||
|
|
||||||
[node name="labels" type="VBoxContainer" parent="SettingsScreen/DialogPanel/GraphicsPanel/HBoxContainer"]
|
|
||||||
custom_minimum_size = Vector2(180, 0)
|
|
||||||
layout_mode = 2
|
|
||||||
theme_override_constants/separation = 15
|
|
||||||
|
|
||||||
[node name="AntialiasingLabel" type="Label" parent="SettingsScreen/DialogPanel/GraphicsPanel/HBoxContainer/labels"]
|
|
||||||
layout_mode = 2
|
|
||||||
text = "Antialiasing (MSAA):"
|
text = "Antialiasing (MSAA):"
|
||||||
horizontal_alignment = 2
|
horizontal_alignment = 2
|
||||||
vertical_alignment = 1
|
vertical_alignment = 1
|
||||||
|
|
||||||
[node name="SSAALabel" type="Label" parent="SettingsScreen/DialogPanel/GraphicsPanel/HBoxContainer/labels"]
|
[node name="SSAALabel" type="Label" parent="SettingsScreen/DialogPanel/GraphicsPanel"]
|
||||||
layout_mode = 2
|
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 = "Screenspace AA:"
|
text = "Screenspace AA:"
|
||||||
horizontal_alignment = 2
|
horizontal_alignment = 2
|
||||||
|
vertical_alignment = 1
|
||||||
|
|
||||||
[node name="FOVLabel" type="Label" parent="SettingsScreen/DialogPanel/GraphicsPanel/HBoxContainer/labels"]
|
[node name="FOVLabel" type="Label" parent="SettingsScreen/DialogPanel/GraphicsPanel"]
|
||||||
layout_mode = 2
|
layout_mode = 1
|
||||||
|
anchors_preset = -1
|
||||||
|
anchor_right = 0.5
|
||||||
|
offset_left = 4.0
|
||||||
|
offset_top = 76.0
|
||||||
|
offset_right = -4.0
|
||||||
|
offset_bottom = 124.0
|
||||||
text = "Field of View:"
|
text = "Field of View:"
|
||||||
horizontal_alignment = 2
|
horizontal_alignment = 2
|
||||||
|
vertical_alignment = 1
|
||||||
|
|
||||||
[node name="settings" type="VBoxContainer" parent="SettingsScreen/DialogPanel/GraphicsPanel/HBoxContainer"]
|
[node name="AAOption" type="OptionButton" parent="SettingsScreen/DialogPanel/GraphicsPanel"]
|
||||||
custom_minimum_size = Vector2(100, 0)
|
layout_mode = 1
|
||||||
layout_mode = 2
|
anchors_preset = -1
|
||||||
size_flags_horizontal = 6
|
anchor_left = 0.5
|
||||||
|
anchor_right = 1.0
|
||||||
[node name="option_aa_msaa" type="OptionButton" parent="SettingsScreen/DialogPanel/GraphicsPanel/HBoxContainer/settings"]
|
offset_left = 4.0
|
||||||
layout_mode = 2
|
offset_top = 4.0
|
||||||
|
offset_right = -4.0
|
||||||
|
offset_bottom = 36.0
|
||||||
alignment = 1
|
alignment = 1
|
||||||
selected = 1
|
selected = 1
|
||||||
item_count = 4
|
item_count = 4
|
||||||
|
@ -811,8 +821,15 @@ popup/item_2/id = 2
|
||||||
popup/item_3/text = "8x"
|
popup/item_3/text = "8x"
|
||||||
popup/item_3/id = 3
|
popup/item_3/id = 3
|
||||||
|
|
||||||
[node name="option_aa_ss" type="OptionButton" parent="SettingsScreen/DialogPanel/GraphicsPanel/HBoxContainer/settings"]
|
[node name="SSAAOption" type="OptionButton" parent="SettingsScreen/DialogPanel/GraphicsPanel"]
|
||||||
layout_mode = 2
|
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
|
alignment = 1
|
||||||
selected = 1
|
selected = 1
|
||||||
item_count = 2
|
item_count = 2
|
||||||
|
@ -821,37 +838,55 @@ popup/item_0/id = 0
|
||||||
popup/item_1/text = "FXAA"
|
popup/item_1/text = "FXAA"
|
||||||
popup/item_1/id = 1
|
popup/item_1/id = 1
|
||||||
|
|
||||||
[node name="fov_slider" type="HSlider" parent="SettingsScreen/DialogPanel/GraphicsPanel/HBoxContainer/settings"]
|
[node name="FOVSlider" type="HSlider" parent="SettingsScreen/DialogPanel/GraphicsPanel"]
|
||||||
custom_minimum_size = Vector2(215, 0)
|
custom_minimum_size = Vector2(215, 0)
|
||||||
layout_mode = 2
|
layout_mode = 1
|
||||||
|
anchors_preset = -1
|
||||||
|
anchor_left = 0.5
|
||||||
|
anchor_right = 1.0
|
||||||
|
offset_left = 4.0
|
||||||
|
offset_top = 76.0
|
||||||
|
offset_right = -4.0
|
||||||
|
offset_bottom = 92.0
|
||||||
min_value = 30.0
|
min_value = 30.0
|
||||||
max_value = 120.0
|
max_value = 120.0
|
||||||
value = 80.0
|
value = 80.0
|
||||||
ticks_on_borders = true
|
ticks_on_borders = true
|
||||||
|
|
||||||
[node name="MinLabel" type="Label" parent="SettingsScreen/DialogPanel/GraphicsPanel/HBoxContainer/settings/fov_slider"]
|
[node name="MinLabel" type="Label" parent="SettingsScreen/DialogPanel/GraphicsPanel/FOVSlider"]
|
||||||
layout_mode = 0
|
layout_mode = 1
|
||||||
|
anchors_preset = -1
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
offset_top = 16.0
|
offset_top = 16.0
|
||||||
offset_right = 40.0
|
offset_bottom = 32.0
|
||||||
offset_bottom = 48.0
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
text = "30"
|
text = "30"
|
||||||
vertical_alignment = 1
|
vertical_alignment = 1
|
||||||
|
|
||||||
[node name="CurrentLabel" type="Label" parent="SettingsScreen/DialogPanel/GraphicsPanel/HBoxContainer/settings/fov_slider"]
|
[node name="CurrentLabel" type="Label" parent="SettingsScreen/DialogPanel/GraphicsPanel/FOVSlider"]
|
||||||
layout_mode = 0
|
layout_mode = 1
|
||||||
|
anchors_preset = -1
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
offset_top = 16.0
|
offset_top = 16.0
|
||||||
offset_right = 215.0
|
offset_bottom = 32.0
|
||||||
offset_bottom = 48.0
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
text = "FOV"
|
text = "FOV"
|
||||||
horizontal_alignment = 1
|
horizontal_alignment = 1
|
||||||
vertical_alignment = 1
|
vertical_alignment = 1
|
||||||
|
|
||||||
[node name="MaxLabel" type="Label" parent="SettingsScreen/DialogPanel/GraphicsPanel/HBoxContainer/settings/fov_slider"]
|
[node name="MaxLabel" type="Label" parent="SettingsScreen/DialogPanel/GraphicsPanel/FOVSlider"]
|
||||||
layout_mode = 0
|
layout_mode = 1
|
||||||
offset_left = 175.0
|
anchors_preset = -1
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
offset_top = 16.0
|
offset_top = 16.0
|
||||||
offset_right = 215.0
|
offset_bottom = 32.0
|
||||||
offset_bottom = 48.0
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
text = "120"
|
text = "120"
|
||||||
horizontal_alignment = 2
|
horizontal_alignment = 2
|
||||||
vertical_alignment = 1
|
vertical_alignment = 1
|
||||||
|
@ -889,6 +924,6 @@ 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="item_selected" from="SettingsScreen/DialogPanel/GraphicsPanel/HBoxContainer/settings/option_aa_msaa" 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/HBoxContainer/settings/option_aa_ss" 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/HBoxContainer/settings/fov_slider" 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"]
|
||||||
|
|
|
@ -10,9 +10,9 @@ func _ready():
|
||||||
Globalvariables.loadConfig()
|
Globalvariables.loadConfig()
|
||||||
print(Globalvariables.FOV)
|
print(Globalvariables.FOV)
|
||||||
print(Globalvariables.msaa)
|
print(Globalvariables.msaa)
|
||||||
$SettingsScreen/DialogPanel/GraphicsPanel/HBoxContainer/settings/fov_slider.value = Globalvariables.FOV
|
$SettingsScreen/DialogPanel/GraphicsPanel/FOVSlider.value = Globalvariables.FOV
|
||||||
$SettingsScreen/DialogPanel/GraphicsPanel/HBoxContainer/settings/option_aa_msaa.selected = Globalvariables.msaa
|
$SettingsScreen/DialogPanel/GraphicsPanel/AAOption.selected = Globalvariables.msaa
|
||||||
$SettingsScreen/DialogPanel/GraphicsPanel/HBoxContainer/settings/option_aa_ss.selected = Globalvariables.ssaa
|
$SettingsScreen/DialogPanel/GraphicsPanel/SSAAOption.selected = Globalvariables.ssaa
|
||||||
|
|
||||||
var moddir = DirAccess.open("user://Mods")
|
var moddir = DirAccess.open("user://Mods")
|
||||||
if moddir == null:
|
if moddir == null:
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
extends Panel
|
extends Panel
|
||||||
|
|
||||||
@export var thisTab = 0 # The tab that must be active in the settings screen for the panel to appear.
|
@export var thisTab = 0
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
$HBoxContainer/settings/option_aa_msaa.selected = get_viewport().msaa_3d
|
$AAOption.selected = get_viewport().msaa_3d
|
||||||
$HBoxContainer/settings/option_aa_ss.selected = get_viewport().screen_space_aa
|
$SSAAOption.selected = get_viewport().screen_space_aa
|
||||||
$HBoxContainer/settings/fov_slider.value = Globalvariables.FOV
|
$FOVSlider.value = Globalvariables.FOV
|
||||||
$HBoxContainer/settings/fov_slider/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):
|
||||||
|
@ -19,7 +19,7 @@ func 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
|
||||||
$HBoxContainer/settings/fov_slider/CurrentLabel.text = str(int(value))
|
$FOVSlider/CurrentLabel.text = str(int(value))
|
||||||
|
|
||||||
|
|
||||||
func _on_option_aa_ss_item_selected(index: int) -> void:
|
func _on_option_aa_ss_item_selected(index: int) -> void:
|
||||||
|
|
|
@ -31,6 +31,7 @@ Globalvariables="*res://Scripts/GlobalVariables.gd"
|
||||||
|
|
||||||
window/size/viewport_width=1280
|
window/size/viewport_width=1280
|
||||||
window/size/viewport_height=720
|
window/size/viewport_height=720
|
||||||
|
window/stretch/aspect="expand"
|
||||||
|
|
||||||
[filesystem]
|
[filesystem]
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue