remap_wizard.tscn 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276
  1. [gd_scene load_steps=3 format=2]
  2. [ext_resource path="res://remap/remap_wizard.gd" type="Script" id=1]
  3. [ext_resource path="res://joypad_diagram.tscn" type="PackedScene" id=2]
  4. [node name="RemapWizard" type="Node"]
  5. script = ExtResource( 1 )
  6. [node name="Start" type="WindowDialog" parent="."]
  7. anchor_left = 0.5
  8. anchor_top = 0.5
  9. anchor_right = 0.5
  10. anchor_bottom = 0.5
  11. margin_left = -128.0
  12. margin_top = -96.0
  13. margin_right = 128.0
  14. margin_bottom = 96.0
  15. __meta__ = {
  16. "_edit_use_anchors_": false
  17. }
  18. [node name="Margin" type="MarginContainer" parent="Start"]
  19. anchor_right = 1.0
  20. anchor_bottom = 1.0
  21. custom_constants/margin_right = 12
  22. custom_constants/margin_top = 12
  23. custom_constants/margin_left = 12
  24. custom_constants/margin_bottom = 12
  25. __meta__ = {
  26. "_edit_use_anchors_": false
  27. }
  28. [node name="Layout" type="VBoxContainer" parent="Start/Margin"]
  29. margin_left = 12.0
  30. margin_top = 12.0
  31. margin_right = 244.0
  32. margin_bottom = 180.0
  33. custom_constants/separation = 20
  34. alignment = 1
  35. __meta__ = {
  36. "_edit_use_anchors_": false
  37. }
  38. [node name="HTML5" type="VBoxContainer" parent="Start/Margin/Layout"]
  39. margin_top = 28.0
  40. margin_right = 232.0
  41. margin_bottom = 66.0
  42. [node name="Label" type="Label" parent="Start/Margin/Layout/HTML5"]
  43. margin_right = 232.0
  44. margin_bottom = 14.0
  45. text = "Try a common mapping:"
  46. [node name="known" type="HBoxContainer" parent="Start/Margin/Layout/HTML5"]
  47. margin_top = 18.0
  48. margin_right = 232.0
  49. margin_bottom = 38.0
  50. custom_constants/separation = 20
  51. alignment = 1
  52. [node name="Xbox" type="Button" parent="Start/Margin/Layout/HTML5/known"]
  53. margin_left = 44.0
  54. margin_right = 87.0
  55. margin_bottom = 20.0
  56. text = "Xbox"
  57. [node name="XboxOSX" type="Button" parent="Start/Margin/Layout/HTML5/known"]
  58. margin_left = 107.0
  59. margin_right = 188.0
  60. margin_bottom = 20.0
  61. text = "Xbox (OSX)"
  62. [node name="Label" type="Label" parent="Start/Margin/Layout"]
  63. margin_top = 86.0
  64. margin_right = 232.0
  65. margin_bottom = 100.0
  66. text = "Or start the wizard"
  67. [node name="Buttons" type="HBoxContainer" parent="Start/Margin/Layout"]
  68. margin_top = 120.0
  69. margin_right = 232.0
  70. margin_bottom = 140.0
  71. [node name="Cancel" type="Button" parent="Start/Margin/Layout/Buttons"]
  72. margin_right = 54.0
  73. margin_bottom = 20.0
  74. text = "Cancel"
  75. __meta__ = {
  76. "_edit_use_anchors_": false
  77. }
  78. [node name="Control" type="Control" parent="Start/Margin/Layout/Buttons"]
  79. margin_left = 58.0
  80. margin_right = 172.0
  81. margin_bottom = 20.0
  82. size_flags_horizontal = 3
  83. [node name="Wizard" type="Button" parent="Start/Margin/Layout/Buttons"]
  84. margin_left = 176.0
  85. margin_right = 232.0
  86. margin_bottom = 20.0
  87. text = "Wizard"
  88. [node name="Mapping" type="WindowDialog" parent="."]
  89. margin_right = 305.0
  90. margin_bottom = 437.0
  91. rect_min_size = Vector2( 330, 440 )
  92. popup_exclusive = true
  93. __meta__ = {
  94. "_edit_use_anchors_": false
  95. }
  96. [node name="Margin" type="MarginContainer" parent="Mapping"]
  97. anchor_right = 1.0
  98. anchor_bottom = 1.0
  99. custom_constants/margin_right = 12
  100. custom_constants/margin_top = 12
  101. custom_constants/margin_left = 12
  102. custom_constants/margin_bottom = 12
  103. __meta__ = {
  104. "_edit_use_anchors_": false
  105. }
  106. [node name="VBox" type="VBoxContainer" parent="Mapping/Margin"]
  107. margin_left = 12.0
  108. margin_top = 12.0
  109. margin_right = 318.0
  110. margin_bottom = 428.0
  111. custom_constants/separation = 5
  112. [node name="ViewportContainer" type="ViewportContainer" parent="Mapping/Margin/VBox"]
  113. margin_right = 306.0
  114. margin_bottom = 305.0
  115. rect_min_size = Vector2( 305, 305 )
  116. stretch = true
  117. __meta__ = {
  118. "_edit_use_anchors_": false
  119. }
  120. [node name="Viewport" type="Viewport" parent="Mapping/Margin/VBox/ViewportContainer"]
  121. size = Vector2( 306, 305 )
  122. handle_input_locally = false
  123. render_target_update_mode = 0
  124. [node name="JoypadDiagram" parent="Mapping/Margin/VBox/ViewportContainer/Viewport" instance=ExtResource( 2 )]
  125. position = Vector2( 0, 0 )
  126. [node name="Camera2D" type="Camera2D" parent="Mapping/Margin/VBox/ViewportContainer/Viewport"]
  127. current = true
  128. [node name="Info" type="VBoxContainer" parent="Mapping/Margin/VBox"]
  129. margin_top = 310.0
  130. margin_right = 306.0
  131. margin_bottom = 408.0
  132. custom_constants/separation = 20
  133. __meta__ = {
  134. "_edit_use_anchors_": false
  135. }
  136. [node name="Text" type="HBoxContainer" parent="Mapping/Margin/VBox/Info"]
  137. margin_right = 306.0
  138. margin_bottom = 14.0
  139. [node name="Text" type="Label" parent="Mapping/Margin/VBox/Info/Text"]
  140. margin_right = 125.0
  141. margin_bottom = 14.0
  142. text = "Currently selected: "
  143. [node name="Value" type="Label" parent="Mapping/Margin/VBox/Info/Text"]
  144. margin_left = 129.0
  145. margin_right = 129.0
  146. margin_bottom = 14.0
  147. [node name="Extra" type="HBoxContainer" parent="Mapping/Margin/VBox/Info"]
  148. margin_top = 34.0
  149. margin_right = 306.0
  150. margin_bottom = 58.0
  151. [node name="FullAxis" type="CheckBox" parent="Mapping/Margin/VBox/Info/Extra"]
  152. margin_right = 80.0
  153. margin_bottom = 24.0
  154. hint_tooltip = "Check this if the sign of the axis keep changing from + to - when pressing and releasing.
  155. Do not check it otherwise"
  156. text = "Full axis"
  157. [node name="InvertAxis" type="CheckBox" parent="Mapping/Margin/VBox/Info/Extra"]
  158. margin_left = 84.0
  159. margin_right = 181.0
  160. margin_bottom = 24.0
  161. hint_tooltip = "Check this if you think the axis should be inverted"
  162. text = "Invert Axis"
  163. [node name="Buttons" type="HBoxContainer" parent="Mapping/Margin/VBox/Info"]
  164. margin_top = 78.0
  165. margin_right = 306.0
  166. margin_bottom = 98.0
  167. [node name="Prev" type="Button" parent="Mapping/Margin/VBox/Info/Buttons"]
  168. margin_right = 67.0
  169. margin_bottom = 20.0
  170. text = "Previous"
  171. [node name="Control" type="Control" parent="Mapping/Margin/VBox/Info/Buttons"]
  172. margin_left = 71.0
  173. margin_right = 142.0
  174. margin_bottom = 20.0
  175. size_flags_horizontal = 3
  176. [node name="Skip" type="Button" parent="Mapping/Margin/VBox/Info/Buttons"]
  177. margin_left = 146.0
  178. margin_right = 184.0
  179. margin_bottom = 20.0
  180. text = "Skip"
  181. __meta__ = {
  182. "_edit_use_anchors_": false
  183. }
  184. [node name="Control2" type="Control" parent="Mapping/Margin/VBox/Info/Buttons"]
  185. margin_left = 188.0
  186. margin_right = 260.0
  187. margin_bottom = 20.0
  188. size_flags_horizontal = 3
  189. [node name="Next" type="Button" parent="Mapping/Margin/VBox/Info/Buttons"]
  190. margin_left = 264.0
  191. margin_right = 306.0
  192. margin_bottom = 20.0
  193. text = "Next"
  194. [node name="MapWindow" type="WindowDialog" parent="."]
  195. margin_right = 400.0
  196. margin_bottom = 200.0
  197. popup_exclusive = true
  198. __meta__ = {
  199. "_edit_use_anchors_": false
  200. }
  201. [node name="Margin" type="MarginContainer" parent="MapWindow"]
  202. anchor_right = 1.0
  203. anchor_bottom = 1.0
  204. custom_constants/margin_right = 12
  205. custom_constants/margin_top = 12
  206. custom_constants/margin_left = 12
  207. custom_constants/margin_bottom = 12
  208. [node name="VBoxContainer" type="VBoxContainer" parent="MapWindow/Margin"]
  209. margin_left = 12.0
  210. margin_top = 12.0
  211. margin_right = 388.0
  212. margin_bottom = 188.0
  213. __meta__ = {
  214. "_edit_use_anchors_": false
  215. }
  216. [node name="Label" type="Label" parent="MapWindow/Margin/VBoxContainer"]
  217. margin_right = 376.0
  218. margin_bottom = 14.0
  219. text = "This is the resulting remap string:"
  220. [node name="TextEdit" type="TextEdit" parent="MapWindow/Margin/VBoxContainer"]
  221. margin_top = 18.0
  222. margin_right = 376.0
  223. margin_bottom = 176.0
  224. size_flags_vertical = 3
  225. readonly = true
  226. wrap_enabled = true
  227. [connection signal="pressed" from="Start/Margin/Layout/HTML5/known/Xbox" to="." method="_on_xbox_pressed"]
  228. [connection signal="pressed" from="Start/Margin/Layout/HTML5/known/XboxOSX" to="." method="_on_xboxosx_pressed"]
  229. [connection signal="pressed" from="Start/Margin/Layout/Buttons/Cancel" to="." method="_on_Cancel_pressed"]
  230. [connection signal="pressed" from="Start/Margin/Layout/Buttons/Wizard" to="." method="_on_Wizard_pressed"]
  231. [connection signal="popup_hide" from="Mapping" to="." method="_on_Mapping_popup_hide"]
  232. [connection signal="toggled" from="Mapping/Margin/VBox/Info/Extra/FullAxis" to="." method="_on_FullAxis_toggled"]
  233. [connection signal="toggled" from="Mapping/Margin/VBox/Info/Extra/InvertAxis" to="." method="_on_InvertAxis_toggled"]
  234. [connection signal="pressed" from="Mapping/Margin/VBox/Info/Buttons/Prev" to="." method="_on_Prev_pressed"]
  235. [connection signal="pressed" from="Mapping/Margin/VBox/Info/Buttons/Skip" to="." method="_on_Skip_pressed"]
  236. [connection signal="pressed" from="Mapping/Margin/VBox/Info/Buttons/Next" to="." method="_on_Next_pressed"]