brackeys-12/ui/BuildingIcon.tscn
2024-09-14 23:21:43 -04:00

40 lines
1.5 KiB
Text

[gd_scene load_steps=5 format=3 uid="uid://b7o2i7tgirg64"]
[ext_resource type="Script" path="res://ui/building_icon.gd" id="1_6qgij"]
[ext_resource type="Texture2D" uid="uid://clqov5mu3bpaw" path="res://parts/buildings/images/foodprocessing.png" id="2_3vnc8"]
[ext_resource type="PackedScene" uid="uid://dykc1mgg5uopw" path="res://components/Cursor/MouseHandler.tscn" id="3_tf3sl"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_0bdxp"]
[node name="BuildingIcon" type="ColorRect"]
custom_minimum_size = Vector2(32, 32)
offset_right = 32.0
offset_bottom = 32.0
pivot_offset = Vector2(16, 16)
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
offset_left = -8.0
offset_top = -8.0
offset_right = 8.0
offset_bottom = 8.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("2_3vnc8")
[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"]