get_integer


描述

This creates a pop-up window showing a custom message, with a button labelled "Ok", and prompts the user to input an integer value. The function will return the typed in integer, 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_integer(str, def);

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


Returns:

实数


例如:

global.level = get_integer("Level to test?", 1);

The above code will display a message prompting the user to select a level for testing. The return value will be stored in the global variable "global.level".