wiki.sine.space | sinespace

Difference between revisions of "Scripting/SUI"

From wiki.sine.space
Jump to: navigation, search
(Added and defined + simple examples to 15 properties in SUI)
 
(Added, defined, and gave simple examples for all members (6) of SUI)
Line 1: Line 1:
 
=Members=
 
=Members=
{{ScriptFunction|SRigidbody|AddRigidbody|()|xxxxxxxxxxx|5=<pre></pre>}}
+
{{ScriptFunction|void|OpenAppearanceEditor|()|Opens the Appearance Editor (Outfit)|5=<pre>Space.UI.OpenAppearanceEditor()</pre>}}
 +
 
 +
{{ScriptFunction|void|AddNotification|(string title, string text)|Shows a notification|5=<pre> Space.UI.AddNotification('Warning','This is a notification')</pre>}}
 +
 
 +
{{ScriptFunction|void|AddGlobalActionButton|(string button, string tooltip, closure action)|Adds a "Global Action Button" which is a custom button you add to the UI that calls an action of your choice then clears after being clicked|5=<pre>gbClick = function()
 +
  Space.Log("global action button pressed")
 +
  end
 +
  Space.UI.AddGlobalActionButton("The Button","The Tooltip", gbClick)</pre>}}
 +
 
 +
{{ScriptFunction|void|ClearGlobalActionButton|(string button)|Clears a previously added Global Action Button 'button'|5=<pre> Space.UI.ClearGlobalActionButton("The Button")</pre>}}
 +
 
 +
{{ScriptFunction|void|ShowLocation|(string reason, SVector location)|Shows given location|5=<pre> Space.UI.ShowLocation("the reason", Vector.New(5,1,0))</pre>}}
 +
 
 +
{{ScriptFunction|void|ShowPathToLocation|(string reason, SVector location)|Shows a path to given location|5=<pre> Space.UI.ShowPathToLocation("the reason", Vector.New(5,1,0))</pre>}}
 +
 
  
  

Revision as of 11:41, 25 December 2020

Members

OpenAppearanceEditor

void OpenAppearanceEditor ()

Opens the Appearance Editor (Outfit)

Space.UI.OpenAppearanceEditor()


AddNotification

void AddNotification (string title, string text)

Shows a notification

 Space.UI.AddNotification('Warning','This is a notification')


AddGlobalActionButton

void AddGlobalActionButton (string button, string tooltip, closure action)

Adds a "Global Action Button" which is a custom button you add to the UI that calls an action of your choice then clears after being clicked

gbClick = function()
  Space.Log("global action button pressed")
  end
  Space.UI.AddGlobalActionButton("The Button","The Tooltip", gbClick)


ClearGlobalActionButton

void ClearGlobalActionButton (string button)

Clears a previously added Global Action Button 'button'

 Space.UI.ClearGlobalActionButton("The Button")


ShowLocation

void ShowLocation (string reason, SVector location)

Shows given location

 Space.UI.ShowLocation("the reason", Vector.New(5,1,0))


ShowPathToLocation

void ShowPathToLocation (string reason, SVector location)

Shows a path to given location

 Space.UI.ShowPathToLocation("the reason", Vector.New(5,1,0))




Properties

ShowAuctionButton

bool ShowAuctionButton { get; set; }

Show the Auction button

Space.UI.ShowAuctionButton = false


ShowChat

bool ShowChat { get; set; }

Show the Chat

Space.UI.ShowChat = false


ShowCurrencyButton

bool ShowCurrencyButton { get; set; }

Show the Currency button

Space.UI.ShowCurrencyButton = false


ShowExploreButton

bool ShowExploreButton { get; set; }

Show the Explore button

Space.UI.ShowExploreButton = false


ShowFriendsButton

bool ShowFriendsButton { get; set; }

Show the Friends button

Space.UI.ShowFriendsButton = false


ShowHelpButton

bool ShowHelpButton { get; set; }

Show the Help button

Space.UI.ShowHelpButton = false


ShowHomeButton

bool ShowHomeButton { get; set; }

Show the Home button

Space.UI.ShowHomeButton = false


ShowHotBar

bool ShowHotBar { get; set; }

Show the Hot Bar

Space.UI.ShowHotBar = false


ShowInventoryButton

bool ShowInventoryButton { get; set; }

Show the Inventory button

Space.UI.ShowInventoryButton = false


ShowMiniMap

bool ShowMiniMap { get; set; }

Set to true to show the Minimap

Space.UI.ShowMiniMap = false


ShowOutfitButton

bool ShowOutfitButton { get; set; }

Set to true to show the Outfit button

Space.UI.ShowOutfitButton = false


ShowQuestsButton

bool ShowQuestsButton { get; set; }

Show the Quests button

Space.UI.ShowQuestsButton = false


ShowShopButton

bool ShowShopButton { get; set; }

Show the Shop button

Space.UI.ShowShopButton = false


ShowSnapshotButton

bool ShowSnapshotButton { get; set; }

Show the Snapshot button

Space.UI.ShowSnapshotButton = false


ShowUI

bool ShowUI { get; set; }

Show the User Interface

Space.UI.ShowUI = false