This function creates a colour control within the current debug section.
The control takes the value of a Colour variable and shows the R, G and B component:
You can change the R, G and B value by double-clicking on the value and entering a new value. You can also click the square on the right that shows the colour to bring up a colour picker dialog to select a new colour.
NOTE The value is an RGB colour value, without an alpha component.
NOTE This debug control spans two columns.
dbg_colour(ref[, label]);
Argument | Type | Description |
---|---|---|
ref | Reference | A reference created using ref_create to a Colour variable |
label | String | OPTIONAL A label to show next to the colour control |
N/A
Create Event
my_view = dbg_view($"Settings for {id}", true);
my_section = dbg_section("Colours");
dbg_colour(ref_create(self, "image_blend"), "Blend Colour");
Clean Up Event
dbg_section_delete(my_section);
dbg_view_delete(my_view);
The code above is added to an object's Create event. Every instance of this object that executes the code creates a new debug view using dbg_view, stores it in an instance variable my_view and adds a section named "Colours" to it using dbg_section, stored in a variable my_section. Each of them then adds a colour control using dbg_colour that changes that instance's image_blend colour.
In the Clean Up event, every instance of this object deletes its debug view and section that it created (my_view and my_section respectively).