From f61773c6548f158daa7d7d3ea25fd6551aa0d1cd Mon Sep 17 00:00:00 2001 From: Andreas Haas Date: Fri, 24 Jun 2016 15:20:34 +0200 Subject: [PATCH] Joystick demo: add joystick vibration and convert to tscn. --- misc/joysticks/engine.cfg | 4 +- misc/joysticks/joysticks.gd | 10 + misc/joysticks/joysticks.scn | Bin 4064 -> 0 bytes misc/joysticks/joysticks.tscn | 854 ++++++++++++++++++++++++++++++++++ misc/joysticks/jsdiagram.tscn | 218 +++++++++ misc/joysticks/jsdiagram.xscn | 115 ----- 6 files changed, 1084 insertions(+), 117 deletions(-) delete mode 100644 misc/joysticks/joysticks.scn create mode 100644 misc/joysticks/joysticks.tscn create mode 100644 misc/joysticks/jsdiagram.tscn delete mode 100644 misc/joysticks/jsdiagram.xscn diff --git a/misc/joysticks/engine.cfg b/misc/joysticks/engine.cfg index 79cda1ee..28d14382 100644 --- a/misc/joysticks/engine.cfg +++ b/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 diff --git a/misc/joysticks/joysticks.gd b/misc/joysticks/joysticks.gd index a6b90241..d7df00f6 100644 --- a/misc/joysticks/joysticks.gd +++ b/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) diff --git a/misc/joysticks/joysticks.scn b/misc/joysticks/joysticks.scn deleted file mode 100644 index 7fc283ca69233ccbc2c23866f84972e0e84b1e85..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal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r>(S<8f^X*DS5A5(NYY2RD9n zrDwV1>vGA)m#vYdwRI;vKg? zw3SU*-5wZt;lhP8XEN8XU%xl{$L6uWZq(LZx%PO@qsG$VzT1B`rYN%f`d>b8GAT&C z|H5r*<74r+*?!sKTbrj8dq5@TYURp5+FNEfx09CIE&t#B?EBu{-a?7+|NQyA|GO+^<)t}?qTkgoT&LPQ|8V`e#zfct zl|2gzUPwyfW;WC$x?g@dwQ1#~X&KX}zdd-dyJkL9zH?`^+rs!@$@=4QS@xH6zuVeb zxgsjKZ;J1i|FAxO@vnb1#&?wdG3mlZN%{E0lRGkQJvsf}|ICfihve)j{&HGG+wHov zj;p7Rgl^1{EE<1!5=SAt91_-+xW+HME&APn>^XCS%<~83*XulP9+fQZ@5tD2?8vZJ z*|EPG@|mwQCbs>pbHc;#Z@tL+YTfXMZ6REFpeMgD+An1f{pRc-x0%;PuWj1?@J41t Xnh(s(o~=5f(5!-z(h_9}{%`+pMeJ)) diff --git a/misc/joysticks/joysticks.tscn b/misc/joysticks/joysticks.tscn new file mode 100644 index 00000000..76a00782 --- /dev/null +++ b/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"] + + diff --git a/misc/joysticks/jsdiagram.tscn b/misc/joysticks/jsdiagram.tscn new file mode 100644 index 00000000..1b3ec86f --- /dev/null +++ b/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 ) + + diff --git a/misc/joysticks/jsdiagram.xscn b/misc/joysticks/jsdiagram.xscn deleted file mode 100644 index 537ad302..00000000 --- a/misc/joysticks/jsdiagram.xscn +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - "conn_count" - 0 - "conns" - - "editable_instances" - - - "names" - - "diagram" - "transform/pos" - "transform/scale" - "texture" - "__meta__" - "Sprite" - "buttons" - "Node2D" - "0" - "region" - "region_rect" - "1" - "2" - "3" - "4" - "5" - "6" - "flip_h" - "7" - "8" - "9" - "10" - "11" - "12" - "13" - "flip_v" - "14" - "15" - "axes" - "0-" - "0+" - "1-" - "1+" - "3-" - "3+" - "2-" - "2+" - - "node_count" - 27 - "node_paths" - - - "nodes" - -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 - "variants" - - 368.635, 155.289 - 0.432859, 0.446287 - - - "__editor_plugin_screen__" - "2D" - - - "_editor_collapsed" - True - - 147.73, 120.925 - 0.9, 0.9 - - True - 0, 0, 45, 45 - 185.769, 82.4874 - 112.377, 82.4874 - 149.073, 47.3293 - -161.038, -158.037 - 5.3348, 3.35512 - 10, 10, 10, 10 - 159.362, -156.977 - -159.349, -221.878 - 1.0458, 2.16952 - 0, 0, 45, 22 - 156.677, -220.11 - -67.5308, 164.422 - 75.8825, 167.363 - -46.6707, 52.702 - 0.810497, 0.57205 - 56.2581, 54.4382 - -139.402, 46.8295 - 50, 0, 54, 14 - -139.838, 115.789 - -172.262, 81.8793 - 50, 0, 14, 54 - -105.085, 81.0326 - -94.4295, 164.932 - -40.3475, 164.509 - -67.6802, 137.926 - -67.4618, 192.915 - 76.6557, 140.986 - 76.0009, 195.339 - 48.8152, 167.145 - 102.899, 167.857 - - "version" - 2 - - - - \ No newline at end of file