(Added the code example for OpenURL) |
|||
Line 4: | Line 4: | ||
{{ScriptFunction|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}} | {{ScriptFunction|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}} | ||
{{ScriptFunction|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}} | {{ScriptFunction|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}} | ||
− | {{ScriptFunction|void|OpenURL|(string url);|Opens a URL in a web browser}} | + | {{ScriptFunction|void|OpenURL|(string url);|Opens a URL in a web browser|5= |
+ | hostObject = Space.Host.ExecutingObject;<br><br> | ||
+ | function openTheWebsite ()<br> | ||
+ | :Space.Dialogues.OpenURL ("http://sine.space/");<br> | ||
+ | end<br><br> | ||
+ | hostObject.SubscribeToEvents();<br> | ||
+ | hostObject.OnMouseDown(openTheWebsite);<br> | ||
+ | ''-- when the object is clicked, the "sine.space" website is opened''}} | ||
{{ScriptFunction|void|SendLocalChat|(string text, string from);|Sends local chat to the client window}} | {{ScriptFunction|void|SendLocalChat|(string text, string from);|Sends local chat to the client window}} | ||
{{Scripting Navbox}} | {{Scripting Navbox}} |
The SDialogue class allows you to issue dialogue messages to the player to confirm various actions.
Shows a yes/no dialogue box to the user, and returns the result via the result callback
Shows a text input dialogue box to the user, and returns the result via the result callback
Opens a URL in a web browser
function openTheWebsite ()
end
hostObject.SubscribeToEvents();
hostObject.OnMouseDown(openTheWebsite);
Sends local chat to the client window
|