From 0199db471c79fecb668ddb31f98daba235f8592b Mon Sep 17 00:00:00 2001 From: unfa Date: Thu, 16 Dec 2021 00:31:32 +0100 Subject: [PATCH] Added extra percent display to the scaling slider + changed the options to go from 25% to 200% as more than 200% doesn't seem to be supported. --- Game/Assets/UI/GraphicsMenu.gd | 5 +- Game/Assets/UI/GraphicsMenu.tscn | 109 ++++++++++++++++--------------- Game/Assets/UI/MenuSlider.tscn | 24 ++++--- 3 files changed, 75 insertions(+), 63 deletions(-) diff --git a/Game/Assets/UI/GraphicsMenu.gd b/Game/Assets/UI/GraphicsMenu.gd index 29cff34..8545f11 100644 --- a/Game/Assets/UI/GraphicsMenu.gd +++ b/Game/Assets/UI/GraphicsMenu.gd @@ -82,9 +82,10 @@ func _on_RenderScale_value_changed(value): 2: 0.75, 3: 1.0, 4: 2.0, - 5: 4.0, - 6: 8.0, + #5: 4.0, + #6: 8.0, } if GUI: GUI.set_render_scale(value_map.get(value as int)) $RenderScale.save_data() + $RenderScale/ValueLabel.text = str(value_map.get(value as int)* 100) + "%" diff --git a/Game/Assets/UI/GraphicsMenu.tscn b/Game/Assets/UI/GraphicsMenu.tscn index 3824cf2..2936940 100644 --- a/Game/Assets/UI/GraphicsMenu.tscn +++ b/Game/Assets/UI/GraphicsMenu.tscn @@ -11,7 +11,7 @@ script = ExtResource( "2" ) [node name="Fullscreen" parent="." index="0" instance=ExtResource( "3" )] anchor_right = 0.0 anchor_bottom = 0.0 -offset_right = 250.0 +offset_right = 290.0 offset_bottom = 40.0 theme_override_font_sizes/font_size = 16 label = "Fullscreen" @@ -21,7 +21,7 @@ index = "GraphicsFullscreen" anchor_right = 0.0 anchor_bottom = 0.0 offset_top = 44.0 -offset_right = 250.0 +offset_right = 290.0 offset_bottom = 84.0 label = "Ambient Occlusion" index = "GraphicsAmbientOcclusion" @@ -30,7 +30,7 @@ index = "GraphicsAmbientOcclusion" anchor_right = 0.0 anchor_bottom = 0.0 offset_top = 88.0 -offset_right = 250.0 +offset_right = 290.0 offset_bottom = 128.0 label = "Shadows" index = "GraphicsShadows" @@ -39,7 +39,7 @@ index = "GraphicsShadows" anchor_right = 0.0 anchor_bottom = 0.0 offset_top = 132.0 -offset_right = 250.0 +offset_right = 290.0 offset_bottom = 172.0 label = "Global Illumination" index = "GraphicsGlobalIllumination" @@ -48,7 +48,7 @@ index = "GraphicsGlobalIllumination" anchor_right = 0.0 anchor_bottom = 0.0 offset_top = 176.0 -offset_right = 250.0 +offset_right = 290.0 offset_bottom = 216.0 label = "Screen Space Reflections" index = "GraphicsScreenSpaceReflections" @@ -57,7 +57,7 @@ index = "GraphicsScreenSpaceReflections" anchor_right = 0.0 anchor_bottom = 0.0 offset_top = 220.0 -offset_right = 250.0 +offset_right = 290.0 offset_bottom = 260.0 label = "Reflection Probes" index = "GraphicsReflectionProbes" @@ -66,7 +66,7 @@ index = "GraphicsReflectionProbes" anchor_right = 0.0 anchor_bottom = 0.0 offset_top = 264.0 -offset_right = 250.0 +offset_right = 290.0 offset_bottom = 304.0 label = "Glow" index = "GraphicsGlow" @@ -75,91 +75,98 @@ index = "GraphicsGlow" anchor_right = 0.0 anchor_bottom = 0.0 offset_top = 308.0 -offset_right = 250.0 +offset_right = 290.0 offset_bottom = 348.0 label = "MSAA" index = "GraphicsMSAA" -[node name="FXAA" parent="." index="8" instance=ExtResource( "3" )] +[node name="RenderScale" parent="." index="8" instance=ExtResource( "4_txfvn" )] anchor_right = 0.0 anchor_bottom = 0.0 offset_top = 352.0 -offset_right = 250.0 +offset_right = 290.0 offset_bottom = 392.0 -label = "FXAA" -index = "GraphicsFXAA" - -[node name="RenderScale" parent="." index="9" instance=ExtResource( "4_txfvn" )] -anchor_right = 0.0 -anchor_bottom = 0.0 -offset_top = 396.0 -offset_right = 250.0 -offset_bottom = 419.0 -label = "Render Scale" +label = "Scale" index = "graphics_render_scale" [node name="Label" parent="RenderScale" index="0"] -offset_top = 0.0 -offset_right = 46.0 -offset_bottom = 23.0 +offset_top = 8.0 +offset_right = 1.0 +offset_bottom = 31.0 [node name="Slider" parent="RenderScale" index="1"] -offset_left = 50.0 -offset_right = 250.0 -max_value = 6.0 +offset_left = 5.0 +offset_right = 205.0 +max_value = 4.0 value = 3.0 scrollable = false -tick_count = 7 +tick_count = 3 ticks_on_borders = true -[node name="FSR" parent="." index="10" instance=ExtResource( "3" )] +[node name="ValueLabel" parent="RenderScale" index="2"] +offset_left = 209.0 +offset_top = 8.0 +offset_right = 210.0 +offset_bottom = 31.0 + +[node name="FXAA" parent="RenderScale" index="4" instance=ExtResource( "3" )] anchor_right = 0.0 anchor_bottom = 0.0 -offset_top = 423.0 -offset_right = 250.0 -offset_bottom = 463.0 +offset_left = 214.0 +offset_right = 290.0 +offset_bottom = 40.0 +label = "FXAA" +index = "GraphicsFXAA" + +[node name="FSR" parent="." index="9" instance=ExtResource( "3" )] +anchor_right = 0.0 +anchor_bottom = 0.0 +offset_top = 396.0 +offset_right = 290.0 +offset_bottom = 436.0 label = "FSR" index = "GraphicsFSR" -[node name="Debanding" parent="." index="11" instance=ExtResource( "3" )] +[node name="Debanding" parent="." index="10" instance=ExtResource( "3" )] anchor_right = 0.0 anchor_bottom = 0.0 -offset_top = 467.0 -offset_right = 250.0 -offset_bottom = 507.0 +offset_top = 440.0 +offset_right = 290.0 +offset_bottom = 480.0 label = "Debanding" index = "GraphicsDebanding" -[node name="DecalsStatic" parent="." index="12" instance=ExtResource( "3" )] +[node name="DecalsStatic" parent="." index="11" instance=ExtResource( "3" )] anchor_right = 0.0 anchor_bottom = 0.0 -offset_top = 511.0 -offset_right = 250.0 -offset_bottom = 551.0 +offset_top = 484.0 +offset_right = 290.0 +offset_bottom = 524.0 label = "Decals Static" index = "GraphicsDecalsStatic" -[node name="DecalsDecals" parent="." index="13" instance=ExtResource( "3" )] +[node name="DecalsDecals" parent="." index="12" instance=ExtResource( "3" )] anchor_right = 0.0 anchor_bottom = 0.0 -offset_top = 555.0 -offset_right = 250.0 -offset_bottom = 595.0 +offset_top = 528.0 +offset_right = 290.0 +offset_bottom = 568.0 label = "Decals Decals" index = "GraphicsDecalsDecals" -[node name="DynamicLights" parent="." index="14" instance=ExtResource( "3" )] +[node name="DynamicLights" parent="." index="13" instance=ExtResource( "3" )] anchor_right = 0.0 anchor_bottom = 0.0 -offset_top = 599.0 -offset_right = 250.0 -offset_bottom = 639.0 +offset_top = 572.0 +offset_right = 290.0 +offset_bottom = 612.0 label = "Dynamic Lights" index = "GraphicsDynamicLights" -[node name="Back" parent="." index="15"] -offset_top = 643.0 -offset_bottom = 672.0 +[node name="Back" parent="." index="14"] +offset_top = 616.0 +offset_right = 290.0 +offset_bottom = 645.0 [connection signal="toggled" from="Fullscreen" to="." method="on_fullscreen_toggled"] [connection signal="toggled" from="AmbientOcclusion" to="." method="on_ambient_occlusion_toggled"] @@ -169,8 +176,8 @@ offset_bottom = 672.0 [connection signal="toggled" from="ReflectionProbes" to="." method="on_reflection_probes_toggled"] [connection signal="toggled" from="Glow" to="." method="on_glow_toggled"] [connection signal="toggled" from="MSAA" to="." method="on_MSAA_toggled"] -[connection signal="toggled" from="FXAA" to="." method="on_FXAA_toggled"] [connection signal="value_changed" from="RenderScale/Slider" to="." method="_on_RenderScale_value_changed"] +[connection signal="toggled" from="RenderScale/FXAA" to="." method="on_FXAA_toggled"] [connection signal="toggled" from="FSR" to="." method="on_FSR_toggled"] [connection signal="toggled" from="Debanding" to="." method="on_debanding_toggled"] [connection signal="toggled" from="DecalsStatic" to="." method="on_decals_static_toggled"] diff --git a/Game/Assets/UI/MenuSlider.tscn b/Game/Assets/UI/MenuSlider.tscn index dc1580a..d468efe 100644 --- a/Game/Assets/UI/MenuSlider.tscn +++ b/Game/Assets/UI/MenuSlider.tscn @@ -1,8 +1,8 @@ [gd_scene load_steps=4 format=3 uid="uid://bwqwic7ex6muv"] [ext_resource type="Script" path="res://Assets/UI/MenuSlider.gd" id="1_vhxwo"] -[ext_resource type="AudioStream" uid="uid://tmb3cqyy8s33" path="res://Assets/SFX/UI_Click.wav" id="2_weawk"] -[ext_resource type="AudioStream" uid="uid://dvfvty8gqab0a" path="res://Assets/SFX/UI_Hover.wav" id="3_b58yr"] +[ext_resource type="AudioStream" uid="uid://da7hq3d1msmud" path="res://Assets/SFX/UI_Click.wav" id="2_weawk"] +[ext_resource type="AudioStream" uid="uid://dc4rractm5dhf" path="res://Assets/SFX/UI_Hover.wav" id="3_b58yr"] [node name="MenuSlider" type="HBoxContainer"] anchor_right = 1.0 @@ -14,29 +14,33 @@ __meta__ = { [node name="Label" type="Label" parent="."] offset_top = 288.0 -offset_right = 510.0 +offset_right = 338.0 offset_bottom = 311.0 size_flags_horizontal = 3 -structured_text_bidi_override_options = [] -script = null [node name="Slider" type="HSlider" parent="."] -offset_left = 514.0 -offset_right = 1024.0 +offset_left = 342.0 +offset_right = 681.0 offset_bottom = 16.0 rect_min_size = Vector2(200, 0) rect_pivot_offset = Vector2(-908, 0) size_flags_horizontal = 3 -script = null + +[node name="ValueLabel" type="Label" parent="."] +offset_left = 685.0 +offset_top = 288.0 +offset_right = 1024.0 +offset_bottom = 311.0 +size_flags_horizontal = 3 +align = 1 +valign = 1 [node name="ClickSound" type="AudioStreamPlayer" parent="."] stream = ExtResource( "2_weawk" ) volume_db = -12.0 -script = null [node name="HoverSound" type="AudioStreamPlayer" parent="."] stream = ExtResource( "3_b58yr" ) -script = null [connection signal="mouse_entered" from="Slider" to="." method="_on_Slider_mouse_entered"] [connection signal="value_changed" from="Slider" to="." method="on_value_changed"]