summaryrefslogtreecommitdiff
path: root/components/button.tscn
diff options
context:
space:
mode:
Diffstat (limited to 'components/button.tscn')
-rw-r--r--components/button.tscn14
1 files changed, 12 insertions, 2 deletions
diff --git a/components/button.tscn b/components/button.tscn
index 9519475..0071746 100644
--- a/components/button.tscn
+++ b/components/button.tscn
@@ -1,4 +1,4 @@
-[gd_scene load_steps=8 format=2]
+[gd_scene load_steps=9 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]
@@ -13,7 +13,10 @@ font_data = ExtResource( 3 )
[sub_resource type="Theme" id=2]
default_font = SubResource( 1 )
-[node name="ButtonTest" type="Node2D"]
+[sub_resource type="RectangleShape2D" id=3]
+extents = Vector2( 10, 32 )
+
+[node name="ButtonTest" type="Area2D"]
script = ExtResource( 5 )
[node name="Left" type="Sprite" parent="."]
@@ -42,3 +45,10 @@ scroll_active = false
__meta__ = {
"_edit_use_anchors_": false
}
+
+[node name="Hitbox" type="CollisionShape2D" parent="."]
+shape = SubResource( 3 )
+
+[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"]