json_editor.tscn 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  1. [gd_scene load_steps=2 format=3 uid="uid://bsyqoblcrf33j"]
  2. [ext_resource type="Script" uid="uid://cn856n7rmy8pp" path="res://dev_tools/json_editor/json_editor.gd" id="1_gr6lf"]
  3. [node name="Control" type="Control"]
  4. layout_mode = 3
  5. anchors_preset = 15
  6. anchor_right = 1.0
  7. anchor_bottom = 1.0
  8. grow_horizontal = 2
  9. grow_vertical = 2
  10. script = ExtResource("1_gr6lf")
  11. [node name="HBoxContainer" type="HBoxContainer" parent="."]
  12. layout_mode = 1
  13. anchors_preset = 15
  14. anchor_right = 1.0
  15. anchor_bottom = 1.0
  16. offset_left = 16.0
  17. offset_top = 16.0
  18. offset_right = -16.0
  19. offset_bottom = -8.0
  20. grow_horizontal = 2
  21. grow_vertical = 2
  22. theme_override_constants/separation = 20
  23. [node name="VBoxContainer" type="VBoxContainer" parent="HBoxContainer"]
  24. layout_mode = 2
  25. [node name="Label" type="Label" parent="HBoxContainer/VBoxContainer"]
  26. layout_mode = 2
  27. theme_override_font_sizes/font_size = 26
  28. text = "json editor"
  29. [node name="search" type="VBoxContainer" parent="HBoxContainer/VBoxContainer"]
  30. custom_minimum_size = Vector2(0, 650)
  31. layout_mode = 2
  32. metadata/_tab_index = 0
  33. [node name="MarginContainer" type="MarginContainer" parent="HBoxContainer/VBoxContainer/search"]
  34. layout_mode = 2
  35. theme_override_constants/margin_left = 15
  36. theme_override_constants/margin_top = 10
  37. theme_override_constants/margin_right = 5
  38. theme_override_constants/margin_bottom = 10
  39. [node name="VBoxContainer" type="VBoxContainer" parent="HBoxContainer/VBoxContainer/search/MarginContainer"]
  40. custom_minimum_size = Vector2(620, 640)
  41. layout_mode = 2
  42. [node name="SearchBar" type="LineEdit" parent="HBoxContainer/VBoxContainer/search/MarginContainer/VBoxContainer"]
  43. layout_mode = 2
  44. placeholder_text = "Type to search"
  45. [node name="MarginContainer4" type="MarginContainer" parent="HBoxContainer/VBoxContainer/search/MarginContainer/VBoxContainer"]
  46. layout_mode = 2
  47. theme_override_constants/margin_bottom = 5
  48. [node name="ScrollContainer" type="ScrollContainer" parent="HBoxContainer/VBoxContainer/search/MarginContainer/VBoxContainer"]
  49. custom_minimum_size = Vector2(0, 10)
  50. layout_mode = 2
  51. size_flags_vertical = 3
  52. horizontal_scroll_mode = 0
  53. [node name="ItemContainer" type="VBoxContainer" parent="HBoxContainer/VBoxContainer/search/MarginContainer/VBoxContainer/ScrollContainer"]
  54. layout_mode = 2
  55. size_flags_horizontal = 3
  56. [node name="NewProcess" type="Button" parent="HBoxContainer/VBoxContainer"]
  57. layout_mode = 2
  58. text = "New Process
  59. "
  60. [node name="SaveChanges" type="Button" parent="HBoxContainer/VBoxContainer"]
  61. layout_mode = 2
  62. text = "Save Changes"
  63. [node name="SaveNew" type="Button" parent="HBoxContainer/VBoxContainer"]
  64. layout_mode = 2
  65. text = "Save New"
  66. [node name="DeleteProcess" type="Button" parent="HBoxContainer/VBoxContainer"]
  67. layout_mode = 2
  68. text = "Delete Process"
  69. [node name="SortJSON" type="Button" parent="HBoxContainer/VBoxContainer"]
  70. layout_mode = 2
  71. text = "Sort JSON"
  72. [node name="VBoxContainer2" type="VBoxContainer" parent="HBoxContainer"]
  73. layout_mode = 2
  74. size_flags_horizontal = 3
  75. [node name="MarginContainer" type="MarginContainer" parent="HBoxContainer/VBoxContainer2"]
  76. layout_mode = 2
  77. theme_override_constants/margin_bottom = 40
  78. [node name="HBoxContainer" type="HBoxContainer" parent="HBoxContainer/VBoxContainer2"]
  79. layout_mode = 2
  80. [node name="Label" type="Label" parent="HBoxContainer/VBoxContainer2/HBoxContainer"]
  81. custom_minimum_size = Vector2(250, 0)
  82. layout_mode = 2
  83. text = "Key (process command):"
  84. [node name="key" type="LineEdit" parent="HBoxContainer/VBoxContainer2/HBoxContainer"]
  85. layout_mode = 2
  86. size_flags_horizontal = 3
  87. [node name="HBoxContainer2" type="HBoxContainer" parent="HBoxContainer/VBoxContainer2"]
  88. layout_mode = 2
  89. [node name="Label" type="Label" parent="HBoxContainer/VBoxContainer2/HBoxContainer2"]
  90. custom_minimum_size = Vector2(250, 0)
  91. layout_mode = 2
  92. text = "Category:"
  93. [node name="category" type="LineEdit" parent="HBoxContainer/VBoxContainer2/HBoxContainer2"]
  94. layout_mode = 2
  95. size_flags_horizontal = 3
  96. [node name="HBoxContainer3" type="HBoxContainer" parent="HBoxContainer/VBoxContainer2"]
  97. layout_mode = 2
  98. [node name="Label" type="Label" parent="HBoxContainer/VBoxContainer2/HBoxContainer3"]
  99. custom_minimum_size = Vector2(250, 0)
  100. layout_mode = 2
  101. text = "Subcategory:"
  102. [node name="subcategory" type="LineEdit" parent="HBoxContainer/VBoxContainer2/HBoxContainer3"]
  103. layout_mode = 2
  104. size_flags_horizontal = 3
  105. [node name="HBoxContainer4" type="HBoxContainer" parent="HBoxContainer/VBoxContainer2"]
  106. layout_mode = 2
  107. [node name="Label" type="Label" parent="HBoxContainer/VBoxContainer2/HBoxContainer4"]
  108. custom_minimum_size = Vector2(250, 0)
  109. layout_mode = 2
  110. text = "Title:"
  111. [node name="title" type="LineEdit" parent="HBoxContainer/VBoxContainer2/HBoxContainer4"]
  112. layout_mode = 2
  113. size_flags_horizontal = 3
  114. [node name="HBoxContainer5" type="HBoxContainer" parent="HBoxContainer/VBoxContainer2"]
  115. layout_mode = 2
  116. [node name="Label" type="Label" parent="HBoxContainer/VBoxContainer2/HBoxContainer5"]
  117. custom_minimum_size = Vector2(250, 0)
  118. layout_mode = 2
  119. text = "Short description:"
  120. [node name="shortdescription" type="LineEdit" parent="HBoxContainer/VBoxContainer2/HBoxContainer5"]
  121. layout_mode = 2
  122. size_flags_horizontal = 3
  123. [node name="HBoxContainer7" type="HBoxContainer" parent="HBoxContainer/VBoxContainer2"]
  124. layout_mode = 2
  125. [node name="Label" type="Label" parent="HBoxContainer/VBoxContainer2/HBoxContainer7"]
  126. custom_minimum_size = Vector2(250, 200)
  127. layout_mode = 2
  128. text = "Long description:"
  129. [node name="longdescription" type="TextEdit" parent="HBoxContainer/VBoxContainer2/HBoxContainer7"]
  130. custom_minimum_size = Vector2(0, 200)
  131. layout_mode = 2
  132. size_flags_horizontal = 3
  133. wrap_mode = 1
  134. [node name="HBoxContainer6" type="HBoxContainer" parent="HBoxContainer/VBoxContainer2"]
  135. layout_mode = 2
  136. [node name="Label" type="Label" parent="HBoxContainer/VBoxContainer2/HBoxContainer6"]
  137. custom_minimum_size = Vector2(250, 0)
  138. layout_mode = 2
  139. text = "Stereo:"
  140. [node name="stereo" type="CheckBox" parent="HBoxContainer/VBoxContainer2/HBoxContainer6"]
  141. layout_mode = 2
  142. [node name="HBoxContainer8" type="HBoxContainer" parent="HBoxContainer/VBoxContainer2"]
  143. layout_mode = 2
  144. [node name="Label" type="Label" parent="HBoxContainer/VBoxContainer2/HBoxContainer8"]
  145. custom_minimum_size = Vector2(250, 0)
  146. layout_mode = 2
  147. text = "Output is always stereo:"
  148. [node name="outputisstereo" type="CheckBox" parent="HBoxContainer/VBoxContainer2/HBoxContainer8"]
  149. layout_mode = 2
  150. [node name="HBoxContainer9" type="HBoxContainer" parent="HBoxContainer/VBoxContainer2"]
  151. layout_mode = 2
  152. [node name="Label" type="Label" parent="HBoxContainer/VBoxContainer2/HBoxContainer9"]
  153. custom_minimum_size = Vector2(250, 0)
  154. layout_mode = 2
  155. text = "Input Type (array):"
  156. [node name="inputtype" type="LineEdit" parent="HBoxContainer/VBoxContainer2/HBoxContainer9"]
  157. layout_mode = 2
  158. size_flags_horizontal = 3
  159. [node name="HBoxContainer11" type="HBoxContainer" parent="HBoxContainer/VBoxContainer2"]
  160. layout_mode = 2
  161. [node name="Label" type="Label" parent="HBoxContainer/VBoxContainer2/HBoxContainer11"]
  162. custom_minimum_size = Vector2(250, 0)
  163. layout_mode = 2
  164. text = "Output Type (array):"
  165. [node name="outputtype" type="LineEdit" parent="HBoxContainer/VBoxContainer2/HBoxContainer11"]
  166. layout_mode = 2
  167. size_flags_horizontal = 3
  168. [node name="ScrollContainer" type="ScrollContainer" parent="HBoxContainer/VBoxContainer2"]
  169. custom_minimum_size = Vector2(0, 10)
  170. layout_mode = 2
  171. size_flags_vertical = 3
  172. [node name="parameter_container" type="VBoxContainer" parent="HBoxContainer/VBoxContainer2/ScrollContainer"]
  173. custom_minimum_size = Vector2(0, 400)
  174. layout_mode = 2
  175. size_flags_horizontal = 3
  176. size_flags_vertical = 3
  177. [node name="Button" type="Button" parent="HBoxContainer/VBoxContainer2"]
  178. layout_mode = 2
  179. text = "Add a parameter"
  180. [connection signal="text_changed" from="HBoxContainer/VBoxContainer/search/MarginContainer/VBoxContainer/SearchBar" to="." method="_on_search_bar_text_changed"]
  181. [connection signal="button_down" from="HBoxContainer/VBoxContainer/NewProcess" to="." method="_on_new_process_button_down"]
  182. [connection signal="button_down" from="HBoxContainer/VBoxContainer/SaveChanges" to="." method="_on_save_changes_button_down"]
  183. [connection signal="button_down" from="HBoxContainer/VBoxContainer/SaveNew" to="." method="_on_save_new_button_down"]
  184. [connection signal="button_down" from="HBoxContainer/VBoxContainer/DeleteProcess" to="." method="_on_delete_process_button_down"]
  185. [connection signal="button_down" from="HBoxContainer/VBoxContainer/SortJSON" to="." method="_on_sort_json_button_down"]
  186. [connection signal="button_down" from="HBoxContainer/VBoxContainer2/Button" to="." method="_on_button_button_down"]