options.tscn 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. [gd_scene load_steps=8 format=3 uid="uid://e22n700qhxqr"]
  2. [ext_resource type="Script" path="res://menu/options/options.gd" id="1"]
  3. [ext_resource type="Theme" uid="uid://ckax6htygmelo" path="res://menu/theme/theme.tres" id="1_1y7gy"]
  4. [ext_resource type="Script" path="res://menu/options/option_buttons.gd" id="2"]
  5. [ext_resource type="Texture2D" uid="uid://ej6lqf2fptv8" path="res://menu/button.png" id="3"]
  6. [ext_resource type="Texture2D" uid="uid://blcjvv0p0a6v8" path="res://menu/button_pressed.png" id="5_g68rn"]
  7. [ext_resource type="Texture2D" uid="uid://cfh73c8wnvgol" path="res://menu/button_hover.png" id="6_idu7c"]
  8. [ext_resource type="Texture2D" uid="uid://h208mfx7dyy2" path="res://menu/button_focus.png" id="7_gmbws"]
  9. [node name="Options" type="HBoxContainer"]
  10. visible = false
  11. anchors_preset = 15
  12. anchor_right = 1.0
  13. anchor_bottom = 1.0
  14. grow_horizontal = 2
  15. grow_vertical = 2
  16. theme = ExtResource("1_1y7gy")
  17. alignment = 1
  18. script = ExtResource("1")
  19. [node name="VBoxContainer" type="VBoxContainer" parent="."]
  20. theme_override_constants/separation = 20
  21. alignment = 1
  22. [node name="OptionsBackground" type="ColorRect" parent="VBoxContainer"]
  23. self_modulate = Color(0.45098, 0.45098, 0.45098, 1)
  24. custom_minimum_size = Vector2(1000, 250)
  25. color = Color(0.25098, 0.25098, 0.25098, 0.627451)
  26. [node name="OptionButtons" type="GridContainer" parent="VBoxContainer/OptionsBackground"]
  27. anchors_preset = 8
  28. anchor_left = 0.5
  29. anchor_top = 0.5
  30. anchor_right = 0.5
  31. anchor_bottom = 0.5
  32. offset_left = -400.0
  33. offset_top = -66.0
  34. offset_right = 400.0
  35. offset_bottom = 66.0
  36. grow_horizontal = 2
  37. grow_vertical = 2
  38. theme_override_constants/h_separation = 20
  39. columns = 2
  40. script = ExtResource("2")
  41. [node name="RenderDistanceLabel" type="Label" parent="VBoxContainer/OptionsBackground/OptionButtons"]
  42. size_flags_vertical = 5
  43. theme_override_font_sizes/font_size = 60
  44. text = "Render distance: 3"
  45. horizontal_alignment = 2
  46. [node name="RenderDistanceSlider" type="HSlider" parent="VBoxContainer/OptionsBackground/OptionButtons"]
  47. size_flags_horizontal = 3
  48. size_flags_vertical = 3
  49. min_value = 3.0
  50. max_value = 10.0
  51. value = 7.0
  52. [node name="FogLabel" type="Label" parent="VBoxContainer/OptionsBackground/OptionButtons"]
  53. size_flags_vertical = 5
  54. theme_override_font_sizes/font_size = 60
  55. text = "Fog Enabled"
  56. horizontal_alignment = 2
  57. [node name="FogCheckBox" type="CheckBox" parent="VBoxContainer/OptionsBackground/OptionButtons"]
  58. size_flags_horizontal = 3
  59. size_flags_vertical = 3
  60. [node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer"]
  61. alignment = 1
  62. [node name="Back" type="TextureButton" parent="VBoxContainer/HBoxContainer"]
  63. texture_normal = ExtResource("3")
  64. texture_pressed = ExtResource("5_g68rn")
  65. texture_hover = ExtResource("6_idu7c")
  66. texture_focused = ExtResource("7_gmbws")
  67. [node name="Label" type="Label" parent="VBoxContainer/HBoxContainer/Back"]
  68. anchors_preset = 15
  69. anchor_right = 1.0
  70. anchor_bottom = 1.0
  71. offset_top = -1.0
  72. offset_bottom = -18.0
  73. grow_horizontal = 2
  74. grow_vertical = 2
  75. theme_override_font_sizes/font_size = 60
  76. text = "Back"
  77. horizontal_alignment = 1
  78. vertical_alignment = 1
  79. [connection signal="value_changed" from="VBoxContainer/OptionsBackground/OptionButtons/RenderDistanceSlider" to="VBoxContainer/OptionsBackground/OptionButtons" method="_on_RenderDistanceSlider_value_changed"]
  80. [connection signal="pressed" from="VBoxContainer/OptionsBackground/OptionButtons/FogCheckBox" to="VBoxContainer/OptionsBackground/OptionButtons" method="_on_FogCheckBox_pressed"]
  81. [connection signal="pressed" from="VBoxContainer/HBoxContainer/Back" to="." method="_on_Back_pressed"]