+ // Build overlay UI
+ UILayer[] layers = new UILayer[] {
+ // Camera layer
+ new UICameraLayer(lx.ui)
+ .setCenter(model.cx, model.cy, model.cz)
+ .setRadius(290).addComponent(new UICubesLayer()),
+
+ // Left controls
+ uiPatternA = new UIPatternDeck(lx.ui, lx.engine.getDeck(LEFT_DECK), "PATTERN A", 4, 4, 140, 324),
+ new UIBlendMode(4, 332, 140, 86),
+ new UIEffects(4, 422, 140, 144),
+ new UITempo(4, 570, 140, 50),
+ uiSpeed = new UISpeed(4, 624, 140, 50),
+
+ // Right controls
+ new UIPatternDeck(lx.ui, lx.engine.getDeck(RIGHT_DECK), "PATTERN B", width-144, 4, 140, 324),
+ uiMidi = new UIMidi(midiEngine, width-144, 332, 140, 158),
+ new UIOutput(grizzlies, width-144, 494, 140, 106),
+
+ // Crossfader
+ uiCrossfader = new UICrossfader(width/2-90, height-90, 180, 86),
+
+ // Overlays
+ uiDebugText = new UIDebugText(148, height-138, width-304, 44),
+ uiMapping = new UIMapping(mappingTool, 4, 4, 140, 324)
+ };
+ uiMapping.setVisible(false);
+ for (UILayer layer : layers) {
+ lx.ui.addLayer(layer);
+ }
+ logTime("Built UI");
+
+ // Load logo image
+ logo = loadImage("data/logo.png");
+ logTime("Loaded logo image");
+