(Formerly known as global function InputBox, which is now obsolete)
static String Game.InputBox(string prompt)
Pops up a window asking the user to type in a string, with PROMPT as the
text in the window. Whatever they type in will be returned from this function.
This command displays a very basic input box, mainly useful for debugging
purposes. Due to the size of the window, only small strings up to about 20
characters can be typed in.
The recommended way to obtain user input is to create your own GUI with a text
box on it, which allows you full customization of the look of the window.
TIP: If you add a '!' character to the start of the prompt, then a Cancel button will be
available in the input box. If the player presses this Cancel button (or the ESC key),
a blank string is returned.
Example:
String name = Game.InputBox("!What is your name?");
will prompt the user for his name and store it in the string NAME. If the user presses Cancel,
the NAME string will be blank.
See Also: String.AsInt
|