wiki.sine.space | sinespace

Scripting/SUI

From wiki.sine.space
Revision as of 16:57, 14 August 2021 by Voidtech (Talk | contribs)

Jump to: navigation, search

Contents

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))


OpenQuestsWindow

void OpenQuestsWindow ()

Opens the Quests window

Space.UI.OpenQuestsWindow()


HideQuestsWindow

void HideQuestsWindow ()

Hides the Quests window

Space.UI.HideQuestsWindow()


OpenSettingsWindow

void OpenSettingsWindow ()

Opens the Settings window

Space.UI.OpenSettingsWindow()


HideSettingsWindow

void HideSettingsWindow ()

Hides the Settings window

Space.UI.HideSettingsWindow()


OpenFriendsWindow

void OpenFriendsWindow ()

Opens the Friends window

Space.UI.OpenFriendsWindow()


HideFriendsWindow

void HideFriendsWindow ()

Hides the Friends window

Space.UI.HideFriendsWindow()


OpenExploreWindow

void OpenExploreWindow ()

Opens the Explore window

Space.UI.OpenExploreWindow()


HideExploreWindow

void HideExploreWindow ()

Hides the Explore window

Space.UI.HideExploreWindow()


OpenEventsWindow

void OpenEventsWindow ()

Opens the Events window

Space.UI.OpenEventsWindow()


HideEventsWindow

void HideEventsWindow ()

Hides the Events window

Space.UI.HideEventsWindow()


OpenHomeWindow

void OpenHomeWindow ()

Opens the Home window

Space.UI.OpenHomeWindow()


HideHomeWindow

void HideHomeWindow ()

Hides the Home window

Space.UI.HideHomeWindow()


OpenInventoryWindow

void OpenInventoryWindow ()

Opens the Inventory window

Space.UI.OpenInventoryWindow()


HideInventoryWindow

void HideInventoryWindow ()

Hides the Inventory window

Space.UI.HideInventoryWindow()


OpenOutfitWindow

void OpenOutfitWindow ()

Opens the Outfit window

Space.UI.OpenOutfitWindow()


HideOutfitWindow

void HideOutfitWindow ()

Hides the Outfit window

Space.UI.HideOutfitWindow()


OpenShopWindow

void OpenShopWindow ()

Opens the Shop window

Space.UI.OpenShopWindow()


HideShopWindow

void HideShopWindow ()

Hides the Shop window

Space.UI.HideShopWindow()


OpenSnapshotWindow

void OpenSnapshotWindow ()

Opens the Snapshot window

Space.UI.OpenSnapshotWindow()


HideSnapshotWindow

void HideSnapshotWindow ()

Hides the Snapshot window

Space.UI.HideSnapshotWindow()


OpenHelpWindow

void OpenHelpWindow ()

Opens the Help window

Space.UI.OpenHelpWindow()


HideHelpWindow

void HideHelpWindow ()

Hides the Help window

Space.UI.HideHelpWindow()


OpenProfileWin

void OpenProfileWin ()

Opens the Profile window

Space.UI.OpenProfileWin()


HideProfileWin

void HideProfileWin ()

Hides the Profile window

Space.UI.HideProfileWin()


OpenUpgradeAccountWindow

void OpenUpgradeAccountWindow ()

Opens the Upgrade Account window

Space.UI.OpenUpgradeAccountWindow()


HideUpgradeAccountWindow

void HideUpgradeAccountWindow ()

Hides the Upgrade Account window

Space.UI.HideUpgradeAccountWindow()


OpenRegionInfoWindow

void OpenRegionInfoWindow ()

Opens the Region Info window

Space.UI.OpenRegionInfoWindow()


HideRegionInfoWindow

void HideRegionInfoWindow ()

Hides the Region Info window

Space.UI.HideRegionInfoWindow()


OpenExitWindow

void OpenExitWindow ()

Opens the Exit window

Space.UI.OpenExitWindow()


HideExitWindow

void HideExitWindow ()

Hides the Exit window

Space.UI.HideExitWindow()


OpenMailWindow

void OpenMailWindow ()

Opens the Mail window

Space.UI.OpenMailWindow()


HideMailWindow

void HideMailWindow ()

Hides the Mail window

Space.UI.HideMailWindow()


OpenBuyGoldWindow

void OpenBuyGoldWindow ()

Opens the Buy Gold window

Space.UI.OpenBuyGoldWindow()


HideBuyGoldWindow

void HideBuyGoldWindow ()

Hides the Buy Gold window

Space.UI.HideBuyGoldWindow()


OpenChatWindow

void OpenChatWindow ()

Opens the Chat window

Space.UI.OpenChatWindow()


HideChatWindow

void HideChatWindow ()

Hides the Chat window

Space.UI.HideChatWindow()


OpenRoomEditorWindow

void OpenRoomEditorWindow ()

Opens the Room Editor window

Space.UI.OpenRoomEditorWindow()


HideRoomEditorWindow

void HideRoomEditorWindow ()

Hides the Room Editor window

Space.UI.HideRoomEditorWindow()


OpenDevicePicker

void OpenDevicePicker ()

Opens the Device Picker

Space.UI.OpenDevicePicker()


