mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 06:51:54 +08:00
c5d58a14f7
添加新的白色灵魂武器,包括脚本、场景和资源文件 修改公鸡角色配置以使用新武器 优化子弹工具类和白色灵魂子弹的行为 添加获取窗口大小的工具方法
22 lines
693 B
GDScript
22 lines
693 B
GDScript
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
|
|
static func getWindowSize() -> Vector2:
|
|
var result = DisplayServer.window_get_size()
|
|
return result
|