everything_has_a_price_jam/test/command_modal.gd
2026-09-27 13:48:31 -06:00

18 lines
432 B
GDScript

extends Label
func _ready() -> void:
UserContext.modal_command_change.connect(modal_command_change)
modal_command_change(null)
func modal_command_change(c: Command):
if c == null:
visible = false
%Panel2.visible = false
return
visible = true
%Panel2.visible = true
text = c.modal_name + " " + UserContext.selected_member.currency.name
func _on_button_pressed() -> void:
UserContext.modal_command_change.emit(null)