Skip to content

Get Sansar

Script API

UI

Where: Client
More page actions

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

Manages the client UI.

public class UI : Sansar.Script.InstanceInterface

Remarks

The client UI can be used to send messages that appear in a client UI.

Members at a glance

KindMembers
PropertiesHintText · Menu · ModalDialog
MethodsAddProgressBar · AddScoreBoard · CloseDetailView · GetProgressBars · GetScoreBoards · OpenDetailViewForUri · ToString

Properties

HintText

Added in 34.0.0
public string HintText { get; set; }

The hint text being shown to the user.

Value: string — The hint text.

Remarks

Limited to 80 characters.

Added in 47.1.1
public UIMenu Menu { get; }

The scriptable screen menu for this client.

Value: UIMenu — The reusable UIMenu instance.

ModalDialog

public ModalDialog ModalDialog { get; }

The ModalDialog for this UI.

Value: ModalDialog — The ModalDialog for this UI.

Remarks

See ModalDialog.Show for usage details.

Methods

AddProgressBar

Added in 33.0.0
public UIProgressBar AddProgressBar()

Add a UIProgressBar to the ui.

Returns: UIProgressBar — The newly created UIProgressBar.

Remarks

Currently only one progress bar can be added to the screen, if one has already been added, cancel it before adding a new one

AddScoreBoard

Added in 45.0.4
public UIScoreBoard AddScoreBoard()

Add a UIScoreBoard to the ui.

Returns: UIScoreBoard — The newly created UIScoreBoard.

Remarks

Currently only one score board can be added to the screen.

CloseDetailView

Added in 36.7.0
public void CloseDetailView()

Close any open world detail view.

GetProgressBars

Added in 33.0.0
public IEnumerable<UIProgressBar> GetProgressBars()

Gets the progress bars that have been added to the ui.

Returns: IEnumerable<UIProgressBar> — An IEnumarable collection of progress bar objects.

GetScoreBoards

Added in 45.0.4
public IEnumerable<UIScoreBoard> GetScoreBoards()

Gets the score board that have been added to the ui.

Returns: IEnumerable<UIScoreBoard> — An IEnumarable collection of score board objects.

OpenDetailViewForUri

Added in 36.7.0
public void OpenDetailViewForUri(string sansarUri)

Opens a window showing details for a sansar uri, giving the a user an option to travel to that location.

ParameterTypeDescription
sansarUristringThe location to open the detail panel for.

ToString

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.