brackeys-12/ui/BuildingIcon.tscn

41 lines
1.5 KiB
Text
Raw Normal View History

2024-09-14 00:09:38 +00:00
[gd_scene load_steps=5 format=3 uid="uid://b7o2i7tgirg64"]
2024-09-12 02:40:54 +00:00
[ext_resource type="Script" path="res://ui/building_icon.gd" id="1_6qgij"]
2024-09-15 03:21:43 +00:00
[ext_resource type="Texture2D" uid="uid://clqov5mu3bpaw" path="res://parts/buildings/images/foodprocessing.png" id="2_3vnc8"]
2024-09-14 00:09:38 +00:00
[ext_resource type="PackedScene" uid="uid://dykc1mgg5uopw" path="res://components/Cursor/MouseHandler.tscn" id="3_tf3sl"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_0bdxp"]
2024-09-12 02:04:24 +00:00
[node name="BuildingIcon" type="ColorRect"]
custom_minimum_size = Vector2(32, 32)
2024-09-15 01:09:17 +00:00
offset_right = 32.0
offset_bottom = 32.0
pivot_offset = Vector2(16, 16)
2024-09-12 02:40:54 +00:00
script = ExtResource("1_6qgij")
[node name="TextureRect" type="TextureRect" parent="."]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
2024-09-15 03:21:43 +00:00
offset_left = -8.0
offset_top = -8.0
offset_right = 8.0
offset_bottom = 8.0
2024-09-12 02:40:54 +00:00
grow_horizontal = 2
grow_vertical = 2
2024-09-15 03:21:43 +00:00
texture = ExtResource("2_3vnc8")
2024-09-14 00:09:38 +00:00
[node name="MouseHandler" parent="." instance=ExtResource("3_tf3sl")]
position = Vector2(16, 17)
[node name="CollisionShape2D" type="CollisionShape2D" parent="MouseHandler"]
shape = SubResource("RectangleShape2D_0bdxp")
[connection signal="clicked" from="MouseHandler" to="." method="_on_mouse_handler_clicked"]
[connection signal="hovered" from="MouseHandler" to="." method="_on_mouse_handler_hovered"]
[connection signal="released" from="MouseHandler" to="." method="_on_mouse_handler_released"]
[connection signal="unhovered" from="MouseHandler" to="." method="_on_mouse_handler_unhovered"]