Browse Source

Joystick demo: add joystick vibration and convert to tscn.

Andreas Haas 9 years ago
parent
commit
f61773c654

+ 2 - 2
misc/joysticks/engine.cfg

@@ -1,10 +1,10 @@
 [application]
 
 name="Joysticks"
-main_scene="res://joysticks.scn"
+main_scene="res://joysticks.tscn"
 icon="res://icon.png"
 
 [display]
 
+height=450
 width=550
-height=300

+ 10 - 0
misc/joysticks/joysticks.gd

@@ -59,3 +59,13 @@ func _on_joy_connection_changed(device_id, connected):
 			get_node("joy_name").set_text(Input.get_joy_name(device_id))
 		else:
 			get_node("joy_name").set_text("")
+
+func _on_start_vibration_pressed():
+	var weak = get_node("Vibration_weak_value").get_value()
+	var strong = get_node("Vibration_strong_value").get_value()
+	var duration = get_node("Vibration_duration_value").get_value()
+
+	Input.start_joy_vibration(cur_joy, weak, strong, duration)
+
+func _on_stop_vibration_pressed():
+	Input.stop_joy_vibration(cur_joy)

BIN
misc/joysticks/joysticks.scn


+ 854 - 0
misc/joysticks/joysticks.tscn

@@ -0,0 +1,854 @@
+[gd_scene load_steps=3 format=1]
+
+[ext_resource path="res://joysticks.gd" type="Script" id=1]
+[ext_resource path="res://jsdiagram.tscn" type="PackedScene" id=2]
+
+[node name="joysticks" type="Node2D"]
+
+script/script = ExtResource( 1 )
+__meta__ = { "__editor_plugin_screen__":"Script" }
+
+[node name="label_buttons" type="Label" parent="."]
+
+focus/ignore_mouse = true
+focus/stop_mouse = true
+size_flags/horizontal = 2
+margin/left = 10.0
+margin/top = 235.0
+margin/right = 65.0
+margin/bottom = 248.0
+text = "Buttons:"
+percent_visible = 1.0
+lines_skipped = 0
+max_lines_visible = -1
+
+[node name="btn0" type="Label" parent="."]
+
+focus/ignore_mouse = true
+focus/stop_mouse = true
+size_flags/horizontal = 2
+margin/left = 20.0
+margin/top = 255.0
+margin/right = 45.0
+margin/bottom = 268.0
+text = "0"
+align = 1
+percent_visible = 1.0
+lines_skipped = 0
+max_lines_visible = -1
+
+[node name="btn1" type="Label" parent="."]
+
+focus/ignore_mouse = true
+focus/stop_mouse = true
+size_flags/horizontal = 2
+margin/left = 45.0
+margin/top = 255.0
+margin/right = 70.0
+margin/bottom = 268.0
+text = "1"
+align = 1
+percent_visible = 1.0
+lines_skipped = 0
+max_lines_visible = -1
+
+[node name="btn2" type="Label" parent="."]
+
+focus/ignore_mouse = true
+focus/stop_mouse = true
+size_flags/horizontal = 2
+margin/left = 70.0
+margin/top = 255.0
+margin/right = 95.0
+margin/bottom = 268.0
+text = "2"
+align = 1
+percent_visible = 1.0
+lines_skipped = 0
+max_lines_visible = -1
+
+[node name="btn3" type="Label" parent="."]
+
+focus/ignore_mouse = true
+focus/stop_mouse = true
+size_flags/horizontal = 2
+margin/left = 95.0
+margin/top = 255.0
+margin/right = 120.0
+margin/bottom = 268.0
+text = "3"
+align = 1
+percent_visible = 1.0
+lines_skipped = 0
+max_lines_visible = -1
+
+[node name="btn4" type="Label" parent="."]
+
+focus/ignore_mouse = true
+focus/stop_mouse = true
+size_flags/horizontal = 2
+margin/left = 120.0
+margin/top = 255.0
+margin/right = 145.0
+margin/bottom = 268.0
+text = "4"
+align = 1
+percent_visible = 1.0
+lines_skipped = 0
+max_lines_visible = -1
+
+[node name="btn5" type="Label" parent="."]
+
+focus/ignore_mouse = true
+focus/stop_mouse = true
+size_flags/horizontal = 2
+margin/left = 145.0
+margin/top = 255.0
+margin/right = 170.0
+margin/bottom = 268.0
+text = "5"
+align = 1
+percent_visible = 1.0
+lines_skipped = 0
+max_lines_visible = -1
+
+[node name="btn6" type="Label" parent="."]
+
+focus/ignore_mouse = true
+focus/stop_mouse = true
+size_flags/horizontal = 2
+margin/left = 170.0
+margin/top = 255.0
+margin/right = 195.0
+margin/bottom = 268.0
+text = "6"
+align = 1
+percent_visible = 1.0
+lines_skipped = 0
+max_lines_visible = -1
+
+[node name="btn7" type="Label" parent="."]
+
+focus/ignore_mouse = true
+focus/stop_mouse = true
+size_flags/horizontal = 2
+margin/left = 195.0
+margin/top = 255.0
+margin/right = 220.0
+margin/bottom = 268.0
+text = "7"
+align = 1
+percent_visible = 1.0
+lines_skipped = 0
+max_lines_visible = -1
+
+[node name="btn8" type="Label" parent="."]
+
+focus/ignore_mouse = true
+focus/stop_mouse = true
+size_flags/horizontal = 2
+margin/left = 220.0
+margin/top = 255.0
+margin/right = 245.0
+margin/bottom = 268.0
+text = "8"
+align = 1
+percent_visible = 1.0
+lines_skipped = 0
+max_lines_visible = -1
+
+[node name="btn9" type="Label" parent="."]
+
+focus/ignore_mouse = true
+focus/stop_mouse = true
+size_flags/horizontal = 2
+margin/left = 20.0
+margin/top = 275.0
+margin/right = 45.0
+margin/bottom = 288.0
+text = "9"
+align = 1
+percent_visible = 1.0
+lines_skipped = 0
+max_lines_visible = -1
+
+[node name="btn10" type="Label" parent="."]
+
+focus/ignore_mouse = true
+focus/stop_mouse = true
+size_flags/horizontal = 2
+margin/left = 45.0
+margin/top = 275.0
+margin/right = 70.0
+margin/bottom = 288.0
+text = "10"
+align = 1
+percent_visible = 1.0
+lines_skipped = 0
+max_lines_visible = -1
+
+[node name="btn11" type="Label" parent="."]
+
+focus/ignore_mouse = true
+focus/stop_mouse = true
+size_flags/horizontal = 2
+margin/left = 70.0
+margin/top = 275.0
+margin/right = 95.0
+margin/bottom = 288.0
+text = "11"
+align = 1
+percent_visible = 1.0
+lines_skipped = 0
+max_lines_visible = -1
+
+[node name="btn12" type="Label" parent="."]
+
+focus/ignore_mouse = true
+focus/stop_mouse = true
+size_flags/horizontal = 2
+margin/left = 95.0
+margin/top = 275.0
+margin/right = 120.0
+margin/bottom = 288.0
+text = "12"
+align = 1
+percent_visible = 1.0
+lines_skipped = 0
+max_lines_visible = -1
+
+[node name="btn13" type="Label" parent="."]
+
+focus/ignore_mouse = true
+focus/stop_mouse = true
+size_flags/horizontal = 2
+margin/left = 120.0
+margin/top = 275.0
+margin/right = 145.0
+margin/bottom = 288.0
+text = "13"
+align = 1
+percent_visible = 1.0
+lines_skipped = 0
+max_lines_visible = -1
+
+[node name="btn14" type="Label" parent="."]
+
+focus/ignore_mouse = true
+focus/stop_mouse = true
+size_flags/horizontal = 2
+margin/left = 145.0
+margin/top = 275.0
+margin/right = 170.0
+margin/bottom = 288.0
+text = "14"
+align = 1
+percent_visible = 1.0
+lines_skipped = 0
+max_lines_visible = -1
+
+[node name="btn15" type="Label" parent="."]
+
+focus/ignore_mouse = true
+focus/stop_mouse = true
+size_flags/horizontal = 2
+margin/left = 170.0
+margin/top = 275.0
+margin/right = 195.0
+margin/bottom = 288.0
+text = "15"
+align = 1
+percent_visible = 1.0
+lines_skipped = 0
+max_lines_visible = -1
+
+[node name="axis_prog0" type="ProgressBar" parent="."]
+
+focus/ignore_mouse = false
+focus/stop_mouse = true
+size_flags/horizontal = 2
+margin/left = 50.0
+margin/top = 60.0
+margin/right = 250.0
+margin/bottom = 76.0
+range/min = -100.0
+range/max = 100.0
+range/step = 0.0001
+range/page = 0.0
+range/value = 0.0
+range/exp_edit = false
+range/rounded = false
+percent/visible = false
+
+[node name="axis_prog1" type="ProgressBar" parent="."]
+
+focus/ignore_mouse = false
+focus/stop_mouse = true
+size_flags/horizontal = 2
+margin/left = 50.0
+margin/top = 80.0
+margin/right = 250.0
+margin/bottom = 96.0
+range/min = -100.0
+range/max = 100.0
+range/step = 0.0001
+range/page = 0.0
+range/value = 0.0
+range/exp_edit = false
+range/rounded = false
+percent/visible = false
+
+[node name="axis_prog2" type="ProgressBar" parent="."]
+
+focus/ignore_mouse = false
+focus/stop_mouse = true
+size_flags/horizontal = 2
+margin/left = 50.0
+margin/top = 100.0
+margin/right = 250.0
+margin/bottom = 116.0
+range/min = -100.0
+range/max = 100.0
+range/step = 0.0001
+range/page = 0.0
+range/value = 0.0
+range/exp_edit = false
+range/rounded = false
+percent/visible = false
+
+[node name="axis_prog3" type="ProgressBar" parent="."]
+
+focus/ignore_mouse = false
+focus/stop_mouse = true
+size_flags/horizontal = 2
+margin/left = 50.0
+margin/top = 120.0
+margin/right = 250.0
+margin/bottom = 136.0
+range/min = -100.0
+range/max = 100.0
+range/step = 0.0001
+range/page = 0.0
+range/value = 0.0
+range/exp_edit = false
+range/rounded = false
+percent/visible = false
+
+[node name="axis_prog4" type="ProgressBar" parent="."]
+
+focus/ignore_mouse = false
+focus/stop_mouse = true
+size_flags/horizontal = 2
+margin/left = 50.0
+margin/top = 140.0
+margin/right = 250.0
+margin/bottom = 156.0
+range/min = -100.0
+range/max = 100.0
+range/step = 0.0001
+range/page = 0.0
+range/value = 0.0
+range/exp_edit = false
+range/rounded = false
+percent/visible = false
+
+[node name="axis_prog5" type="ProgressBar" parent="."]
+
+focus/ignore_mouse = false
+focus/stop_mouse = true
+size_flags/horizontal = 2
+margin/left = 50.0
+margin/top = 160.0
+margin/right = 250.0
+margin/bottom = 176.0
+range/min = -100.0
+range/max = 100.0
+range/step = 0.0001
+range/page = 0.0
+range/value = 0.0
+range/exp_edit = false
+range/rounded = false
+percent/visible = false
+
+[node name="axis_prog6" type="ProgressBar" parent="."]
+
+focus/ignore_mouse = false
+focus/stop_mouse = true
+size_flags/horizontal = 2
+margin/left = 50.0
+margin/top = 180.0
+margin/right = 250.0
+margin/bottom = 196.0
+range/min = -100.0
+range/max = 100.0
+range/step = 0.0001
+range/page = 0.0
+range/value = 0.0
+range/exp_edit = false
+range/rounded = false
+percent/visible = false
+
+[node name="axis_prog7" type="ProgressBar" parent="."]
+
+focus/ignore_mouse = false
+focus/stop_mouse = true
+size_flags/horizontal = 2
+margin/left = 50.0
+margin/top = 200.0
+margin/right = 250.0
+margin/bottom = 216.0
+range/min = -100.0
+range/max = 100.0
+range/step = 0.0001
+range/page = 0.0
+range/value = 0.0
+range/exp_edit = false
+range/rounded = false
+percent/visible = false
+
+[node name="axis_val0" type="Label" parent="."]
+
+focus/ignore_mouse = true
+focus/stop_mouse = true
+size_flags/horizontal = 2
+margin/left = 50.0
+margin/top = 60.0
+margin/right = 250.0
+margin/bottom = 75.0
+text = "0"
+align = 1
+valign = 1
+percent_visible = 1.0
+lines_skipped = 0
+max_lines_visible = -1
+
+[node name="axis_val1" type="Label" parent="."]
+
+focus/ignore_mouse = true
+focus/stop_mouse = true
+size_flags/horizontal = 2
+margin/left = 50.0
+margin/top = 80.0
+margin/right = 250.0
+margin/bottom = 95.0
+text = "0"
+align = 1
+valign = 1
+percent_visible = 1.0
+lines_skipped = 0
+max_lines_visible = -1
+
+[node name="axis_val2" type="Label" parent="."]
+
+focus/ignore_mouse = true
+focus/stop_mouse = true
+size_flags/horizontal = 2
+margin/left = 50.0
+margin/top = 100.0
+margin/right = 250.0
+margin/bottom = 115.0
+text = "0"
+align = 1
+valign = 1
+percent_visible = 1.0
+lines_skipped = 0
+max_lines_visible = -1
+
+[node name="axis_val3" type="Label" parent="."]
+
+focus/ignore_mouse = true
+focus/stop_mouse = true
+size_flags/horizontal = 2
+margin/left = 50.0
+margin/top = 120.0
+margin/right = 250.0
+margin/bottom = 135.0
+text = "0"
+align = 1
+valign = 1
+percent_visible = 1.0
+lines_skipped = 0
+max_lines_visible = -1
+
+[node name="axis_val4" type="Label" parent="."]
+
+focus/ignore_mouse = true
+focus/stop_mouse = true
+size_flags/horizontal = 2
+margin/left = 50.0
+margin/top = 140.0
+margin/right = 250.0
+margin/bottom = 155.0
+text = "0"
+align = 1
+valign = 1
+percent_visible = 1.0
+lines_skipped = 0
+max_lines_visible = -1
+
+[node name="axis_val5" type="Label" parent="."]
+
+focus/ignore_mouse = true
+focus/stop_mouse = true
+size_flags/horizontal = 2
+margin/left = 50.0
+margin/top = 160.0
+margin/right = 250.0
+margin/bottom = 175.0
+text = "0"
+align = 1
+valign = 1
+percent_visible = 1.0
+lines_skipped = 0
+max_lines_visible = -1
+
+[node name="axis_val6" type="Label" parent="."]
+
+focus/ignore_mouse = true
+focus/stop_mouse = true
+size_flags/horizontal = 2
+margin/left = 50.0
+margin/top = 180.0
+margin/right = 250.0
+margin/bottom = 195.0
+text = "0"
+align = 1
+valign = 1
+percent_visible = 1.0
+lines_skipped = 0
+max_lines_visible = -1
+
+[node name="axis_val7" type="Label" parent="."]
+
+focus/ignore_mouse = true
+focus/stop_mouse = true
+size_flags/horizontal = 2
+margin/left = 50.0
+margin/top = 200.0
+margin/right = 250.0
+margin/bottom = 215.0
+text = "0"
+align = 1
+valign = 1
+percent_visible = 1.0
+lines_skipped = 0
+max_lines_visible = -1
+
+[node name="label_axis0" type="Label" parent="."]
+
+focus/ignore_mouse = true
+focus/stop_mouse = true
+size_flags/horizontal = 2
+margin/left = 10.0
+margin/top = 60.0
+margin/right = 51.0
+margin/bottom = 75.0
+text = "Axis 0"
+valign = 1
+percent_visible = 1.0
+lines_skipped = 0
+max_lines_visible = -1
+
+[node name="label_axis1" type="Label" parent="."]
+
+focus/ignore_mouse = true
+focus/stop_mouse = true
+size_flags/horizontal = 2
+margin/left = 10.0
+margin/top = 80.0
+margin/right = 51.0
+margin/bottom = 95.0
+text = "Axis 1"
+valign = 1
+percent_visible = 1.0
+lines_skipped = 0
+max_lines_visible = -1
+
+[node name="label_axis2" type="Label" parent="."]
+
+focus/ignore_mouse = true
+focus/stop_mouse = true
+size_flags/horizontal = 2
+margin/left = 10.0
+margin/top = 100.0
+margin/right = 51.0
+margin/bottom = 115.0
+text = "Axis 2"
+valign = 1
+percent_visible = 1.0
+lines_skipped = 0
+max_lines_visible = -1
+
+[node name="label_axis3" type="Label" parent="."]
+
+focus/ignore_mouse = true
+focus/stop_mouse = true
+size_flags/horizontal = 2
+margin/left = 10.0
+margin/top = 120.0
+margin/right = 51.0
+margin/bottom = 135.0
+text = "Axis 3"
+valign = 1
+percent_visible = 1.0
+lines_skipped = 0
+max_lines_visible = -1
+
+[node name="label_axis4" type="Label" parent="."]
+
+focus/ignore_mouse = true
+focus/stop_mouse = true
+size_flags/horizontal = 2
+margin/left = 10.0
+margin/top = 140.0
+margin/right = 51.0
+margin/bottom = 155.0
+text = "Axis 4"
+valign = 1
+percent_visible = 1.0
+lines_skipped = 0
+max_lines_visible = -1
+
+[node name="label_axis5" type="Label" parent="."]
+
+focus/ignore_mouse = true
+focus/stop_mouse = true
+size_flags/horizontal = 2
+margin/left = 10.0
+margin/top = 160.0
+margin/right = 51.0
+margin/bottom = 175.0
+text = "Axis 5"
+valign = 1
+percent_visible = 1.0
+lines_skipped = 0
+max_lines_visible = -1
+
+[node name="label_axis6" type="Label" parent="."]
+
+focus/ignore_mouse = true
+focus/stop_mouse = true
+size_flags/horizontal = 2
+margin/left = 10.0
+margin/top = 180.0
+margin/right = 51.0
+margin/bottom = 195.0
+text = "Axis 6"
+valign = 1
+percent_visible = 1.0
+lines_skipped = 0
+max_lines_visible = -1
+
+[node name="label_axis7" type="Label" parent="."]
+
+focus/ignore_mouse = true
+focus/stop_mouse = true
+size_flags/horizontal = 2
+margin/left = 10.0
+margin/top = 200.0
+margin/right = 51.0
+margin/bottom = 215.0
+text = "Axis 7"
+valign = 2
+percent_visible = 1.0
+lines_skipped = 0
+max_lines_visible = -1
+
+[node name="label_device" type="Label" parent="."]
+
+focus/ignore_mouse = true
+focus/stop_mouse = true
+size_flags/horizontal = 2
+margin/left = 10.0
+margin/top = 10.0
+margin/right = 60.0
+margin/bottom = 30.0
+text = "Device"
+valign = 1
+percent_visible = 1.0
+lines_skipped = 0
+max_lines_visible = -1
+
+[node name="joy_num" type="SpinBox" parent="."]
+
+focus/ignore_mouse = false
+focus/stop_mouse = true
+size_flags/horizontal = 2
+size_flags/vertical = 2
+margin/left = 65.0
+margin/top = 10.0
+margin/right = 127.0
+margin/bottom = 33.0
+range/min = 0.0
+range/max = 16.0
+range/step = 1.0
+range/page = 0.0
+range/value = 0.0
+range/exp_edit = false
+range/rounded = false
+editable = true
+prefix = ""
+suffix = ""
+
+[node name="joy_name" type="Label" parent="."]
+
+focus/ignore_mouse = true
+focus/stop_mouse = true
+size_flags/horizontal = 2
+margin/left = 10.0
+margin/top = 35.0
+margin/right = 250.0
+margin/bottom = 50.0
+custom_colors/font_color = Color( 0.229156, 1, 0.239205, 1 )
+percent_visible = 1.0
+lines_skipped = 0
+max_lines_visible = -1
+
+[node name="Vibration_weak_value" type="SpinBox" parent="."]
+
+focus/ignore_mouse = false
+focus/stop_mouse = true
+size_flags/horizontal = 2
+size_flags/vertical = 2
+margin/left = 163.0
+margin/top = 324.0
+margin/right = 237.0
+margin/bottom = 348.0
+range/min = 0.0
+range/max = 1.0
+range/step = 0.05
+range/page = 0.0
+range/value = 1.0
+range/exp_edit = false
+range/rounded = false
+editable = true
+prefix = ""
+suffix = ""
+
+[node name="Vibration_strong_value" type="SpinBox" parent="."]
+
+focus/ignore_mouse = false
+focus/stop_mouse = true
+size_flags/horizontal = 2
+size_flags/vertical = 2
+margin/left = 163.0
+margin/top = 362.0
+margin/right = 237.0
+margin/bottom = 386.0
+range/min = 0.0
+range/max = 1.0
+range/step = 0.05
+range/page = 0.0
+range/value = 1.0
+range/exp_edit = false
+range/rounded = false
+editable = true
+prefix = ""
+suffix = ""
+
+[node name="Vibration_duration_value" type="SpinBox" parent="."]
+
+focus/ignore_mouse = false
+focus/stop_mouse = true
+size_flags/horizontal = 2
+size_flags/vertical = 2
+margin/left = 163.0
+margin/top = 403.0
+margin/right = 237.0
+margin/bottom = 427.0
+range/min = 0.0
+range/max = 10.0
+range/step = 0.1
+range/page = 0.0
+range/value = 1.0
+range/exp_edit = false
+range/rounded = false
+editable = true
+prefix = ""
+suffix = ""
+
+[node name="start_vibration" type="Button" parent="."]
+
+focus/ignore_mouse = false
+focus/stop_mouse = true
+size_flags/horizontal = 2
+size_flags/vertical = 2
+margin/left = 288.0
+margin/top = 352.0
+margin/right = 389.0
+margin/bottom = 372.0
+toggle_mode = false
+click_on_press = true
+enabled_focus_mode = 0
+shortcut = null
+text = "Start Vibration"
+flat = false
+
+[node name="stop_vibration" type="Button" parent="."]
+
+focus/ignore_mouse = false
+focus/stop_mouse = true
+size_flags/horizontal = 2
+size_flags/vertical = 2
+margin/left = 406.0
+margin/top = 352.0
+margin/right = 507.0
+margin/bottom = 372.0
+toggle_mode = false
+click_on_press = true
+enabled_focus_mode = 2
+shortcut = null
+text = "Stop Vibration"
+flat = false
+
+[node name="Weak_label" type="Label" parent="."]
+
+focus/ignore_mouse = true
+focus/stop_mouse = true
+size_flags/horizontal = 2
+margin/left = 8.0
+margin/top = 329.0
+margin/right = 150.0
+margin/bottom = 343.0
+text = "Vibration Weak Motor:"
+percent_visible = 1.0
+lines_skipped = 0
+max_lines_visible = -1
+
+[node name="Strong_label" type="Label" parent="."]
+
+focus/ignore_mouse = true
+focus/stop_mouse = true
+size_flags/horizontal = 2
+margin/left = 8.0
+margin/top = 367.0
+margin/right = 150.0
+margin/bottom = 381.0
+text = "Vibration Strong Motor:"
+percent_visible = 1.0
+lines_skipped = 0
+max_lines_visible = -1
+
+[node name="Duration_label" type="Label" parent="."]
+
+focus/ignore_mouse = true
+focus/stop_mouse = true
+size_flags/horizontal = 2
+margin/left = 8.0
+margin/top = 408.0
+margin/right = 155.0
+margin/bottom = 439.0
+text = "Vibration Duration:"
+percent_visible = 1.0
+lines_skipped = 0
+max_lines_visible = -1
+
+[node name="diagram" parent="." instance=ExtResource( 2 )]
+
+transform/pos = Vector2( 403.304, 161.318 )
+
+[connection signal="pressed" from="start_vibration" to="." method="_on_start_vibration_pressed"]
+
+[connection signal="pressed" from="stop_vibration" to="." method="_on_stop_vibration_pressed"]
+
+

