UI.Input prompt:Str, [title:Str, max:Int, flags:Any, def:Str]
Text input.
Displays a standard text input dialog. All but the first parameter are optional, and have the following meaning:
- prompt: the prompt to show in the dialog.
- title: the window title. Defaults to the value of prompt.
- length: maximum number of characters to accept, defaults to 255.
- flags: some additional flags that affect the behaviour of this dialog (see below).
- def: initial contents of text input field.
The flags parameter is a string that can contain the following:
- "n": only accept numeric input (digits).
- "h": do not accept high-ASCII characters (umlauts, accents, etc.).
- "p": password input: display stars instead of actual input.
- "f": draw a frame around the input line.
- "g": only accept characters from game character set.
- "m": the width (next item) is specified in ems (default: pixels).
- a number: width of input line.
or example, "h450" gives an input line which is 450 pixels wide and does not accept high-ASCII input, 30m" displays an input line which is 30 ems wide. f you only want to set the width, you can also pass an integer instead of a string.
he result is returned in UI.Result: f the user hits Enter, UI.Result contains the input. f the user hits ESC, UI.Result will be EMPTY.
xample: this is the "rename ship" function N on the ship screen: UI.Input "Enter new name:", "Rename Starship #" & Id, 20, 320, Name SetName UI.Result SetName will not do anything when passed an EMPTY parameter).
n text mode, this command makes a simple input line using the prompt only. since PCC 1.0.9, PCC2 1.99.9
See also: Global Commands