project_teddy/joystick/virtual_joystick.tscn
2023-03-21 09:52:08 -06:00

69 lines
1.8 KiB
Text

[gd_scene load_steps=4 format=3 uid="uid://buyvavyuwmccw"]
[ext_resource type="Texture2D" uid="uid://c13dhmpklvcb4" path="res://joystick/textures/joystick_base_outline.png" id="1"]
[ext_resource type="Texture2D" uid="uid://bprmb464pp766" path="res://joystick/textures/joystick_tip_arrows.png" id="2"]
[ext_resource type="Script" path="res://joystick/virtual_joystick.gd" id="3"]
[node name="Virtual joystick" type="Control"]
modulate = Color(1, 1, 1, 0.509804)
layout_mode = 3
anchors_preset = 2
anchor_top = 1.0
anchor_bottom = 1.0
offset_left = 50.0
offset_top = -250.0
offset_right = 250.0
offset_bottom = -50.0
grow_vertical = 0
script = ExtResource("3")
visibility_mode = 1
action_left = "player_left"
action_right = "player_right"
action_up = "player_forward"
action_down = "player_backward"
[node name="Base" type="TextureRect" parent="."]
layout_mode = 0
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -100.0
offset_top = -100.0
offset_right = 100.0
offset_bottom = 100.0
grow_horizontal = 2
grow_vertical = 2
pivot_offset = Vector2(100, 100)
size_flags_horizontal = 4
size_flags_vertical = 4
texture = ExtResource("1")
stretch_mode = 6
[node name="Tip" type="TextureRect" parent="Base"]
layout_mode = 0
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -50.0
offset_top = -50.0
offset_right = 50.0
offset_bottom = 50.0
grow_horizontal = 2
grow_vertical = 2
pivot_offset = Vector2(50, 50)
size_flags_horizontal = 4
size_flags_vertical = 4
texture = ExtResource("2")
stretch_mode = 6
[node name="Button" type="Button" parent="."]
layout_mode = 0
offset_left = 794.0
offset_top = 17.0
offset_right = 1068.0
offset_bottom = 222.0
text = "JUMP"
[connection signal="pressed" from="Button" to="." method="_on_button_pressed"]