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 Desktop targets, but is deprecated on all other targets.


get_string(str, def);

参数 描述
str The string to show in the pop-up message.
def The default string in the text box.




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.