24 lines
772 B
GDScript
24 lines
772 B
GDScript
class_name ABGM52ProfessionModule
|
|
extends Control
|
|
|
|
const UIFactory = preload("res://ui/shared/ui_factory.gd")
|
|
const MarketChrome = preload("res://ui/shared/market_chrome.gd")
|
|
|
|
var value := ""
|
|
|
|
func configure(next_value: String) -> ABGM52ProfessionModule:
|
|
value = next_value
|
|
return self
|
|
|
|
func _ready() -> void:
|
|
clip_contents = true
|
|
var label := UIFactory.label(value, "micro", 1.0, MarketChrome.INK_SOFT)
|
|
label.name = "ProfessionLabel"
|
|
label.set_anchors_and_offsets_preset(Control.PRESET_FULL_RECT)
|
|
label.horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER
|
|
label.vertical_alignment = VERTICAL_ALIGNMENT_CENTER
|
|
label.clip_text = true
|
|
label.text_overrun_behavior = TextServer.OVERRUN_TRIM_ELLIPSIS
|
|
label.mouse_filter = Control.MOUSE_FILTER_IGNORE
|
|
add_child(label)
|