toggle method

void toggle(
  1. DebugMode mode
)

Draws mode, or clears the overlay if it was already the one drawing.

Implementation

void toggle(DebugMode mode) {
  this.mode = this.mode == mode ? null : mode;
}