dbg_same_line

This function tells GameMaker to place the next debug control on the same line as the current one (if both are single column controls).

Single Column Debug Controls

  1. dbg_text
  2. dbg_button

 

Syntax:

dbg_same_line();

 

Returns:

N/A

 

Example:

Create Event

dbg_view("Custom View", true);
dbg_button("Button1", function() {show_debug_message("Clicked Button1");});
dbg_same_line();
dbg_button("Button2", function() {show_debug_message("Clicked Button2");});

The code above first defines a new debug view using dbg_view and sets it to be visible. It then adds two buttons directly to the debug view, meaning they will be added to a new debug section "Default". After that, two button controls are added using dbg_button, which will be placed on the same line because of the dbg_same_line between the two function calls. Both functions show a basic debug message.