DarkBASIC Professional Help File

DX11 BEGIN STRING CAPTURE

This function will begin to capture keyboard input as a string and can be used to obtain textual input from the user.
Note that the other keyboard input functions like DX11 IS KEY DOWN, etc. will still work as normal when a string is being captured, so you
may want to manually disregard for example movement controls while a player is writing his name etc.
An initial input string (that the user can then change by adding to / deleting from it) can optionally be provided.
If this function is called while a previous string capture is going on, the input will be reset and the string input thus far will be lost
(you can of course retrieve it using DX11 GET CAPTURED STRING before then and store it yourself though).
The string input supports standard input characters, deletions through the backspace or delete keys, linebreaks (which are represented using single \n
characters (chr$(10))) and caret movement using the arrow-, home and end keys. Special keys like shift and caps lock are also handled.

Syntax

    DX11 BEGIN STRING CAPTURE [initialString]

Parameters

    [Optional] initialString

> String
> The input string will initially be set to this if provided. Defaults to an empty string if omitted.

Returns

This function does not return a value.

See also

INPUT Functions Menu
DX11 Function Categories