1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-06-10 13:47:12 +08:00

feat(UI): 改进提示框功能并添加Boss提醒

- 将TipBox的Label改为RichTextLabel以支持富文本
- 添加主题文件支持多种字体样式
- 修改showTip方法支持自定义显示时长
- 添加Boss波次提醒功能
- 调整TipBox场景的布局和样式
This commit is contained in:
2026-01-24 20:07:06 +08:00
parent a6ece59c71
commit ac77e3d581
5 changed files with 40 additions and 7 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ class_name TipBox
@export var text: String = "nothing"
@onready var label: Label = $%label
@onready var label: RichTextLabel = $%label
@onready var animator: AnimationPlayer = $%animator
func _ready():
+3 -3
View File
@@ -74,11 +74,11 @@ static func setPanel(targetName: String = "", args: Array = []):
panel.hidePanel()
static func closeCurrentPanel():
setPanel()
static func showTip(text: String, destroyAfter: bool = false):
static func showTip(text: String, destroyAfter: float = -1):
var box = TipBox.create(text)
tips.add_child(box)
if destroyAfter:
await TickTool.millseconds(len(text) * 500)
if destroyAfter > 0:
await TickTool.millseconds(destroyAfter * len(text))
box.destroy()
else:
return box