Manages a score board HUD element.
public class UIScoreBoard : Sansar.Script.InstanceInterfaceRemarks
Used for competative games.
Members at a glance
| Kind | Members |
|---|---|
| Properties | Id · Score0 · Score1 |
| Methods | Paint · ToString |
Properties
Id
Added in 45.0.4
public int Id { get; }The board’s ID.
Remarks
This ID is only unique to this user’s particular session. It is not globally unique.
Score0
Added in 45.0.4
public string Score0 { get; }The board’s left score
Score1
Added in 45.0.4
public string Score1 { get; }The board’s right score
Methods
Paint
Added in 45.0.4
public void Paint(
string score0,
string score1,
Sansar.Color colorScoreFg0,
Sansar.Color colorScoreFg1,
Sansar.Color colorScoreBg0,
Sansar.Color colorScoreBg1,
Sansar.Color colorFg,
Sansar.Color colorBg
)Paint the score board
| Parameter | Type | Description |
|---|---|---|
score0 | string | Score of the left team. |
score1 | string | Score of the right team. |
colorScoreFg0 | Sansar.Color | The left score’s text color. |
colorScoreFg1 | Sansar.Color | The right score’s text color. |
colorScoreBg0 | Sansar.Color | The left score’s background color. |
colorScoreBg1 | Sansar.Color | The right score’s background color. |
colorFg | Sansar.Color | The board’s foreground color. |
colorBg | Sansar.Color | The board’s background color. |
Added in 45.0.4
public void Paint(
string score0,
string score1,
Sansar.Color colorScoreFg0,
Sansar.Color colorScoreFg1,
Sansar.Color colorScoreBg0,
Sansar.Color colorScoreBg1,
Sansar.Color colorFg,
Sansar.Color colorBg,
Action<Sansar.Script.OperationCompleteEvent> handler
)Paint the score board
| Parameter | Type | Description |
|---|---|---|
score0 | string | Score of the left team. |
score1 | string | Score of the right team. |
colorScoreFg0 | Sansar.Color | The left score’s text color. |
colorScoreFg1 | Sansar.Color | The right score’s text color. |
colorScoreBg0 | Sansar.Color | The left score’s background color. |
colorScoreBg1 | Sansar.Color | The right score’s background color. |
colorFg | Sansar.Color | The board’s foreground color. |
colorBg | Sansar.Color | The board’s background color. |
handler | Action<Sansar.Script.OperationCompleteEvent> | Handler to be called when the event completes. |
ToString
Added in 45.0.4
public override string ToString()A string representation of this object.
Returns: string — A string representation of this object.
Remarks
The format of this string may change between releases.
Generated from the Sansar 47.10.0 client ScriptApi snapshot.