SusObjectivePanel

任务目标卡片——标题 + 字符串项目符号列表。
包
SusGame · HUD(商业)
属性
| 名称 | 类型 | 默认值 | |
|---|---|---|---|
Title | Prop<string> | "Objectives" | |
Visible | Prop<bool> | true |
插槽
没有插槽。
事件
没有公开事件。
样式钩子
USS 类契约 — 无需改 C# 即可覆盖外观。状态通过这些类切换:
sus-objective-panelsus-objective-panel__bulletsus-objective-panel__listsus-objective-panel__rowsus-objective-panel__textsus-objective-panel__titlesus-objective-panel--hidden
用法
绑定标题 / 可见性;用 SetObjectives 从代码填充条目。
csharp
var panel = new SusObjectivePanel();
panel.Title.Value = "Objectives";
panel.Visible.Value = true;
panel.SetObjectives(new[]
{
"Secure the landing zone",
"Extract the VIP",
});xml
<template>
<sus:SusObjectivePanel :Title="Title.Value"
:Visible="Show.Value" />
</template>
<script>
public Prop<string> Title = new("Objectives");
public Prop<bool> Show = new(true);
// Call SetObjectives after mount (list host is resolved in Mounted).
</script>| Prop / API | Role |
|---|---|
Title | 标题文本(默认 Objectives) |
Visible | 切换 --hidden |
SetObjectives(lines) | 替换列表行(IEnumerable<string>) |
备注
- 在调用
SetObjectives前为空列表——请在挂载后调用(或在列表宿主存在之后)。 - 每一行会渲染成一个
•+ 文本行;该组件没有丰富的状态 / 完成度 API。