- Found in:
- MessageBox
stringfunctionShow(stringbodyText, stringbutton1, stringbutton2="", stringbutton3="", stringbutton4="", stringbutton5="", stringbutton6="", stringbutton7="", stringbutton8="", stringbutton9="", stringbutton10="", boolgetIndex=false, floatwaitInterval=0.1, floattimeoutSeconds=0.0)Global
Description
Documentation Comment
Open a messagebox and return the name of the selected button.
Get name of selected button
string selectedButtonName = SkyMessage.Show("body text of message", "Ok", "Cancel", "More buttons...")
Get index of selected button
If you would prefer to get the int index of the button:
string selectedButtonIndex = SkyMessage.Show("body text of message", "Ok", "Cancel", "More buttons...", getIndex = true)
Button names
Show() accepts up to 10 button names. If you would prefer to specify the button names via an array, see: SkyMessage.ShowArray()
Advanced
You can also specify a timeout. This is the number of seconds after which the function will return with the text "TIMED_OUT":
string selectedButtonName = SkyMessage.Show("body text of message", "Ok", "Cancel", "More buttons...", timeoutSeconds = 69.0)
Parameters
stringbodyText
stringbutton1
stringbutton2=""
stringbutton3=""
stringbutton4=""
stringbutton5=""
stringbutton6=""
stringbutton7=""
stringbutton8=""
stringbutton9=""
stringbutton10=""
boolgetIndex=false
floatwaitInterval=0.1
floattimeoutSeconds=0.0
Examples
Auto-Generated Example
string myString__bodyText
string myString__button1
string myString__button2
string myString__button3
string myString__button4
string myString__button5
string myString__button6
string myString__button7
string myString__button8
string myString__button9
string myString__button10
bool myBool__getIndex
float myFloat__waitInterval
float myFloat__timeoutSeconds
string returnedValue = SkyMessage.Show(myString__bodyText, myString__button1, myString__button2, myString__button3, myString__button4, myString__button5, myString__button6, myString__button7, myString__button8, myString__button9, myString__button10, myBool__getIndex, myFloat__waitInterval, myFloat__timeoutSeconds)