Difference between revisions of "MessageBox"
imported>Mnkyslut |
imported>DragoonWraith (revert - edit made was incorrect) |
||
Line 5: | Line 5: | ||
'''Example:''' | '''Example:''' | ||
MessageBox "This is a Message" | MessageBox "This is a Message" | ||
MessageBox "Shall I start to spin? | MessageBox "Shall I start to spin? GameHour = %.2f", GameHour, "OK", "No Way" | ||
MessageBox "How much gold do you have?" "0" "100" "500" "1000" "5000" "10000" | MessageBox "How much gold do you have?" "0" "100" "500" "1000" "5000" "10000" | ||
Line 15: | Line 15: | ||
This function sends the value -1 to the GetButtonPressed function while the window is still open, until the player selects a button. | This function sends the value -1 to the GetButtonPressed function while the window is still open, until the player selects a button. | ||
== Displaying Variables == | == Displaying Variables == |
Revision as of 19:19, 9 September 2006
Description
Syntax:
MessageBox "Message", [var1], ..., [var9], ["button01"], ..., ["button10"] MessageBox "Message" [var1] ... [var9] ["button01"] ... ["button10"]
Example:
MessageBox "This is a Message" MessageBox "Shall I start to spin? GameHour = %.2f", GameHour, "OK", "No Way" MessageBox "How much gold do you have?" "0" "100" "500" "1000" "5000" "10000"
Displays a message on the screen, which can be formatted, as well as user-definable buttons that the player can choose. The message box stops time and displays itself in the center of the screen until the player chooses an option. This option can be captured in a script by using the GetButtonPressed function.
Up to 10 buttons may be specified. If no button is specified, a default button of "Done" will be displayed on the message box.
Up to 9 variable names can also be passed into the message box. These are displayed in the order they are used as parameters. The message must specify how the variable is to be displayed.
This function sends the value -1 to the GetButtonPressed function while the window is still open, until the player selects a button.
Displaying Variables
Examples
MessageBox "Var1:% 5.2f / Var2:% 5.2f" Var1 Var2
"Var1: 123.45 / Var2: -123.45"
MessageBox "Var1:%05.2f / Var2:%05.2f" Var1 Var2
"Var1: 00123.45 / Var2:-00123.45"
MessageBox "Var1:%+-5.0f / Var2:%+-5.0f" Var1 Var2
"Var1:+123 / Var2:-123 "
MessageBox "Var1:% .3e / Var2:% .3e" Var1 Var2
"Var1: 1.234E+2 / Var2:-1.234E+2"