dbg_checkbox

This function creates a checkbox control within the current debug section.

The checkbox takes the value of a Boolean variable. Clicking it toggles the variable.

The current debug section is the one last created using dbg_section.

NOTE This debug control spans two columns.

 

Syntax:

dbg_checkbox(ref[, label]);

ArgumentTypeDescription
refReferenceA reference to a Boolean variable created using ref_create
labelStringOPTIONAL A label to display next to the checkbox

 

Returns:

N/A

 

Example:

Create Event

toggle = false;

var _ref_to_toggle = ref_create(self, "toggle");
dbg_checkbox(_ref_to_toggle, "The Toggle Switch");

The code above sets a boolean variable toggle in the Create event. It creates a reference to the variable using ref_create, stores it in a local variable _ref_to_toggle and passes that to dbg_checkbox. Since no calls were made to dbg_view or dbg_section, a new view "Default" and a new section "Default" are created that the checkbox control is added to. The checkbox will show a text label "The Toggle Switch" next to it.