main.tscn 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. [gd_scene load_steps=11 format=3 uid="uid://pfb5u7r1hl8t"]
  2. [ext_resource type="Script" path="res://utils/label_fps.gd" id="1"]
  3. [ext_resource type="Script" path="res://utils/label_version.gd" id="2"]
  4. [ext_resource type="Script" path="res://utils/label_engine.gd" id="3"]
  5. [ext_resource type="Script" path="res://tests_menu.gd" id="4"]
  6. [ext_resource type="Script" path="res://utils/label_test.gd" id="5"]
  7. [ext_resource type="Script" path="res://utils/label_pause.gd" id="6"]
  8. [ext_resource type="Script" path="res://utils/container_log.gd" id="10"]
  9. [ext_resource type="Script" path="res://utils/scroll_log.gd" id="11"]
  10. [ext_resource type="Script" path="res://tests.gd" id="12"]
  11. [sub_resource type="StyleBoxFlat" id="1"]
  12. bg_color = Color(0, 0, 0, 0.176471)
  13. [node name="Main" type="Control"]
  14. layout_mode = 3
  15. anchors_preset = 15
  16. anchor_right = 1.0
  17. anchor_bottom = 1.0
  18. grow_horizontal = 2
  19. grow_vertical = 2
  20. mouse_filter = 2
  21. script = ExtResource("12")
  22. [node name="TestsMenu" type="MenuButton" parent="."]
  23. layout_mode = 0
  24. offset_left = 10.0
  25. offset_top = 10.0
  26. offset_right = 125.0
  27. offset_bottom = 30.0
  28. text = "TESTS"
  29. flat = false
  30. script = ExtResource("4")
  31. [node name="LabelControls" type="Label" parent="."]
  32. layout_mode = 0
  33. offset_left = 157.0
  34. offset_top = 13.0
  35. offset_right = 375.0
  36. offset_bottom = 27.0
  37. text = "P - TOGGLE PAUSE / R - RESTART / C - TOGGLE COLLISION / F - TOGGLE FULL SCREEN / ESC - QUIT"
  38. [node name="LabelFPS" type="Label" parent="."]
  39. layout_mode = 1
  40. anchors_preset = 2
  41. anchor_top = 1.0
  42. anchor_bottom = 1.0
  43. offset_left = 10.0
  44. offset_top = -36.0
  45. offset_right = 55.0
  46. offset_bottom = -13.0
  47. grow_vertical = 0
  48. theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
  49. theme_override_constants/outline_size = 4
  50. text = "FPS: 0"
  51. script = ExtResource("1")
  52. [node name="LabelEngine" type="Label" parent="."]
  53. layout_mode = 1
  54. anchors_preset = 2
  55. anchor_top = 1.0
  56. anchor_bottom = 1.0
  57. offset_left = 10.0
  58. offset_top = -64.0
  59. offset_right = 128.0
  60. offset_bottom = -41.0
  61. grow_vertical = 0
  62. theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
  63. theme_override_constants/outline_size = 4
  64. text = "Physics engine:"
  65. script = ExtResource("3")
  66. [node name="LabelVersion" type="Label" parent="."]
  67. layout_mode = 1
  68. anchors_preset = 2
  69. anchor_top = 1.0
  70. anchor_bottom = 1.0
  71. offset_left = 10.0
  72. offset_top = -92.0
  73. offset_right = 125.0
  74. offset_bottom = -69.0
  75. grow_vertical = 0
  76. theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
  77. theme_override_constants/outline_size = 4
  78. text = "Godot Version:"
  79. script = ExtResource("2")
  80. [node name="LabelTest" type="Label" parent="."]
  81. layout_mode = 1
  82. anchors_preset = 2
  83. anchor_top = 1.0
  84. anchor_bottom = 1.0
  85. offset_left = 10.0
  86. offset_top = -120.0
  87. offset_right = 50.0
  88. offset_bottom = -97.0
  89. grow_vertical = 0
  90. theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
  91. theme_override_constants/outline_size = 4
  92. text = "Test:"
  93. script = ExtResource("5")
  94. [node name="LabelPause" type="Label" parent="."]
  95. layout_mode = 1
  96. anchors_preset = 7
  97. anchor_left = 0.5
  98. anchor_top = 1.0
  99. anchor_right = 0.5
  100. anchor_bottom = 1.0
  101. offset_left = -46.5
  102. offset_top = -584.0
  103. offset_right = 46.5
  104. offset_bottom = -547.0
  105. grow_horizontal = 2
  106. grow_vertical = 0
  107. theme_override_colors/font_color = Color(1, 1, 0, 1)
  108. theme_override_font_sizes/font_size = 24
  109. text = "PAUSED"
  110. script = ExtResource("6")
  111. [node name="PanelLog" type="Panel" parent="."]
  112. layout_mode = 1
  113. anchors_preset = 3
  114. anchor_left = 1.0
  115. anchor_top = 1.0
  116. anchor_right = 1.0
  117. anchor_bottom = 1.0
  118. offset_left = -482.0
  119. offset_top = -237.0
  120. grow_horizontal = 0
  121. grow_vertical = 0
  122. theme_override_styles/panel = SubResource("1")
  123. [node name="ButtonClear" type="Button" parent="PanelLog"]
  124. layout_mode = 1
  125. anchors_preset = 3
  126. anchor_left = 1.0
  127. anchor_top = 1.0
  128. anchor_right = 1.0
  129. anchor_bottom = 1.0
  130. offset_left = -48.0
  131. offset_top = -25.0
  132. offset_right = -5.0
  133. offset_bottom = -5.0
  134. grow_horizontal = 0
  135. grow_vertical = 0
  136. focus_mode = 0
  137. text = "Clear"
  138. [node name="CheckBoxScroll" type="CheckButton" parent="PanelLog"]
  139. layout_mode = 1
  140. anchors_preset = 3
  141. anchor_left = 1.0
  142. anchor_top = 1.0
  143. anchor_right = 1.0
  144. anchor_bottom = 1.0
  145. offset_left = -189.0
  146. offset_top = -35.0
  147. offset_right = -57.0
  148. offset_bottom = -4.0
  149. grow_horizontal = 0
  150. grow_vertical = 0
  151. focus_mode = 0
  152. text = "Auto Scroll"
  153. [node name="ScrollLog" type="ScrollContainer" parent="PanelLog"]
  154. layout_mode = 0
  155. offset_left = 10.0
  156. offset_top = 5.0
  157. offset_right = 472.0
  158. offset_bottom = 194.0
  159. script = ExtResource("11")
  160. auto_scroll = true
  161. [node name="VBoxLog" type="VBoxContainer" parent="PanelLog/ScrollLog"]
  162. layout_mode = 2
  163. size_flags_horizontal = 3
  164. size_flags_vertical = 3
  165. alignment = 2
  166. script = ExtResource("10")
  167. [node name="LabelLog" type="Label" parent="PanelLog/ScrollLog/VBoxLog"]
  168. layout_mode = 2
  169. text = "Log start"
  170. max_lines_visible = 5
  171. [connection signal="pressed" from="PanelLog/ButtonClear" to="PanelLog/ScrollLog/VBoxLog" method="clear"]
  172. [connection signal="toggled" from="PanelLog/CheckBoxScroll" to="PanelLog/ScrollLog" method="_on_check_box_scroll_toggled"]