gros dev pre proto
* Changement de l'UI, ajouts de l'inspecteur par carte et changement de police * Ajout d'un semblant d'exploration * Ajout de la sauvegarde des entités * Restructuration mineure de l'arborescence * Fix divers et réécriture des textes
This commit is contained in:
20
gui/game/card/scripts/card_section.gd
Normal file
20
gui/game/card/scripts/card_section.gd
Normal file
@@ -0,0 +1,20 @@
|
||||
@tool
|
||||
extends VBoxContainer
|
||||
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
|
||||
%TitleIcon.modulate = info.title_color if info.title_colored else DEFAULT_ICON_COLOR
|
||||
%TitleText.modulate = info.title_color if info.title_colored else DEFAULT_TITLE_COLOR
|
||||
Reference in New Issue
Block a user