main.tscn 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. [gd_scene load_steps=11 format=3 uid="uid://6a0nxwkgf5dq"]
  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 = 646.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 = -19.0
  45. offset_right = 50.0
  46. offset_bottom = -5.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 = -56.0
  59. offset_right = 128.0
  60. offset_bottom = -33.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 = -84.0
  73. offset_right = 125.0
  74. offset_bottom = -61.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 = -112.0
  87. offset_right = 50.0
  88. offset_bottom = -89.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. modulate = Color(1, 1, 0, 1)
  96. layout_mode = 1
  97. anchors_preset = 5
  98. anchor_left = 0.5
  99. anchor_right = 0.5
  100. offset_left = -62.0
  101. offset_top = 48.0
  102. offset_right = 62.0
  103. offset_bottom = 96.0
  104. grow_horizontal = 2
  105. theme_override_font_sizes/font_size = 32
  106. text = "PAUSED"
  107. script = ExtResource("6")
  108. [node name="PanelLog" type="Panel" parent="."]
  109. layout_mode = 1
  110. anchors_preset = 3
  111. anchor_left = 1.0
  112. anchor_top = 1.0
  113. anchor_right = 1.0
  114. anchor_bottom = 1.0
  115. offset_left = -630.0
  116. offset_top = -251.0
  117. grow_horizontal = 0
  118. grow_vertical = 0
  119. theme_override_styles/panel = SubResource("1")
  120. [node name="ButtonClear" type="Button" parent="PanelLog"]
  121. layout_mode = 1
  122. anchors_preset = 3
  123. anchor_left = 1.0
  124. anchor_top = 1.0
  125. anchor_right = 1.0
  126. anchor_bottom = 1.0
  127. offset_left = -48.0
  128. offset_top = -25.0
  129. offset_right = -5.0
  130. offset_bottom = -5.0
  131. grow_horizontal = 0
  132. grow_vertical = 0
  133. focus_mode = 0
  134. text = "Clear"
  135. [node name="CheckBoxScroll" type="CheckButton" parent="PanelLog"]
  136. layout_mode = 1
  137. anchors_preset = 3
  138. anchor_left = 1.0
  139. anchor_top = 1.0
  140. anchor_right = 1.0
  141. anchor_bottom = 1.0
  142. offset_left = -261.0
  143. offset_top = -35.0
  144. offset_right = -62.0
  145. offset_bottom = -4.0
  146. grow_horizontal = 0
  147. grow_vertical = 0
  148. focus_mode = 0
  149. text = "Automatic Scrolling"
  150. [node name="ScrollLog" type="ScrollContainer" parent="PanelLog"]
  151. layout_mode = 0
  152. offset_left = 10.0
  153. offset_top = 5.0
  154. offset_right = 619.0
  155. offset_bottom = 210.0
  156. script = ExtResource("11")
  157. auto_scroll = true
  158. [node name="VBoxLog" type="VBoxContainer" parent="PanelLog/ScrollLog"]
  159. layout_mode = 2
  160. size_flags_horizontal = 3
  161. size_flags_vertical = 3
  162. alignment = 2
  163. script = ExtResource("10")
  164. [node name="LabelLog" type="Label" parent="PanelLog/ScrollLog/VBoxLog"]
  165. layout_mode = 2
  166. text = "Log start"
  167. max_lines_visible = 5
  168. [connection signal="pressed" from="PanelLog/ButtonClear" to="PanelLog/ScrollLog/VBoxLog" method="clear"]
  169. [connection signal="toggled" from="PanelLog/CheckBoxScroll" to="PanelLog/ScrollLog" method="_on_check_box_scroll_toggled"]