Files
seeding-planets/gui/game/card/scripts/card_section.gd

20 lines
441 B
GDScript

@tool
extends PanelContainer
class_name CardSection
const DEFAULT_ICON_COLOR = Color("96b3dbff")
const DEFAULT_TITLE_COLOR = Color("100f2bff")
@export var info : CardSectionInfo = CardSectionInfo.new()
func _ready():
update()
@export_tool_button("Update", "Callable") var update_action = update
func update():
%Text.text = info.text
%TitleIcon.texture = info.title_icon
%TitleText.text = info.title_text
self_modulate = info.color