forked from Nekojimi/JackIt
23 lines
544 B
GDScript3
23 lines
544 B
GDScript3
|
@tool
|
||
|
extends Card
|
||
|
class_name TeamCard
|
||
|
|
||
|
@export var team: Team:
|
||
|
set(val):
|
||
|
if team != null:
|
||
|
team.disconnect("changed", update)
|
||
|
team = val
|
||
|
team.connect("changed", update)
|
||
|
update()
|
||
|
|
||
|
func _ready() -> void:
|
||
|
update()
|
||
|
|
||
|
func update() -> void:
|
||
|
if team == null:
|
||
|
return
|
||
|
$"RootMover/Card Front/VBoxContainer/RoleName".text = team.name
|
||
|
$"RootMover/Card Front/VBoxContainer/RoleDescription".text = "[center]" + team.description + "[/center]"
|
||
|
show_postit(!team.postit.is_empty())
|
||
|
$"RootMover/Card Front/PostIt/Label".text = team.postit
|