test.tscn 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. [gd_scene load_steps=7 format=3 uid="uid://dbk0b4jkfq81v"]
  2. [ext_resource type="Script" path="res://test.gd" id="1"]
  3. [sub_resource type="StyleBoxFlat" id="1"]
  4. bg_color = Color(0.16, 0.678, 1, 0.12549)
  5. [sub_resource type="StyleBoxFlat" id="2"]
  6. bg_color = Color(0.266667, 0.266667, 0.266667, 1)
  7. border_width_left = 3
  8. border_width_top = 3
  9. border_width_right = 3
  10. border_width_bottom = 3
  11. border_color = Color(0.4, 0.4, 0.4, 1)
  12. border_blend = true
  13. [sub_resource type="StyleBoxFlat" id="3"]
  14. bg_color = Color(0.2, 0.2, 0.2, 1)
  15. border_width_left = 3
  16. border_width_top = 3
  17. border_width_right = 3
  18. border_width_bottom = 3
  19. border_color = Color(0.333333, 0.333333, 0.333333, 1)
  20. border_blend = true
  21. [sub_resource type="StyleBoxFlat" id="4"]
  22. bg_color = Color(0.133333, 0.133333, 0.133333, 1)
  23. border_width_left = 3
  24. border_width_top = 3
  25. border_width_right = 3
  26. border_width_bottom = 3
  27. border_color = Color(0.266667, 0.266667, 0.266667, 1)
  28. border_blend = true
  29. [sub_resource type="Theme" id="5"]
  30. Button/colors/font_color = Color(0.88, 0.88, 0.88, 1)
  31. Button/colors/font_color_disabled = Color(0.9, 0.9, 0.9, 0.2)
  32. Button/colors/font_color_hover = Color(0.94, 0.94, 0.94, 1)
  33. Button/colors/font_color_pressed = Color(1, 1, 1, 1)
  34. Button/constants/h_separation = 2
  35. Button/fonts/font = null
  36. Button/styles/disabled = null
  37. Button/styles/focus = SubResource("1")
  38. Button/styles/hover = SubResource("2")
  39. Button/styles/normal = SubResource("3")
  40. Button/styles/pressed = SubResource("4")
  41. [node name="Control" type="Control"]
  42. layout_mode = 3
  43. anchors_preset = 15
  44. anchor_right = 1.0
  45. anchor_bottom = 1.0
  46. grow_horizontal = 2
  47. grow_vertical = 2
  48. theme = SubResource("5")
  49. script = ExtResource("1")
  50. [node name="Panel" type="PanelContainer" parent="."]
  51. layout_mode = 1
  52. anchors_preset = 8
  53. anchor_left = 0.5
  54. anchor_top = 0.5
  55. anchor_right = 0.5
  56. anchor_bottom = 0.5
  57. offset_left = -110.0
  58. offset_top = -127.0
  59. offset_right = 110.0
  60. offset_bottom = 127.0
  61. grow_horizontal = 2
  62. grow_vertical = 2
  63. [node name="MarginContainer" type="MarginContainer" parent="Panel"]
  64. layout_mode = 2
  65. theme_override_constants/margin_left = 20
  66. theme_override_constants/margin_top = 20
  67. theme_override_constants/margin_right = 20
  68. theme_override_constants/margin_bottom = 20
  69. [node name="VBoxContainer" type="VBoxContainer" parent="Panel/MarginContainer"]
  70. layout_mode = 2
  71. theme_override_constants/separation = 10
  72. [node name="Label" type="Label" parent="Panel/MarginContainer/VBoxContainer"]
  73. layout_mode = 2
  74. text = "GUI Theming Overrides"
  75. horizontal_alignment = 1
  76. [node name="HSeparator" type="HSeparator" parent="Panel/MarginContainer/VBoxContainer"]
  77. layout_mode = 2
  78. [node name="Button" type="Button" parent="Panel/MarginContainer/VBoxContainer"]
  79. custom_minimum_size = Vector2(0, 48)
  80. layout_mode = 2
  81. text = "Click Me"
  82. [node name="Button2" type="Button" parent="Panel/MarginContainer/VBoxContainer"]
  83. custom_minimum_size = Vector2(0, 48)
  84. layout_mode = 2
  85. text = "Click Me"
  86. [node name="ResetAllButton" type="Button" parent="Panel/MarginContainer/VBoxContainer"]
  87. custom_minimum_size = Vector2(0, 48)
  88. layout_mode = 2
  89. text = "Reset All"
  90. [connection signal="pressed" from="Panel/MarginContainer/VBoxContainer/Button" to="." method="_on_button_pressed"]
  91. [connection signal="pressed" from="Panel/MarginContainer/VBoxContainer/Button2" to="." method="_on_button2_pressed"]
  92. [connection signal="pressed" from="Panel/MarginContainer/VBoxContainer/ResetAllButton" to="." method="_on_reset_all_button_pressed"]