gui_panel_3d.tscn 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. [gd_scene load_steps=7 format=3 uid="uid://dvl383ispakmn"]
  2. [ext_resource type="Script" path="res://gui_3d.gd" id="1"]
  3. [ext_resource type="Texture2D" uid="uid://brwp8bimc75uu" path="res://icon.webp" id="2"]
  4. [sub_resource type="QuadMesh" id="1"]
  5. size = Vector2(3, 2)
  6. [sub_resource type="ViewportTexture" id="2"]
  7. viewport_path = NodePath("SubViewport")
  8. [sub_resource type="StandardMaterial3D" id="3"]
  9. resource_local_to_scene = true
  10. transparency = 1
  11. shading_mode = 0
  12. albedo_texture = SubResource("2")
  13. [sub_resource type="BoxShape3D" id="4"]
  14. size = Vector3(3, 2, 0.1)
  15. [node name="GUIPanel3D" type="Node3D"]
  16. process_mode = 3
  17. script = ExtResource("1")
  18. [node name="SubViewport" type="SubViewport" parent="."]
  19. gui_embed_subwindows = true
  20. size = Vector2i(560, 360)
  21. render_target_update_mode = 4
  22. [node name="GUI" type="Control" parent="SubViewport"]
  23. layout_mode = 3
  24. anchors_preset = 0
  25. offset_right = 560.0
  26. offset_bottom = 360.0
  27. mouse_filter = 1
  28. [node name="Panel" type="Panel" parent="SubViewport/GUI"]
  29. layout_mode = 0
  30. anchor_right = 1.0
  31. anchor_bottom = 1.0
  32. [node name="VBoxContainer" type="VBoxContainer" parent="SubViewport/GUI/Panel"]
  33. layout_mode = 1
  34. anchors_preset = 9
  35. anchor_bottom = 1.0
  36. offset_left = 20.0
  37. offset_top = 20.0
  38. offset_right = 319.0
  39. offset_bottom = -20.0
  40. grow_vertical = 2
  41. theme_override_constants/separation = 13
  42. [node name="Label" type="Label" parent="SubViewport/GUI/Panel/VBoxContainer"]
  43. layout_mode = 2
  44. text = "Hello world!"
  45. horizontal_alignment = 1
  46. [node name="Button" type="Button" parent="SubViewport/GUI/Panel/VBoxContainer"]
  47. layout_mode = 2
  48. text = "A button!"
  49. [node name="LineEdit" type="LineEdit" parent="SubViewport/GUI/Panel/VBoxContainer"]
  50. layout_mode = 2
  51. placeholder_text = "Enter text here..."
  52. [node name="HSlider" type="HSlider" parent="SubViewport/GUI/Panel/VBoxContainer"]
  53. layout_mode = 2
  54. step = 0.0
  55. ticks_on_borders = true
  56. [node name="ColorRect" type="ColorRect" parent="SubViewport/GUI/Panel"]
  57. layout_mode = 1
  58. anchors_preset = 1
  59. anchor_left = 1.0
  60. anchor_right = 1.0
  61. offset_left = -182.0
  62. offset_top = 16.0
  63. offset_right = -54.0
  64. offset_bottom = 144.0
  65. grow_horizontal = 0
  66. color = Color(1, 0, 0, 1)
  67. [node name="TextureRect" type="TextureRect" parent="SubViewport/GUI/Panel"]
  68. layout_mode = 1
  69. anchors_preset = 1
  70. anchor_left = 1.0
  71. anchor_right = 1.0
  72. offset_left = -166.0
  73. offset_top = 32.0
  74. offset_right = -70.0
  75. offset_bottom = 128.0
  76. grow_horizontal = 0
  77. texture = ExtResource("2")
  78. expand_mode = 1
  79. [node name="VSlider" type="VSlider" parent="SubViewport/GUI/Panel"]
  80. layout_mode = 1
  81. anchors_preset = 11
  82. anchor_left = 1.0
  83. anchor_right = 1.0
  84. anchor_bottom = 1.0
  85. offset_left = -37.0
  86. offset_top = 16.0
  87. offset_right = -5.0
  88. offset_bottom = -16.0
  89. grow_horizontal = 0
  90. grow_vertical = 2
  91. step = 0.0
  92. [node name="OptionButton" type="OptionButton" parent="SubViewport/GUI/Panel"]
  93. layout_mode = 1
  94. anchors_preset = 3
  95. anchor_left = 1.0
  96. anchor_top = 1.0
  97. anchor_right = 1.0
  98. anchor_bottom = 1.0
  99. offset_left = -227.0
  100. offset_top = -208.0
  101. offset_right = -39.0
  102. offset_bottom = -147.0
  103. grow_horizontal = 0
  104. grow_vertical = 0
  105. selected = 0
  106. item_count = 3
  107. popup/item_0/text = "Item 0"
  108. popup/item_1/text = "Item 1"
  109. popup/item_1/id = 1
  110. popup/item_2/text = "Item 2"
  111. popup/item_2/id = 2
  112. [node name="Quad" type="MeshInstance3D" parent="."]
  113. mesh = SubResource("1")
  114. surface_material_override/0 = SubResource("3")
  115. [node name="Area3D" type="Area3D" parent="Quad"]
  116. collision_layer = 2
  117. input_capture_on_drag = true
  118. [node name="CollisionShape3D" type="CollisionShape3D" parent="Quad/Area3D"]
  119. shape = SubResource("4")