main.tscn 4.4 KB

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