1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-27 22:41:56 +08:00
Files
Dog-Lynx-And-HCN/scripts/Tools/QuickUI.gd
T
fallingshrimp 417ca71de3 Add HarmonyOS Sans font and implement QuickUI for text handling
- Imported HarmonyOS Sans Regular font with appropriate settings for rendering and fallback.
- Created QuickUI script to facilitate the creation of small text labels with optional centering.
- Added new theme resources for big bold text and small text, defining font sizes for RichTextLabel and Label respectively.
2025-08-26 19:35:26 +08:00

10 lines
261 B
GDScript

class_name QuickUI
static func smallText(text: String, center: bool = true):
var label = Label.new()
label.text = text
label.theme = preload("res://themes/smallText.tres")
if center:
label.horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER
return label