main.tscn 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  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 = -19.0
  45. offset_right = 50.0
  46. offset_bottom = -5.0
  47. grow_vertical = 0
  48. text = "FPS: 0"
  49. script = ExtResource("1")
  50. [node name="LabelEngine" type="Label" parent="."]
  51. layout_mode = 1
  52. anchors_preset = 2
  53. anchor_top = 1.0
  54. anchor_bottom = 1.0
  55. offset_left = 10.0
  56. offset_top = -39.0
  57. offset_right = 50.0
  58. offset_bottom = -25.0
  59. grow_vertical = 0
  60. text = "Physics engine:"
  61. script = ExtResource("3")
  62. [node name="LabelVersion" type="Label" parent="."]
  63. layout_mode = 1
  64. anchors_preset = 2
  65. anchor_top = 1.0
  66. anchor_bottom = 1.0
  67. offset_left = 10.0
  68. offset_top = -59.0
  69. offset_right = 50.0
  70. offset_bottom = -45.0
  71. grow_vertical = 0
  72. text = "Godot Version:"
  73. script = ExtResource("2")
  74. [node name="LabelTest" type="Label" parent="."]
  75. layout_mode = 1
  76. anchors_preset = 2
  77. anchor_top = 1.0
  78. anchor_bottom = 1.0
  79. offset_left = 10.0
  80. offset_top = -79.0
  81. offset_right = 50.0
  82. offset_bottom = -65.0
  83. grow_vertical = 0
  84. text = "Test:"
  85. script = ExtResource("5")
  86. [node name="LabelPause" type="Label" parent="."]
  87. layout_mode = 1
  88. anchors_preset = 7
  89. anchor_left = 0.5
  90. anchor_top = 1.0
  91. anchor_right = 0.5
  92. anchor_bottom = 1.0
  93. offset_left = -46.5
  94. offset_top = -584.0
  95. offset_right = 46.5
  96. offset_bottom = -547.0
  97. grow_horizontal = 2
  98. grow_vertical = 0
  99. theme_override_colors/font_color = Color(1, 1, 0, 1)
  100. theme_override_font_sizes/font_size = 24
  101. text = "PAUSED"
  102. script = ExtResource("6")
  103. [node name="PanelLog" type="Panel" parent="."]
  104. layout_mode = 1
  105. anchors_preset = 3
  106. anchor_left = 1.0
  107. anchor_top = 1.0
  108. anchor_right = 1.0
  109. anchor_bottom = 1.0
  110. offset_left = -482.0
  111. offset_top = -237.0
  112. grow_horizontal = 0
  113. grow_vertical = 0
  114. theme_override_styles/panel = SubResource("1")
  115. [node name="ButtonClear" type="Button" parent="PanelLog"]
  116. layout_mode = 1
  117. anchors_preset = 3
  118. anchor_left = 1.0
  119. anchor_top = 1.0
  120. anchor_right = 1.0
  121. anchor_bottom = 1.0
  122. offset_left = -48.0
  123. offset_top = -25.0
  124. offset_right = -5.0
  125. offset_bottom = -5.0
  126. grow_horizontal = 0
  127. grow_vertical = 0
  128. focus_mode = 0
  129. text = "Clear"
  130. [node name="CheckBoxScroll" type="CheckButton" parent="PanelLog"]
  131. layout_mode = 1
  132. anchors_preset = 3
  133. anchor_left = 1.0
  134. anchor_top = 1.0
  135. anchor_right = 1.0
  136. anchor_bottom = 1.0
  137. offset_left = -189.0
  138. offset_top = -35.0
  139. offset_right = -57.0
  140. offset_bottom = -4.0
  141. grow_horizontal = 0
  142. grow_vertical = 0
  143. focus_mode = 0
  144. text = "Auto Scroll"
  145. [node name="ScrollLog" type="ScrollContainer" parent="PanelLog"]
  146. layout_mode = 0
  147. offset_left = 10.0
  148. offset_top = 5.0
  149. offset_right = 472.0
  150. offset_bottom = 194.0
  151. script = ExtResource("11")
  152. auto_scroll = true
  153. [node name="VBoxLog" type="VBoxContainer" parent="PanelLog/ScrollLog"]
  154. layout_mode = 2
  155. size_flags_horizontal = 3
  156. size_flags_vertical = 3
  157. alignment = 2
  158. script = ExtResource("10")
  159. [node name="LabelLog" type="Label" parent="PanelLog/ScrollLog/VBoxLog"]
  160. layout_mode = 2
  161. text = "Log start"
  162. max_lines_visible = 5
  163. [connection signal="pressed" from="PanelLog/ButtonClear" to="PanelLog/ScrollLog/VBoxLog" method="clear"]
  164. [connection signal="toggled" from="PanelLog/CheckBoxScroll" to="PanelLog/ScrollLog" method="_on_check_box_scroll_toggled"]