wiki.sine.space | sinespace

Scripting/SDialogues

From wiki.sine.space
Revision as of 09:27, 19 July 2017 by Kay T Burnett (Talk | contribs) (Added the code example for OpenURL)

Jump to: navigation, search

The SDialogue class allows you to issue dialogue messages to the player to confirm various actions.

Members

YesNoInput

void YesNoInput (string title, string okbutton, string cancelButton, Action<bool> result);

Shows a yes/no dialogue box to the user, and returns the result via the result callback

No example provided yet


TextInput

void TextInput (string title, string okbutton, Action<string> result);

Shows a text input dialogue box to the user, and returns the result via the result callback

No example provided yet


OpenURL

void OpenURL (string url);

Opens a URL in a web browser

hostObject = Space.Host.ExecutingObject;

function openTheWebsite ()

Space.Dialogues.OpenURL ("http://sine.space/");

end

hostObject.SubscribeToEvents();
hostObject.OnMouseDown(openTheWebsite);

-- when the object is clicked, the "sine.space" website is opened


SendLocalChat

void SendLocalChat (string text, string from);

Sends local chat to the client window

No example provided yet