dbg_slider_int

This function creates a slider control for an integer Real value within the current debug section, with a minimum and maximum value.

Moving the slider "truncates" the referenced variable (i.e. sets its fractional part to zero) and changes its integer part in steps of 1.

Pressing CTRL+click on the slider will allow you to enter a number directly.

NOTE This debug control spans two columns.

 

Syntax:

dbg_slider_int(dbgref, [minimum], [maximum], [label]);

ArgumentTypeDescription
dbgrefReferenceA reference to a Real value, created using ref_create
minimumRealOPTIONAL The minimum value that the slider can have
maximumRealOPTIONAL The maximum value that the slider can have
labelStringOPTIONAL The label to show next to the slider

 

Returns:

N/A

 

Example:

Create Event

my_var = 127;
dbg_slider_int(ref_create(my_var), 0, 200, "Variable");

The above code is executed in an object's Create event, or any other event that isn't performed continuously. First, an instance variable my_var is set. Then, an integer slider control is created using dbg_slider_int. The function receives a reference to the variable, returned by ref_create, values of 0 and 200 for the minimum and maximum parameters and a label "Variable". Dragging the slider changes the value of the instance's my_var variable in steps of 1.