Skip to content

Get Sansar

Script API

UIScoreBoard

Where: Client
More page actions

For the complete documentation index, see llms.txt. This page is also available as Markdown.

Class Namespace Sansar.Simulation Inherits Sansar.Script.InstanceInterface Added in 45.0.4

Manages a score board HUD element.

public class UIScoreBoard : Sansar.Script.InstanceInterface

Remarks

Used for competative games.

Members at a glance

KindMembers
PropertiesId · Score0 · Score1
MethodsPaint · 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

ParameterTypeDescription
score0stringScore of the left team.
score1stringScore of the right team.
colorScoreFg0Sansar.ColorThe left score’s text color.
colorScoreFg1Sansar.ColorThe right score’s text color.
colorScoreBg0Sansar.ColorThe left score’s background color.
colorScoreBg1Sansar.ColorThe right score’s background color.
colorFgSansar.ColorThe board’s foreground color.
colorBgSansar.ColorThe 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

ParameterTypeDescription
score0stringScore of the left team.
score1stringScore of the right team.
colorScoreFg0Sansar.ColorThe left score’s text color.
colorScoreFg1Sansar.ColorThe right score’s text color.
colorScoreBg0Sansar.ColorThe left score’s background color.
colorScoreBg1Sansar.ColorThe right score’s background color.
colorFgSansar.ColorThe board’s foreground color.
colorBgSansar.ColorThe board’s background color.
handlerAction<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.