mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-06-08 04:37:13 +08:00
feat(UI): 改进提示框功能并添加Boss提醒
- 将TipBox的Label改为RichTextLabel以支持富文本 - 添加主题文件支持多种字体样式 - 修改showTip方法支持自定义显示时长 - 添加Boss波次提醒功能 - 调整TipBox场景的布局和样式
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user