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.
dbg_slider(ref[, minimum, maximum, label]);
Argument | Type | Description |
---|---|---|
ref | Reference | A reference to a Real value, created using ref_create |
minimum | Real | OPTIONAL The minimum value that the slider can have |
maximum | Real | OPTIONAL The maximum value that the slider can have |
label | String | OPTIONAL The label to show next to the slider |
N/A
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.