forked from unfa/liblast
Fixed eye candy switch
parent
2f0c7fe959
commit
6e0b015aaa
|
@ -47,6 +47,8 @@ func apply_settings():
|
|||
toggle_fullscreen(settings[key])
|
||||
"Sensitivity":
|
||||
set_mouse_sensitivity(settings[key])
|
||||
"EyeCandyLighting":
|
||||
toggle_lighting(settings[key])
|
||||
|
||||
# These functions are for applying settings changes
|
||||
func quit_game():
|
||||
|
@ -72,7 +74,7 @@ func toggle_fullscreen(is_fullscreen):
|
|||
|
||||
func toggle_lighting(is_enabled):
|
||||
var map = get_tree().get_root().get_node("Main").get_node("Map")
|
||||
|
||||
|
||||
map.get_node("Lights").visible = is_enabled
|
||||
map.get_node("Decals").visible = is_enabled
|
||||
map.get_node("ReflectionProbes").visible = is_enabled
|
||||
|
|
|
@ -49,6 +49,7 @@ anchor_bottom = 0.0
|
|||
offset_top = 66.0
|
||||
offset_right = 250.0
|
||||
offset_bottom = 95.0
|
||||
theme_override_font_sizes/font_size = 16
|
||||
text = "options"
|
||||
label = "options"
|
||||
|
||||
|
|
|
@ -5,8 +5,7 @@ func on_fullscreen_toggled(button_pressed):
|
|||
GUI.toggle_fullscreen(button_pressed)
|
||||
$Fullscreen.save_data()
|
||||
|
||||
|
||||
func _on_Lighting_toggled(button_pressed):
|
||||
func on_lighting_toggled(button_pressed):
|
||||
if GUI:
|
||||
GUI.toggle_lighting(button_pressed)
|
||||
$Lighting.save_data()
|
||||
|
|
|
@ -10,7 +10,7 @@ script = ExtResource( "2" )
|
|||
[node name="Fullscreen" parent="." index="0" instance=ExtResource( "3" )]
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
offset_right = 76.0
|
||||
offset_right = 250.0
|
||||
offset_bottom = 40.0
|
||||
label = "Fullscreen"
|
||||
index = "Fullscreen"
|
||||
|
@ -19,15 +19,14 @@ index = "Fullscreen"
|
|||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
offset_top = 44.0
|
||||
offset_right = 76.0
|
||||
offset_right = 250.0
|
||||
offset_bottom = 84.0
|
||||
label = "Eye Candy Lighting"
|
||||
index = "Fullscreen"
|
||||
index = "EyeCandyLighting"
|
||||
|
||||
[node name="Back" parent="." index="2"]
|
||||
offset_top = 88.0
|
||||
offset_right = 76.0
|
||||
offset_bottom = 117.0
|
||||
|
||||
[connection signal="toggled" from="Fullscreen" to="." method="on_fullscreen_toggled"]
|
||||
[connection signal="toggled" from="Lighting" to="." method="_on_Lighting_toggled"]
|
||||
[connection signal="toggled" from="Lighting" to="." method="on_lighting_toggled"]
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
[gd_scene load_steps=4 format=3 uid="uid://bl1fc5cl4fcav"]
|
||||
|
||||
[ext_resource type="Script" path="res://Assets/UI/MenuCheckButton.gd" id="1"]
|
||||
[ext_resource type="AudioStream" uid="uid://tmb3cqyy8s33" path="res://Assets/SFX/UI_Click.wav" id="2_d1dx2"]
|
||||
[ext_resource type="AudioStream" uid="uid://dvfvty8gqab0a" path="res://Assets/SFX/UI_Hover.wav" id="3_pitbq"]
|
||||
[ext_resource type="AudioStream" uid="uid://da7hq3d1msmud" path="res://Assets/SFX/UI_Click.wav" id="2_d1dx2"]
|
||||
[ext_resource type="AudioStream" uid="uid://dc4rractm5dhf" path="res://Assets/SFX/UI_Hover.wav" id="3_pitbq"]
|
||||
|
||||
[node name="MenuCheckButton" type="CheckButton"]
|
||||
anchor_right = 1.0
|
||||
|
@ -14,11 +14,9 @@ __meta__ = {
|
|||
|
||||
[node name="ClickSound" type="AudioStreamPlayer" parent="."]
|
||||
stream = ExtResource( "2_d1dx2" )
|
||||
script = null
|
||||
|
||||
[node name="HoverSound" type="AudioStreamPlayer" parent="."]
|
||||
stream = ExtResource( "3_pitbq" )
|
||||
script = null
|
||||
|
||||
[connection signal="mouse_entered" from="." to="." method="_on_MenuCheckButton_mouse_entered"]
|
||||
[connection signal="toggled" from="." to="." method="on_toggle"]
|
||||
|
|
|
@ -5,3 +5,4 @@
|
|||
|
||||
[node name="MenuData" instance=ExtResource( "1" )]
|
||||
script = ExtResource( "2" )
|
||||
index = ""
|
||||
|
|
Loading…
Reference in New Issue