dbg_slider

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

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

NOTE This debug control spans two columns.

 

Syntax:

dbg_slider(ref[, minimum, maximum, label]);

ArgumentTypeDescription
refReferenceA 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 = 7;
dbg_slider(ref_create(self, "my_var"), 0, 10);

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, a slider control is created using dbg_slider. It receives a reference to the variable, returned by ref_create, and values of 0 and 10 for the minimum and maximum parameters. Dragging the slider changes the value of the instance's my_var variable.