ui.tscn 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. [gd_scene load_steps=5 format=3 uid="uid://cenb0bfok13vx"]
  2. [ext_resource type="Script" path="res://ui.gd" id="1_wnf2v"]
  3. [ext_resource type="Shader" path="res://cursor.gdshader" id="2_hngl5"]
  4. [sub_resource type="LabelSettings" id="LabelSettings_cnxo1"]
  5. font_size = 64
  6. [sub_resource type="ShaderMaterial" id="ShaderMaterial_84eui"]
  7. shader = ExtResource("2_hngl5")
  8. shader_parameter/color = Color(1, 1, 1, 1)
  9. [node name="UI" type="Control"]
  10. custom_minimum_size = Vector2(1024, 512)
  11. layout_mode = 3
  12. anchors_preset = 0
  13. offset_right = 40.0
  14. offset_bottom = 40.0
  15. script = ExtResource("1_wnf2v")
  16. [node name="ColorRect" type="ColorRect" parent="."]
  17. layout_mode = 1
  18. anchors_preset = 15
  19. anchor_right = 1.0
  20. anchor_bottom = 1.0
  21. grow_horizontal = 2
  22. grow_vertical = 2
  23. color = Color(0.638554, 0.499437, 0.164002, 0.384314)
  24. [node name="TopLabel" type="Label" parent="."]
  25. layout_mode = 0
  26. offset_left = 25.0
  27. offset_top = 17.0
  28. offset_right = 125.0
  29. offset_bottom = 40.0
  30. text = "This is a test!"
  31. label_settings = SubResource("LabelSettings_cnxo1")
  32. [node name="Button" type="Button" parent="."]
  33. layout_mode = 1
  34. anchors_preset = 8
  35. anchor_left = 0.5
  36. anchor_top = 0.5
  37. anchor_right = 0.5
  38. anchor_bottom = 0.5
  39. offset_left = -249.0
  40. offset_top = -48.0
  41. offset_right = 249.0
  42. offset_bottom = 48.0
  43. grow_horizontal = 2
  44. grow_vertical = 2
  45. theme_override_font_sizes/font_size = 64
  46. text = "Press this button"
  47. [node name="CountLabel" type="Label" parent="."]
  48. layout_mode = 0
  49. offset_left = 39.0
  50. offset_top = 316.0
  51. offset_right = 965.0
  52. offset_bottom = 495.0
  53. text = "The button has not been pressed."
  54. label_settings = SubResource("LabelSettings_cnxo1")
  55. horizontal_alignment = 1
  56. autowrap_mode = 3
  57. [node name="Cursor" type="ColorRect" parent="."]
  58. process_mode = 4
  59. material = SubResource("ShaderMaterial_84eui")
  60. layout_mode = 0
  61. offset_right = 32.0
  62. offset_bottom = 32.0
  63. mouse_filter = 2
  64. [connection signal="pressed" from="Button" to="." method="_on_button_pressed"]