1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-28 06:51:54 +08:00
Files
Dog-Lynx-And-HCN/scripts/Tools/QuickUI.gd
T

19 lines
592 B
GDScript
Raw Normal View History

class_name QuickUI
static func smallText(text: String, center: bool = true):
var label = Label.new()
label.text = text
label.theme = ComponentManager.getTheme("smallText")
if center:
label.horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER
return label
static func graySmallText(text: String, center: bool = true):
var label = Label.new()
label.text = text
label.label_settings = LabelSettings.new()
label.label_settings.font_size = 12
label.label_settings.font_color = Color(0.6, 0.6, 0.6, 1)
if center:
label.horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER
return label