]> Untitled Git - wolf-seeking-sheep.git/blob - addons/dialogic/Modules/DefaultLayoutParts/Layer_History/example_history_item.gd
Updated export config options
[wolf-seeking-sheep.git] / addons / dialogic / Modules / DefaultLayoutParts / Layer_History / example_history_item.gd
1 extends Container
2
3 func get_text_box() -> RichTextLabel:
4         return %TextBox
5
6
7 func get_name_label() -> Label:
8         return %NameLabel
9
10
11 func get_icon() -> TextureRect:
12         return %Icon
13
14
15 func load_info(text:String, character:String = "", character_color: Color =Color(), icon:Texture= null) -> void:
16         get_text_box().text = text
17         var name_label: Label = get_name_label()
18         if character:
19                 name_label.text = character
20                 name_label.add_theme_color_override('font_color', character_color)
21                 name_label.show()
22         else:
23                 name_label.hide()
24
25         var icon_node: TextureRect = get_icon()
26         if icon == null:
27                 icon_node.hide()
28         else:
29                 icon_node.show()
30                 icon_node.texture = icon