boolean pandaBoardsEnabled = false;
boolean debugMode = false;
+DebugUI debugUI;
// Camera variables
float eyeR, eyeA, eyeX, eyeY, eyeZ, midX, midY, midZ;
// Build overlay UI
ui = controlUI = new ControlUI();
mappingUI = new MappingUI(mappingTool);
+ debugUI = new DebugUI(frontChannels, rearChannels);
logTime("Built overlay UI");
// MIDI devices
}
SCMidiDevices.initializeStandardDevices(glucose);
logTime("Setup MIDI devices");
-
+
// Setup camera
midX = glucose.model.xMax/2 + 20;
midY = glucose.model.yMax/2;
// Draws the simulation and the 2D UI overlay
background(40);
color[] colors = glucose.getColors();
+ if (debugMode) {
+ debugUI.maskColors(colors);
+ }
+
camera(
eyeX, eyeY, eyeZ,
midX, midY, midZ,
strokeWeight(1);
drawUI();
+ if (debugMode) {
+ debugUI.draw();
+ }
+
// TODO(mcslee): move into GLucose engine
if (pandaBoardsEnabled) {
pandaFront.send(colors);
case 'd':
debugMode = !debugMode;
println("Debug output: " + (debugMode ? "ON" : "OFF"));
+ break;
case 'm':
mappingMode = !mappingMode;
if (mappingMode) {
if (mouseX > ui.leftPos) {
ui.mousePressed();
} else {
+ if (debugMode) {
+ debugUI.mousePressed();
+ }
mx = mouseX;
my = mouseY;
}