get_string

This creates a pop-up window showing a standard message, with a button labelled "Ok", that prompts the user to input a string. The function will return the input string, or the default value if nothing has been entered.

NOTE This function is for debug use only on the Windows target, but is deprecated on all other targets.

 

Syntax:

get_string(str, def);

ArgumentTypeDescription
strStringThe string to show in the pop-up message.
defStringThe default string in the text box.

 

Returns:

String

 

Example:

global.test_name = get_string("Test highscore name:", "Anonymous");

The above code will prompt the user to give a name which will then be stored in the global variable "test_name". If nothing is entered and the user just presses "Ok" then the default value, "Anonymous", will be returned.