remap_wizard.tscn 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256
  1. [gd_scene load_steps=3 format=3 uid="uid://na4hexkywup6"]
  2. [ext_resource type="Script" path="res://remap/remap_wizard.gd" id="1"]
  3. [ext_resource type="PackedScene" uid="uid://bsrktfrmtkqvo" path="res://joypad_diagram.tscn" id="2"]
  4. [node name="RemapWizard" type="Node"]
  5. script = ExtResource("1")
  6. [node name="Start" type="Window" parent="."]
  7. position = Vector2i(100, 80)
  8. size = Vector2i(400, 333)
  9. visible = false
  10. min_size = Vector2i(400, 333)
  11. [node name="Margin" type="MarginContainer" parent="Start"]
  12. anchors_preset = 15
  13. anchor_right = 1.0
  14. anchor_bottom = 1.0
  15. grow_horizontal = 2
  16. grow_vertical = 2
  17. [node name="Layout" type="VBoxContainer" parent="Start/Margin"]
  18. layout_mode = 2
  19. offset_right = 600.0
  20. offset_bottom = 540.0
  21. alignment = 1
  22. [node name="HTML5" type="VBoxContainer" parent="Start/Margin/Layout"]
  23. layout_mode = 2
  24. offset_top = 207.0
  25. offset_right = 600.0
  26. offset_bottom = 268.0
  27. [node name="Label" type="Label" parent="Start/Margin/Layout/HTML5"]
  28. layout_mode = 2
  29. offset_right = 600.0
  30. offset_bottom = 26.0
  31. text = "Try a common mapping:"
  32. [node name="known" type="HBoxContainer" parent="Start/Margin/Layout/HTML5"]
  33. layout_mode = 2
  34. offset_top = 30.0
  35. offset_right = 600.0
  36. offset_bottom = 61.0
  37. alignment = 1
  38. [node name="Xbox" type="Button" parent="Start/Margin/Layout/HTML5/known"]
  39. layout_mode = 2
  40. offset_left = 228.0
  41. offset_right = 275.0
  42. offset_bottom = 31.0
  43. text = "Xbox"
  44. [node name="XboxOSX" type="Button" parent="Start/Margin/Layout/HTML5/known"]
  45. layout_mode = 2
  46. offset_left = 279.0
  47. offset_right = 372.0
  48. offset_bottom = 31.0
  49. text = "Xbox (OSX)"
  50. [node name="Label" type="Label" parent="Start/Margin/Layout"]
  51. layout_mode = 2
  52. offset_top = 272.0
  53. offset_right = 600.0
  54. offset_bottom = 298.0
  55. text = "Or start the wizard"
  56. [node name="Buttons" type="HBoxContainer" parent="Start/Margin/Layout"]
  57. layout_mode = 2
  58. offset_top = 302.0
  59. offset_right = 600.0
  60. offset_bottom = 333.0
  61. [node name="Cancel" type="Button" parent="Start/Margin/Layout/Buttons"]
  62. layout_mode = 2
  63. offset_right = 60.0
  64. offset_bottom = 31.0
  65. text = "Cancel"
  66. [node name="Control" type="Control" parent="Start/Margin/Layout/Buttons"]
  67. layout_mode = 2
  68. anchors_preset = 0
  69. offset_left = 64.0
  70. offset_right = 534.0
  71. offset_bottom = 31.0
  72. size_flags_horizontal = 3
  73. [node name="Wizard" type="Button" parent="Start/Margin/Layout/Buttons"]
  74. layout_mode = 2
  75. offset_left = 538.0
  76. offset_right = 600.0
  77. offset_bottom = 31.0
  78. text = "Wizard"
  79. [node name="Mapping" type="Window" parent="."]
  80. position = Vector2i(130, 200)
  81. size = Vector2i(340, 100)
  82. visible = false
  83. min_size = Vector2i(340, 100)
  84. [node name="Margin" type="MarginContainer" parent="Mapping"]
  85. anchors_preset = 15
  86. anchor_right = 1.0
  87. anchor_bottom = 1.0
  88. grow_horizontal = 2
  89. grow_vertical = 2
  90. [node name="VBox" type="VBoxContainer" parent="Mapping/Margin"]
  91. layout_mode = 2
  92. offset_right = 600.0
  93. offset_bottom = 540.0
  94. [node name="SubViewportContainer" type="SubViewportContainer" parent="Mapping/Margin/VBox"]
  95. layout_mode = 2
  96. offset_right = 600.0
  97. stretch = true
  98. [node name="SubViewport" type="SubViewport" parent="Mapping/Margin/VBox/SubViewportContainer"]
  99. handle_input_locally = false
  100. size = Vector2i(600, 0)
  101. render_target_update_mode = 0
  102. [node name="JoypadDiagram" parent="Mapping/Margin/VBox/SubViewportContainer/SubViewport" instance=ExtResource("2")]
  103. position = Vector2(0, 0)
  104. [node name="Camera2D" type="Camera2D" parent="Mapping/Margin/VBox/SubViewportContainer/SubViewport"]
  105. current = true
  106. [node name="Info" type="VBoxContainer" parent="Mapping/Margin/VBox"]
  107. layout_mode = 2
  108. offset_top = 4.0
  109. offset_right = 600.0
  110. offset_bottom = 100.0
  111. [node name="Text" type="HBoxContainer" parent="Mapping/Margin/VBox/Info"]
  112. layout_mode = 2
  113. offset_right = 600.0
  114. offset_bottom = 26.0
  115. [node name="Text" type="Label" parent="Mapping/Margin/VBox/Info/Text"]
  116. layout_mode = 2
  117. offset_right = 150.0
  118. offset_bottom = 26.0
  119. text = "Currently selected: "
  120. [node name="Value" type="Label" parent="Mapping/Margin/VBox/Info/Text"]
  121. layout_mode = 2
  122. offset_left = 154.0
  123. offset_top = 1.0
  124. offset_right = 155.0
  125. offset_bottom = 24.0
  126. [node name="Extra" type="HBoxContainer" parent="Mapping/Margin/VBox/Info"]
  127. layout_mode = 2
  128. offset_top = 30.0
  129. offset_right = 600.0
  130. offset_bottom = 61.0
  131. [node name="FullAxis" type="CheckBox" parent="Mapping/Margin/VBox/Info/Extra"]
  132. layout_mode = 2
  133. offset_right = 91.0
  134. offset_bottom = 31.0
  135. text = "Full axis"
  136. [node name="InvertAxis" type="CheckBox" parent="Mapping/Margin/VBox/Info/Extra"]
  137. layout_mode = 2
  138. offset_left = 95.0
  139. offset_right = 205.0
  140. offset_bottom = 31.0
  141. text = "Invert Axis"
  142. [node name="Buttons" type="HBoxContainer" parent="Mapping/Margin/VBox/Info"]
  143. layout_mode = 2
  144. offset_top = 65.0
  145. offset_right = 600.0
  146. offset_bottom = 96.0
  147. [node name="Prev" type="Button" parent="Mapping/Margin/VBox/Info/Buttons"]
  148. layout_mode = 2
  149. offset_right = 75.0
  150. offset_bottom = 31.0
  151. text = "Previous"
  152. [node name="Control" type="Control" parent="Mapping/Margin/VBox/Info/Buttons"]
  153. layout_mode = 2
  154. anchors_preset = 0
  155. offset_left = 79.0
  156. offset_right = 290.0
  157. offset_bottom = 31.0
  158. size_flags_horizontal = 3
  159. [node name="Skip" type="Button" parent="Mapping/Margin/VBox/Info/Buttons"]
  160. layout_mode = 2
  161. offset_left = 294.0
  162. offset_right = 335.0
  163. offset_bottom = 31.0
  164. text = "Skip"
  165. [node name="Control2" type="Control" parent="Mapping/Margin/VBox/Info/Buttons"]
  166. layout_mode = 2
  167. anchors_preset = 0
  168. offset_left = 339.0
  169. offset_right = 551.0
  170. offset_bottom = 31.0
  171. size_flags_horizontal = 3
  172. [node name="Next" type="Button" parent="Mapping/Margin/VBox/Info/Buttons"]
  173. layout_mode = 2
  174. offset_left = 555.0
  175. offset_right = 600.0
  176. offset_bottom = 31.0
  177. text = "Next"
  178. [node name="MapWindow" type="Window" parent="."]
  179. position = Vector2i(100, 80)
  180. size = Vector2i(400, 400)
  181. visible = false
  182. min_size = Vector2i(400, 400)
  183. [node name="Margin" type="MarginContainer" parent="MapWindow"]
  184. anchors_preset = 15
  185. anchor_right = 1.0
  186. anchor_bottom = 1.0
  187. grow_horizontal = 2
  188. grow_vertical = 2
  189. [node name="VBoxContainer" type="VBoxContainer" parent="MapWindow/Margin"]
  190. layout_mode = 2
  191. offset_right = 600.0
  192. offset_bottom = 540.0
  193. [node name="Label" type="Label" parent="MapWindow/Margin/VBoxContainer"]
  194. layout_mode = 2
  195. offset_right = 600.0
  196. offset_bottom = 26.0
  197. text = "This is the resulting remap string:"
  198. [node name="TextEdit" type="TextEdit" parent="MapWindow/Margin/VBoxContainer"]
  199. layout_mode = 2
  200. offset_top = 30.0
  201. offset_right = 600.0
  202. offset_bottom = 540.0
  203. size_flags_vertical = 3
  204. [connection signal="close_requested" from="Start" to="." method="_on_start_close_requested"]
  205. [connection signal="pressed" from="Start/Margin/Layout/HTML5/known/Xbox" to="." method="_on_xbox_pressed"]
  206. [connection signal="pressed" from="Start/Margin/Layout/HTML5/known/XboxOSX" to="." method="_on_xboxosx_pressed"]
  207. [connection signal="pressed" from="Start/Margin/Layout/Buttons/Cancel" to="." method="_on_Cancel_pressed"]
  208. [connection signal="pressed" from="Start/Margin/Layout/Buttons/Wizard" to="." method="_on_Wizard_pressed"]
  209. [connection signal="close_requested" from="Mapping" to="." method="_on_mapping_close_requested"]
  210. [connection signal="toggled" from="Mapping/Margin/VBox/Info/Extra/FullAxis" to="." method="_on_FullAxis_toggled"]
  211. [connection signal="toggled" from="Mapping/Margin/VBox/Info/Extra/InvertAxis" to="." method="_on_InvertAxis_toggled"]
  212. [connection signal="pressed" from="Mapping/Margin/VBox/Info/Buttons/Prev" to="." method="_on_Prev_pressed"]
  213. [connection signal="pressed" from="Mapping/Margin/VBox/Info/Buttons/Skip" to="." method="_on_Skip_pressed"]
  214. [connection signal="pressed" from="Mapping/Margin/VBox/Info/Buttons/Next" to="." method="_on_Next_pressed"]
  215. [connection signal="close_requested" from="MapWindow" to="." method="_on_map_window_close_requested"]