SusMatchResult

比赛结束结果面板 — 胜利或失败标题及原因行、摘要、成长和段位区块,以及展开和停靠操作。
包
SusGame · 屏幕(商业)
属性
| 名称 | 类型 | 默认值 | |
|---|---|---|---|
Outcome | Prop<string> | "victory" | |
Kicker | Prop<string> | "" | |
Title | Prop<string> | "" | |
Reason | Prop<string> | "" | |
RankLabel | Prop<string> | "" | |
ExpandIcon | Prop<string> | "arrows-out" | |
DockText | Prop<string> | "" |
插槽
没有插槽。
事件
| 名称 | 字段 | 载荷 |
|---|---|---|
Dock | OnDock | — |
Expand | OnExpand | — |
样式钩子
USS 类契约 — 无需改 C# 即可覆盖外观。状态通过这些类切换:
sus-hiddensus-match-resultsus-match-result__actionssus-match-result__docksus-match-result__expandsus-match-result__growthsus-match-result__growth--emptysus-match-result__growth-keysus-match-result__growth-rowsus-match-result__growth-statussus-match-result__growth-valuesus-match-result__headsus-match-result__kickersus-match-result__linesus-match-result__ranksus-match-result__rank--emptysus-match-result__rank-arrowsus-match-result__rank-badgesus-match-result__rank-badgessus-match-result__rank-keysus-match-result__rank-samesus-match-result__reasonsus-match-result__summarysus-match-result__summary-cellsus-match-result__summary-keysus-match-result__summary-valuesus-match-result__titlesus-match-result--defeatsus-match-result--victory
用法
xml
<sus:SusMatchResult />csharp
var result = new SusMatchResult();
result.Outcome.Value = "victory";
result.Title.Value = "Victory";
result.Reason.Value = "All objectives held";
result.SetSummary(new[] { ("12", "Kills"), ("3:41", "Time") });
result.SetGrowth(rows: null); // no data yet: hides the growth block
result.SetRank(null); // no data yet: hides the rank block| Prop / API | 作用 |
|---|---|
Outcome / Kicker / Title / Reason / RankLabel | 卡片文字 |
SetSummary(cells) | 摘要单元格(数值 + 键) |
SetGrowth(rows, statusText) | 成长行,外加可选的状态行 |
SetRank(oldRank, promoted, newRank, sameLabel) | 段位徽章、晋升箭头或“段位不变”说明 |
DockText / OnDock | ActionsHost 中的次要操作:为空(默认)= 无按钮;点击触发 OnDock |
ExpandIcon / OnExpand | 展开按钮内的图标(默认 arrows-out,为空 = 无字形);该按钮只在 docked 宿主内显示 |
ActionsHost / DockBtn | 操作行和 dock 按钮 |
空的成长与段位
不带行也不带状态的 SetGrowth,以及 SetRank(null)(或空的旧段位),表示 “暂无数据”:该区块通过 sus-match-result__growth--empty / sus-match-result__rank--empty 隐藏。从不调用它们时,区块保持原样。
在 SusGameSessionScreenContent 中设置 ResultView = "match" 时,会话的继续按钮会被移入 ActionsHost,dock 按钮 会把卡片收进侧边面板。此时 SusGameSessionScreen.ShowVictory / ShowDefeat / ShowDraw 会替你填写 Title、Reason 和结果,除非你自己设置了 Title 或 Reason。