maxgame/game/gui/components/sierra_command_button/sierra_command_button.gd
2025-07-17 01:49:18 -04:00

19 lines
458 B
GDScript

extends TextureButton
@export var command: SierraCommands.Commands = 0
#region Godot ######################################################################################
func _ready() -> void:
toggled.connect(on_toggled)
#endregion
#region Public #####################################################################################
func on_toggled(is_pressed: bool) -> void:
if is_pressed:
PopochiuUtils.e.current_command = command
#endregion