+ 218 - 0
misc/joysticks/jsdiagram.tscn

@@ -0,0 +1,218 @@
+[gd_scene load_steps=3 format=1]
+
+[ext_resource path="res://diagram.png" type="Texture" id=1]
+[ext_resource path="res://indicators.png" type="Texture" id=2]
+
+[node name="diagram" type="Sprite"]
+
+transform/pos = Vector2( 368.635, 155.289 )
+transform/scale = Vector2( 0.432859, 0.446287 )
+texture = ExtResource( 1 )
+__meta__ = { "__editor_plugin_screen__":"2D" }
+
+[node name="buttons" type="Node2D" parent="."]
+
+__meta__ = { "_editor_collapsed":true }
+
+[node name="0" type="Sprite" parent="buttons"]
+
+transform/pos = Vector2( 147.73, 120.925 )
+transform/scale = Vector2( 0.9, 0.9 )
+texture = ExtResource( 2 )
+region = true
+region_rect = Rect2( 0, 0, 45, 45 )
+
+[node name="1" type="Sprite" parent="buttons"]
+
+transform/pos = Vector2( 185.769, 82.4874 )
+transform/scale = Vector2( 0.9, 0.9 )
+texture = ExtResource( 2 )
+region = true
+region_rect = Rect2( 0, 0, 45, 45 )
+
+[node name="2" type="Sprite" parent="buttons"]
+
+transform/pos = Vector2( 112.377, 82.4874 )
+transform/scale = Vector2( 0.9, 0.9 )
+texture = ExtResource( 2 )
+region = true
+region_rect = Rect2( 0, 0, 45, 45 )
+
+[node name="3" type="Sprite" parent="buttons"]
+
+transform/pos = Vector2( 149.073, 47.3293 )
+transform/scale = Vector2( 0.9, 0.9 )
+texture = ExtResource( 2 )
+region = true
+region_rect = Rect2( 0, 0, 45, 45 )
+
+[node name="4" type="Sprite" parent="buttons"]
+
+transform/pos = Vector2( -161.038, -158.037 )
+transform/scale = Vector2( 5.3348, 3.35512 )
+texture = ExtResource( 2 )
+region = true
+region_rect = Rect2( 10, 10, 10, 10 )
+
+[node name="5" type="Sprite" parent="buttons"]
+
+transform/pos = Vector2( 159.362, -156.977 )
+transform/scale = Vector2( 5.3348, 3.35512 )
+texture = ExtResource( 2 )
+region = true
+region_rect = Rect2( 10, 10, 10, 10 )
+
+[node name="6" type="Sprite" parent="buttons"]
+
+transform/pos = Vector2( -159.349, -221.878 )
+transform/scale = Vector2( 1.0458, 2.16952 )
+texture = ExtResource( 2 )
+flip_h = true
+region = true
+region_rect = Rect2( 0, 0, 45, 22 )
+
+[node name="7" type="Sprite" parent="buttons"]
+
+transform/pos = Vector2( 156.677, -220.11 )
+transform/scale = Vector2( 1.0458, 2.16952 )
+texture = ExtResource( 2 )
+region = true
+region_rect = Rect2( 0, 0, 45, 22 )
+
+[node name="8" type="Sprite" parent="buttons"]
+
+transform/pos = Vector2( -67.5308, 164.422 )
+transform/scale = Vector2( 0.9, 0.9 )
+texture = ExtResource( 2 )
+region = true
+region_rect = Rect2( 0, 0, 45, 45 )
+
+[node name="9" type="Sprite" parent="buttons"]
+
+transform/pos = Vector2( 75.8825, 167.363 )
+transform/scale = Vector2( 0.9, 0.9 )
+texture = ExtResource( 2 )
+region = true
+region_rect = Rect2( 0, 0, 45, 45 )
+
+[node name="10" type="Sprite" parent="buttons"]
+
+transform/pos = Vector2( -46.6707, 52.702 )
+transform/scale = Vector2( 0.810497, 0.57205 )
+texture = ExtResource( 2 )
+region = true
+region_rect = Rect2( 0, 0, 45, 45 )
+
+[node name="11" type="Sprite" parent="buttons"]
+
+transform/pos = Vector2( 56.2581, 54.4382 )
+transform/scale = Vector2( 0.810497, 0.57205 )
+texture = ExtResource( 2 )
+region = true
+region_rect = Rect2( 0, 0, 45, 45 )
+
+[node name="12" type="Sprite" parent="buttons"]
+
+transform/pos = Vector2( -139.402, 46.8295 )
+transform/scale = Vector2( 0.9, 0.9 )
+texture = ExtResource( 2 )
+region = true
+region_rect = Rect2( 50, 0, 54, 14 )
+
+[node name="13" type="Sprite" parent="buttons"]
+
+transform/pos = Vector2( -139.838, 115.789 )
+transform/scale = Vector2( 0.9, 0.9 )
+texture = ExtResource( 2 )
+flip_v = true
+region = true
+region_rect = Rect2( 50, 0, 54, 14 )
+
+[node name="14" type="Sprite" parent="buttons"]
+
+transform/pos = Vector2( -172.262, 81.8793 )
+transform/scale = Vector2( 0.9, 0.9 )
+texture = ExtResource( 2 )
+region = true
+region_rect = Rect2( 50, 0, 14, 54 )
+
+[node name="15" type="Sprite" parent="buttons"]
+
+transform/pos = Vector2( -105.085, 81.0326 )
+transform/scale = Vector2( 0.9, 0.9 )
+texture = ExtResource( 2 )
+flip_h = true
+region = true
+region_rect = Rect2( 50, 0, 14, 54 )
+
+[node name="axes" type="Node2D" parent="."]
+
+[node name="0-" type="Sprite" parent="axes"]
+
+transform/pos = Vector2( -94.4295, 164.932 )
+transform/scale = Vector2( 0.9, 0.9 )
+texture = ExtResource( 2 )
+region = true
+region_rect = Rect2( 50, 0, 14, 54 )
+
+[node name="0+" type="Sprite" parent="axes"]
+
+transform/pos = Vector2( -40.3475, 164.509 )
+transform/scale = Vector2( 0.9, 0.9 )
+texture = ExtResource( 2 )
+flip_h = true
+region = true
+region_rect = Rect2( 50, 0, 14, 54 )
+
+[node name="1-" type="Sprite" parent="axes"]
+
+transform/pos = Vector2( -67.6802, 137.926 )
+transform/scale = Vector2( 0.9, 0.9 )
+texture = ExtResource( 2 )
+region = true
+region_rect = Rect2( 50, 0, 54, 14 )
+
+[node name="1+" type="Sprite" parent="axes"]
+
+transform/pos = Vector2( -67.4618, 192.915 )
+transform/scale = Vector2( 0.9, 0.9 )
+texture = ExtResource( 2 )
+flip_v = true
+region = true
+region_rect = Rect2( 50, 0, 54, 14 )
+
+[node name="3-" type="Sprite" parent="axes"]
+
+transform/pos = Vector2( 76.6557, 140.986 )
+transform/scale = Vector2( 0.9, 0.9 )
+texture = ExtResource( 2 )
+region = true
+region_rect = Rect2( 50, 0, 54, 14 )
+
+[node name="3+" type="Sprite" parent="axes"]
+
+transform/pos = Vector2( 76.0009, 195.339 )
+transform/scale = Vector2( 0.9, 0.9 )
+texture = ExtResource( 2 )
+flip_v = true
+region = true
+region_rect = Rect2( 50, 0, 54, 14 )
+
+[node name="2-" type="Sprite" parent="axes"]
+
+transform/pos = Vector2( 48.8152, 167.145 )
+transform/scale = Vector2( 0.9, 0.9 )
+texture = ExtResource( 2 )
+region = true
+region_rect = Rect2( 50, 0, 14, 54 )
+
+[node name="2+" type="Sprite" parent="axes"]
+
+transform/pos = Vector2( 102.899, 167.857 )
+transform/scale = Vector2( 0.9, 0.9 )
+texture = ExtResource( 2 )
+flip_h = true
+region = true
+region_rect = Rect2( 50, 0, 14, 54 )
+
+

