2026-04-13 11:34:00 -05:00
|
|
|
extends PanelContainer
|
|
|
|
|
|
|
|
|
|
signal select_building(building: Building)
|
|
|
|
|
|
|
|
|
|
var style_box: StyleBoxFlat
|
|
|
|
|
|
2026-04-15 10:45:43 -05:00
|
|
|
|
2026-04-13 11:34:00 -05:00
|
|
|
func _ready() -> void:
|
|
|
|
|
style_box = get_theme_stylebox("panel")
|
|
|
|
|
|
2026-04-15 10:45:43 -05:00
|
|
|
|
2026-04-13 11:34:00 -05:00
|
|
|
func _on_mouse_entered() -> void:
|
|
|
|
|
style_box.border_width_bottom = 5
|
|
|
|
|
style_box.border_width_top = 5
|
|
|
|
|
style_box.border_width_left = 5
|
|
|
|
|
style_box.border_width_right = 5
|
|
|
|
|
|
2026-04-15 10:45:43 -05:00
|
|
|
|
2026-04-13 11:34:00 -05:00
|
|
|
func _on_mouse_exited() -> void:
|
|
|
|
|
style_box.border_width_bottom = 0
|
|
|
|
|
style_box.border_width_top = 0
|
|
|
|
|
style_box.border_width_left = 0
|
|
|
|
|
style_box.border_width_right = 0
|
|
|
|
|
|
2026-04-15 10:45:43 -05:00
|
|
|
|
2026-04-13 11:34:00 -05:00
|
|
|
func _on_gui_input(event: InputEvent) -> void:
|
|
|
|
|
if event.is_action_pressed("select"):
|
2026-04-15 10:45:43 -05:00
|
|
|
select_building.emit(get_child(0))
|