summaryrefslogtreecommitdiff
path: root/components/button.tscn
diff options
context:
space:
mode:
authorrom <romangraef@gmail.com>2021-04-25 13:52:34 +0200
committerrom <romangraef@gmail.com>2021-04-25 13:52:34 +0200
commitc3961f5891f6a90396c6ce31ce9a62b87cb2fd55 (patch)
tree7c8160b59acdc506900c89a717b8a7581d75a6b5 /components/button.tscn
parent26900b16664922203ad658f0f561624114ac601d (diff)
downloadldjam48-c3961f5891f6a90396c6ce31ce9a62b87cb2fd55.tar.gz
ldjam48-c3961f5891f6a90396c6ce31ce9a62b87cb2fd55.tar.bz2
ldjam48-c3961f5891f6a90396c6ce31ce9a62b87cb2fd55.zip
fix button hitboxes
Diffstat (limited to 'components/button.tscn')
-rw-r--r--components/button.tscn12
1 files changed, 4 insertions, 8 deletions
diff --git a/components/button.tscn b/components/button.tscn
index 580ef29..3a8029e 100644
--- a/components/button.tscn
+++ b/components/button.tscn
@@ -1,13 +1,10 @@
-[gd_scene load_steps=6 format=2]
+[gd_scene load_steps=5 format=2]
[ext_resource path="res://textures/components/button/middle.png" type="Texture" id=1]
[ext_resource path="res://textures/components/button/right.png" type="Texture" id=2]
[ext_resource path="res://textures/components/button/left.png" type="Texture" id=4]
[ext_resource path="res://components/button.gd" type="Script" id=5]
-[sub_resource type="RectangleShape2D" id=1]
-extents = Vector2( 10, 32 )
-
[node name="Button" type="Area2D"]
script = ExtResource( 5 )
@@ -17,17 +14,16 @@ scale = Vector2( 4, 4 )
texture = ExtResource( 4 )
[node name="Right" type="Sprite" parent="."]
-position = Vector2( 100, 0 )
+position = Vector2( 99, 0 )
scale = Vector2( 4, 4 )
texture = ExtResource( 2 )
[node name="Middle" type="Sprite" parent="."]
-position = Vector2( -0.5, 0 )
-scale = Vector2( 30.321, 4 )
+scale = Vector2( 29, 4 )
texture = ExtResource( 1 )
[node name="Hitbox" type="CollisionShape2D" parent="."]
-shape = SubResource( 1 )
+
[connection signal="input_event" from="." to="." method="_on_ButtonTest_input_event"]
[connection signal="mouse_entered" from="." to="." method="_on_ButtonTest_mouse_entered"]
[connection signal="mouse_exited" from="." to="." method="_on_ButtonTest_mouse_exited"]