+ 0 - 115
misc/joysticks/jsdiagram.xscn

@@ -1,115 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<resource_file type="PackedScene" subresource_count="3" version="2.0" version_name="Godot Engine v2.0.alpha.custom_build">
-	<ext_resource path="res://indicators.png" type="Texture" index="1"></ext_resource>
-	<ext_resource path="res://diagram.png" type="Texture" index="0"></ext_resource>
-	<main_resource>
-		<dictionary name="_bundled" shared="false">
-			<string> "conn_count" </string>
-			<int> 0 </int>
-			<string> "conns" </string>
-			<int_array  len="0"> 				 </int_array>
-			<string> "editable_instances" </string>
-			<array  len="0" shared="false">
-			</array>
-			<string> "names" </string>
-			<string_array  len="37">
-				<string> "diagram" </string>
-				<string> "transform/pos" </string>
-				<string> "transform/scale" </string>
-				<string> "texture" </string>
-				<string> "__meta__" </string>
-				<string> "Sprite" </string>
-				<string> "buttons" </string>
-				<string> "Node2D" </string>
-				<string> "0" </string>
-				<string> "region" </string>
-				<string> "region_rect" </string>
-				<string> "1" </string>
-				<string> "2" </string>
-				<string> "3" </string>
-				<string> "4" </string>
-				<string> "5" </string>
-				<string> "6" </string>
-				<string> "flip_h" </string>
-				<string> "7" </string>
-				<string> "8" </string>
-				<string> "9" </string>
-				<string> "10" </string>
-				<string> "11" </string>
-				<string> "12" </string>
-				<string> "13" </string>
-				<string> "flip_v" </string>
-				<string> "14" </string>
-				<string> "15" </string>
-				<string> "axes" </string>
-				<string> "0-" </string>
-				<string> "0+" </string>
-				<string> "1-" </string>
-				<string> "1+" </string>
-				<string> "3-" </string>
-				<string> "3+" </string>
-				<string> "2-" </string>
-				<string> "2+" </string>
-			</string_array>
-			<string> "node_count" </string>
-			<int> 27 </int>
-			<string> "node_paths" </string>
-			<array  len="0" shared="false">
-			</array>
-			<string> "nodes" </string>
-			<int_array  len="453"> 				-1, -1, 5, 0, -1, 4, 1, 0, 2, 1, 3, 2, 4, 3, 0, 0, 0, 7, 6, -1, 1, 4, 4, 0, 1, 0, 5, 8, -1, 5, 1, 5, 2, 6, 3, 7, 9, 8, 10, 9, 0, 1, 0, 5, 11, -1, 5, 1, 10, 2, 6, 3, 7, 9, 8, 10, 9, 0, 1, 0, 5, 12, -1, 5, 1, 11, 2, 6, 3, 7, 9, 8, 10, 9, 0, 1, 0, 5, 13, -1, 5, 1, 12, 2, 6, 3, 7, 9, 8, 10, 9, 0, 1, 0, 5, 14, -1, 5, 1, 13, 2, 14, 3, 7, 9, 8, 10, 15, 0, 1, 0, 5, 15, -1, 5, 1, 16, 2, 14, 3, 7, 9, 8, 10, 15, 0, 1, 0, 5, 16, -1, 6, 1, 17, 2, 18, 3, 7, 17, 8, 9, 8, 10, 19, 0, 1, 0, 5, 18, -1, 5, 1, 20, 2, 18, 3, 7, 9, 8, 10, 19, 0, 1, 0, 5, 19, -1, 5, 1, 21, 2, 6, 3, 7, 9, 8, 10, 9, 0, 1, 0, 5, 20, -1, 5, 1, 22, 2, 6, 3, 7, 9, 8, 10, 9, 0, 1, 0, 5, 21, -1, 5, 1, 23, 2, 24, 3, 7, 9, 8, 10, 9, 0, 1, 0, 5, 22, -1, 5, 1, 25, 2, 24, 3, 7, 9, 8, 10, 9, 0, 1, 0, 5, 23, -1, 5, 1, 26, 2, 6, 3, 7, 9, 8, 10, 27, 0, 1, 0, 5, 24, -1, 6, 1, 28, 2, 6, 3, 7, 25, 8, 9, 8, 10, 27, 0, 1, 0, 5, 26, -1, 5, 1, 29, 2, 6, 3, 7, 9, 8, 10, 30, 0, 1, 0, 5, 27, -1, 6, 1, 31, 2, 6, 3, 7, 17, 8, 9, 8, 10, 30, 0, 0, 0, 7, 28, -1, 0, 0, 18, 0, 5, 29, -1, 5, 1, 32, 2, 6, 3, 7, 9, 8, 10, 30, 0, 18, 0, 5, 30, -1, 6, 1, 33, 2, 6, 3, 7, 17, 8, 9, 8, 10, 30, 0, 18, 0, 5, 31, -1, 5, 1, 34, 2, 6, 3, 7, 9, 8, 10, 27, 0, 18, 0, 5, 32, -1, 6, 1, 35, 2, 6, 3, 7, 25, 8, 9, 8, 10, 27, 0, 18, 0, 5, 33, -1, 5, 1, 36, 2, 6, 3, 7, 9, 8, 10, 27, 0, 18, 0, 5, 34, -1, 6, 1, 37, 2, 6, 3, 7, 25, 8, 9, 8, 10, 27, 0, 18, 0, 5, 35, -1, 5, 1, 38, 2, 6, 3, 7, 9, 8, 10, 30, 0, 18, 0, 5, 36, -1, 6, 1, 39, 2, 6, 3, 7, 17, 8, 9, 8, 10, 30, 0 </int_array>
-			<string> "variants" </string>
-			<array  len="40" shared="false">
-				<vector2> 368.635, 155.289 </vector2>
-				<vector2> 0.432859, 0.446287 </vector2>
-				<resource  external="0">  </resource>
-				<dictionary  shared="false">
-					<string> "__editor_plugin_screen__" </string>
-					<string> "2D" </string>
-				</dictionary>
-				<dictionary  shared="false">
-					<string> "_editor_collapsed" </string>
-					<bool> True </bool>
-				</dictionary>
-				<vector2> 147.73, 120.925 </vector2>
-				<vector2> 0.9, 0.9 </vector2>
-				<resource  external="1">  </resource>
-				<bool> True </bool>
-				<rect2> 0, 0, 45, 45 </rect2>
-				<vector2> 185.769, 82.4874 </vector2>
-				<vector2> 112.377, 82.4874 </vector2>
-				<vector2> 149.073, 47.3293 </vector2>
-				<vector2> -161.038, -158.037 </vector2>
-				<vector2> 5.3348, 3.35512 </vector2>
-				<rect2> 10, 10, 10, 10 </rect2>
-				<vector2> 159.362, -156.977 </vector2>
-				<vector2> -159.349, -221.878 </vector2>
-				<vector2> 1.0458, 2.16952 </vector2>
-				<rect2> 0, 0, 45, 22 </rect2>
-				<vector2> 156.677, -220.11 </vector2>
-				<vector2> -67.5308, 164.422 </vector2>
-				<vector2> 75.8825, 167.363 </vector2>
-				<vector2> -46.6707, 52.702 </vector2>
-				<vector2> 0.810497, 0.57205 </vector2>
-				<vector2> 56.2581, 54.4382 </vector2>
-				<vector2> -139.402, 46.8295 </vector2>
-				<rect2> 50, 0, 54, 14 </rect2>
-				<vector2> -139.838, 115.789 </vector2>
-				<vector2> -172.262, 81.8793 </vector2>
-				<rect2> 50, 0, 14, 54 </rect2>
-				<vector2> -105.085, 81.0326 </vector2>
-				<vector2> -94.4295, 164.932 </vector2>
-				<vector2> -40.3475, 164.509 </vector2>
-				<vector2> -67.6802, 137.926 </vector2>
-				<vector2> -67.4618, 192.915 </vector2>
-				<vector2> 76.6557, 140.986 </vector2>
-				<vector2> 76.0009, 195.339 </vector2>
-				<vector2> 48.8152, 167.145 </vector2>
-				<vector2> 102.899, 167.857 </vector2>
-			</array>
-			<string> "version" </string>
-			<int> 2 </int>
-		</dictionary>
-
-	</main_resource>
-</resource_file>