Fixed the joypad demo to work with Godot 3 Beta 1

This commit is contained in:
TwistedTwigleg
2017-12-01 17:06:25 -05:00
parent e22000bcee
commit 4e41829e3d
5 changed files with 314 additions and 101 deletions

View File

@@ -4,6 +4,10 @@ importer="texture"
type="StreamTexture"
path="res://.import/diagram.png-1621ff3c0b6dad34000ac99354b64701.stex"
[deps]
source_md5="bc20fa2375b14c17e86892fe7210e8bf"
[params]
compress/mode=0

View File

@@ -4,6 +4,10 @@ importer="texture"
type="StreamTexture"
path="res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex"
[deps]
source_md5="046afbd20c33eff2ded7513724d08a93"
[params]
compress/mode=0

View File

@@ -4,6 +4,10 @@ importer="texture"
type="StreamTexture"
path="res://.import/indicators.png-b2d98522e44d4529354ba542a9970360.stex"
[deps]
source_md5="5a31443cd8b7034172883cd5e7da21a9"
[params]
compress/mode=0

View File

@@ -9,7 +9,7 @@ script = ExtResource( 1 )
[node name="diagram" parent="." instance=ExtResource( 2 )]
position = Vector2( 403.304, 161.318 )
position = Vector2( 400, 200 )
[node name="device_info" type="Control" parent="."]
@@ -114,9 +114,9 @@ anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 50.0
margin_left = 60.0
margin_top = 60.0
margin_right = 250.0
margin_right = 260.0
margin_bottom = 76.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
@@ -138,9 +138,9 @@ anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 50.0
margin_left = 60.0
margin_top = 80.0
margin_right = 250.0
margin_right = 260.0
margin_bottom = 96.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
@@ -162,9 +162,9 @@ anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 50.0
margin_left = 60.0
margin_top = 100.0
margin_right = 250.0
margin_right = 260.0
margin_bottom = 116.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
@@ -186,9 +186,9 @@ anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 50.0
margin_left = 60.0
margin_top = 120.0
margin_right = 250.0
margin_right = 260.0
margin_bottom = 136.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
@@ -210,9 +210,9 @@ anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 50.0
margin_left = 60.0
margin_top = 140.0
margin_right = 250.0
margin_right = 260.0
margin_bottom = 156.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
@@ -234,9 +234,9 @@ anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 50.0
margin_left = 60.0
margin_top = 160.0
margin_right = 250.0
margin_right = 260.0
margin_bottom = 176.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
@@ -258,9 +258,9 @@ anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 50.0
margin_left = 60.0
margin_top = 180.0
margin_right = 250.0
margin_right = 260.0
margin_bottom = 196.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
@@ -282,9 +282,9 @@ anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 50.0
margin_left = 60.0
margin_top = 200.0
margin_right = 250.0
margin_right = 260.0
margin_bottom = 216.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
@@ -300,15 +300,87 @@ exp_edit = false
rounded = false
percent_visible = false
[node name="axis_prog8" type="ProgressBar" parent="axes"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 60.0
margin_top = 220.0
margin_right = 260.0
margin_bottom = 236.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 0
size_flags_horizontal = 2
size_flags_vertical = 0
min_value = -100.0
max_value = 100.0
step = 0.0001
page = 0.0
value = 0.0
exp_edit = false
rounded = false
percent_visible = false
[node name="axis_prog9" type="ProgressBar" parent="axes"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 60.0
margin_top = 240.0
margin_right = 260.0
margin_bottom = 256.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 0
size_flags_horizontal = 2
size_flags_vertical = 0
min_value = -100.0
max_value = 100.0
step = 0.0001
page = 0.0
value = 0.0
exp_edit = false
rounded = false
percent_visible = false
[node name="axis_prog10" type="ProgressBar" parent="axes"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 60.0
margin_top = 260.0
margin_right = 260.0
margin_bottom = 276.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 0
size_flags_horizontal = 2
size_flags_vertical = 0
min_value = -100.0
max_value = 100.0
step = 0.0001
page = 0.0
value = 0.0
exp_edit = false
rounded = false
percent_visible = false
[node name="axis_val0" type="Label" parent="axes"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 50.0
margin_left = 60.0
margin_top = 60.0
margin_right = 250.0
margin_right = 260.0
margin_bottom = 75.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
@@ -328,9 +400,9 @@ anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 50.0
margin_left = 60.0
margin_top = 80.0
margin_right = 250.0
margin_right = 260.0
margin_bottom = 95.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
@@ -350,9 +422,9 @@ anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 50.0
margin_left = 60.0
margin_top = 100.0
margin_right = 250.0
margin_right = 260.0
margin_bottom = 115.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
@@ -372,9 +444,9 @@ anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 50.0
margin_left = 60.0
margin_top = 120.0
margin_right = 250.0
margin_right = 260.0
margin_bottom = 135.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
@@ -394,9 +466,9 @@ anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 50.0
margin_left = 60.0
margin_top = 140.0
margin_right = 250.0
margin_right = 260.0
margin_bottom = 155.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
@@ -416,9 +488,9 @@ anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 50.0
margin_left = 60.0
margin_top = 160.0
margin_right = 250.0
margin_right = 260.0
margin_bottom = 175.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
@@ -438,9 +510,9 @@ anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 50.0
margin_left = 60.0
margin_top = 180.0
margin_right = 250.0
margin_right = 260.0
margin_bottom = 195.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
@@ -460,9 +532,9 @@ anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 50.0
margin_left = 60.0
margin_top = 200.0
margin_right = 250.0
margin_right = 260.0
margin_bottom = 215.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
@@ -476,6 +548,72 @@ percent_visible = 1.0
lines_skipped = 0
max_lines_visible = -1
[node name="axis_val8" type="Label" parent="axes"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 60.0
margin_top = 220.0
margin_right = 260.0
margin_bottom = 235.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 2
size_flags_horizontal = 2
size_flags_vertical = 0
text = "0"
align = 1
valign = 1
percent_visible = 1.0
lines_skipped = 0
max_lines_visible = -1
[node name="axis_val9" type="Label" parent="axes"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 60.0
margin_top = 240.0
margin_right = 260.0
margin_bottom = 255.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 2
size_flags_horizontal = 2
size_flags_vertical = 0
text = "0"
align = 1
valign = 1
percent_visible = 1.0
lines_skipped = 0
max_lines_visible = -1
[node name="axis_val10" type="Label" parent="axes"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 60.0
margin_top = 260.0
margin_right = 260.0
margin_bottom = 275.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 2
size_flags_horizontal = 2
size_flags_vertical = 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="axes"]
anchor_left = 0.0
@@ -644,6 +782,69 @@ percent_visible = 1.0
lines_skipped = 0
max_lines_visible = -1
[node name="label_axis8" type="Label" parent="axes"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 10.0
margin_top = 220.0
margin_right = 51.0
margin_bottom = 235.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 2
size_flags_horizontal = 2
size_flags_vertical = 0
text = "Axis 8"
valign = 2
percent_visible = 1.0
lines_skipped = 0
max_lines_visible = -1
[node name="label_axis9" type="Label" parent="axes"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 10.0
margin_top = 240.0
margin_right = 51.0
margin_bottom = 255.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 2
size_flags_horizontal = 2
size_flags_vertical = 0
text = "Axis 9"
valign = 2
percent_visible = 1.0
lines_skipped = 0
max_lines_visible = -1
[node name="label_axis10" type="Label" parent="axes"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 10.0
margin_top = 260.0
margin_right = 51.0
margin_bottom = 275.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 2
size_flags_horizontal = 2
size_flags_vertical = 0
text = "Axis 10"
valign = 2
percent_visible = 1.0
lines_skipped = 0
max_lines_visible = -1
[node name="buttons" type="Control" parent="."]
editor/display_folded = true
@@ -666,9 +867,9 @@ anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 10.0
margin_top = 235.0
margin_top = 290.0
margin_right = 65.0
margin_bottom = 249.0
margin_bottom = 304.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 2
@@ -686,9 +887,9 @@ anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 20.0
margin_top = 255.0
margin_top = 310.0
margin_right = 45.0
margin_bottom = 269.0
margin_bottom = 324.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 2
@@ -707,9 +908,9 @@ anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 45.0
margin_top = 255.0
margin_top = 310.0
margin_right = 70.0
margin_bottom = 269.0
margin_bottom = 324.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 2
@@ -728,9 +929,9 @@ anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 70.0
margin_top = 255.0
margin_top = 310.0
margin_right = 95.0
margin_bottom = 269.0
margin_bottom = 324.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 2
@@ -749,9 +950,9 @@ anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 95.0
margin_top = 255.0
margin_top = 310.0
margin_right = 120.0
margin_bottom = 269.0
margin_bottom = 324.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 2
@@ -770,9 +971,9 @@ anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 120.0
margin_top = 255.0
margin_top = 310.0
margin_right = 145.0
margin_bottom = 269.0
margin_bottom = 324.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 2
@@ -791,9 +992,9 @@ anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 145.0
margin_top = 255.0
margin_top = 310.0
margin_right = 170.0
margin_bottom = 269.0
margin_bottom = 324.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 2
@@ -812,9 +1013,9 @@ anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 170.0
margin_top = 255.0
margin_top = 310.0
margin_right = 195.0
margin_bottom = 269.0
margin_bottom = 324.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 2
@@ -833,9 +1034,9 @@ anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 195.0
margin_top = 255.0
margin_top = 310.0
margin_right = 220.0
margin_bottom = 269.0
margin_bottom = 324.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 2
@@ -854,9 +1055,9 @@ anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 220.0
margin_top = 255.0
margin_top = 310.0
margin_right = 245.0
margin_bottom = 269.0
margin_bottom = 324.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 2
@@ -875,9 +1076,9 @@ anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 20.0
margin_top = 275.0
margin_top = 330.0
margin_right = 45.0
margin_bottom = 289.0
margin_bottom = 344.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 2
@@ -896,9 +1097,9 @@ anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 45.0
margin_top = 275.0
margin_top = 330.0
margin_right = 70.0
margin_bottom = 289.0
margin_bottom = 344.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 2
@@ -917,9 +1118,9 @@ anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 70.0
margin_top = 275.0
margin_top = 330.0
margin_right = 95.0
margin_bottom = 289.0
margin_bottom = 344.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 2
@@ -938,9 +1139,9 @@ anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 95.0
margin_top = 275.0
margin_top = 330.0
margin_right = 120.0
margin_bottom = 289.0
margin_bottom = 344.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 2
@@ -959,9 +1160,9 @@ anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 120.0
margin_top = 275.0
margin_top = 330.0
margin_right = 145.0
margin_bottom = 289.0
margin_bottom = 344.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 2
@@ -980,9 +1181,9 @@ anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 145.0
margin_top = 275.0
margin_top = 330.0
margin_right = 170.0
margin_bottom = 289.0
margin_bottom = 344.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 2
@@ -1001,9 +1202,9 @@ anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 170.0
margin_top = 275.0
margin_top = 330.0
margin_right = 195.0
margin_bottom = 289.0
margin_bottom = 344.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 2
@@ -1036,10 +1237,10 @@ anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 8.0
margin_top = 329.0
margin_right = 150.0
margin_bottom = 343.0
margin_left = 10.0
margin_top = 375.0
margin_right = 152.0
margin_bottom = 389.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 2
@@ -1056,10 +1257,10 @@ anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 8.0
margin_top = 367.0
margin_right = 155.0
margin_bottom = 381.0
margin_left = 10.0
margin_top = 413.0
margin_right = 157.0
margin_bottom = 427.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 2
@@ -1076,10 +1277,10 @@ anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 8.0
margin_top = 408.0
margin_right = 155.0
margin_bottom = 439.0
margin_left = 10.0
margin_top = 454.0
margin_right = 157.0
margin_bottom = 468.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 2
@@ -1096,10 +1297,10 @@ anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 163.0
margin_top = 324.0
margin_right = 237.0
margin_bottom = 348.0
margin_left = 165.0
margin_top = 370.0
margin_right = 239.0
margin_bottom = 394.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 0
@@ -1122,10 +1323,10 @@ anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 163.0
margin_top = 362.0
margin_right = 237.0
margin_bottom = 386.0
margin_left = 165.0
margin_top = 408.0
margin_right = 239.0
margin_bottom = 432.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 0
@@ -1148,10 +1349,10 @@ anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 163.0
margin_top = 403.0
margin_right = 237.0
margin_bottom = 427.0
margin_left = 165.0
margin_top = 449.0
margin_right = 239.0
margin_bottom = 473.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 0
@@ -1174,10 +1375,10 @@ anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 288.0
margin_top = 352.0
margin_right = 390.0
margin_bottom = 372.0
margin_left = 290.0
margin_top = 400.0
margin_right = 392.0
margin_bottom = 420.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 0
@@ -1196,10 +1397,10 @@ anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 406.0
margin_top = 352.0
margin_right = 507.0
margin_bottom = 372.0
margin_left = 408.0
margin_top = 400.0
margin_right = 509.0
margin_bottom = 420.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 0

View File

@@ -16,8 +16,8 @@ config/icon="res://icon.png"
[display]
window/size/width=550
window/size/height=450
window/size/width=540
window/size/height=480
[gdnative]