Raycast

SUIRaycastResult Raycast ()

Shoots a UI Raycast and returns the result as SUIRayCastResult

RayCastResult= Space.UI.Raycast()



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



ShowWorldUI

bool ShowWorldUI { get; set; }

Show the World User Interface

Space.UI.ShowUI = false


MusicVolume

int MusicVolume { get; set; }

Set/Get the Music volume

MusicVolume= Space.UI.MusicVolume


--This script will make moving a slider control the Music Volume
--and also update a text field with the current Music Volume
--(example: custom UI)
--[You need to add the slider and text field as a reference]

slider = Space.Host.GetReference("Slider").UISlider
textField = Space.Host.GetReference("Text Field").UIText


OnValueChanged = function()
Space.UI.MusicVolume = slider.NormalizedValue * 100
textField.Text = Space.UI.MusicVolume
end

slider.OnValueChanged(OnValueChanged)

MasterVolume

int MasterVolume { get; set; }

Set/Get the Master volume

MasterVolume= Space.UI.MasterVolume


--This script will make moving a slider control the Master Volume
--and also update a text field with the current Master Volume
--(example: custom UI)
--[You need to add the slider and text field as a reference]

slider = Space.Host.GetReference("Slider").UISlider
textField = Space.Host.GetReference("Text Field").UIText


OnValueChanged = function()
Space.UI.MasterVolume = slider.NormalizedValue * 100
textField.Text = Space.UI.MasterVolume
end

slider.OnValueChanged(OnValueChanged)

SFXVolume

int SFXVolume { get; set; }

Set/Get the SFX volume

SFXVolume= Space.UI.SFXVolume


--This script will make moving a slider control the SFX Volume
--and also update a text field with the current SFX Volume
--(example: custom UI)
--[You need to add the slider and text field as a reference]

slider = Space.Host.GetReference("Slider").UISlider
textField = Space.Host.GetReference("Text Field").UIText


OnValueChanged = function()
Space.UI.SFXVolume = slider.NormalizedValue * 100
textField.Text = Space.UI.SFXVolume
end

slider.OnValueChanged(OnValueChanged)

UIVolume

int UIVolume { get; set; }

Set/Get the UI volume

UIVolume= Space.UI.UIVolume


--This script will make moving a slider control the UI Volume
--and also update a text field with the current UI Volume
--(example: custom UI)
--[You need to add the slider and text field as a reference]

slider = Space.Host.GetReference("Slider").UISlider
textField = Space.Host.GetReference("Text Field").UIText


OnValueChanged = function()
Space.UI.UIVolume = slider.NormalizedValue * 100
textField.Text = Space.UI.UIVolume
end

slider.OnValueChanged(OnValueChanged)

VOIPVolume

int VOIPVolume { get; set; }

Set/Get the VOIP volume

VOIPVolume = Space.UI.VOIPVolume


 --This script will make moving a slider control the Voice Volume
--and also update a text field with the current Voice Volume
--(example: custom UI)
--[You need to add the slider and text field as a reference]

slider = Space.Host.GetReference("Slider").UISlider
textField = Space.Host.GetReference("Text Field").UIText


OnValueChanged = function()
Space.UI.VOIPVolume = slider.NormalizedValue * 100
textField.Text = Space.UI.VOIPVolume
end

slider.OnValueChanged(OnValueChanged) 

ShowEventsButton

bool ShowEventsButton { get; set; }

Show the Events button

Space.UI.ShowEventsButton= false


ShowGoldAndBuyButton

bool ShowGoldAndBuyButton { get; set; }

Show the Gold and Buy button

Space.UI.ShowGoldAndBuyButton= false


ShowClock

bool ShowClock { get; set; }

Show the clock

Space.UI.ShowClock= false


ShowActivityPanel

bool ShowActivityPanel { get; set; }

Show the Activity Panel

Space.UI.ShowActivityPanel= false


ShowProfileImage

bool ShowProfileImage { get; set; }

Show the Profile Image

Space.UI.ShowProfileImage= false


ShowRightButtonGroup

bool ShowRightButtonGroup { get; set; }

Show the Button group on the right

Space.UI.ShowRightButtonGroup= false


ShowRoomInfoOption

bool ShowRoomInfoOption { get; set; }

Show the Room Info Option

Space.UI.ShowRoomInfoOption= false


ShowSearch

bool ShowSearch { get; set; }

Show the Search bar

Space.UI.ShowSearch= false


ShowMailButton

bool ShowMailButton { get; set; }

Show the Mail button

Space.UI.ShowMailButton= false


ShowNotificationButton

bool ShowNotificationButton { get; set; }

Show the Notification button

Space.UI.ShowNotificationButton= false


 --This script will make a UI Toggle show/hide the Notification Button
--(example: tools for user to customize UI)
--[You need to add an object with UI Toggle as a reference (scripting runtime)]

toggle = Space.Host.GetReference("Toggle").UIToggle


OnValueChanged = function()
  if toggle.IsOn then
    Space.UI.ShowNotificationButton= true
  else
    Space.UI.ShowNotificationButton= false
  end
end

toggle.OnValueChanged(OnValueChanged)