From: Mark Slee Date: Fri, 20 Sep 2013 06:19:40 +0000 (-0700) Subject: Draw a cute logo on front of the box, gotta have a logo in the UI! X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=4c640acce9b9ddcd0531074840700d18a2a9aaa1;p=SugarCubes.git Draw a cute logo on front of the box, gotta have a logo in the UI! --- diff --git a/_Internals.pde b/_Internals.pde index 3710e0e..f872d9b 100644 --- a/_Internals.pde +++ b/_Internals.pde @@ -57,6 +57,7 @@ boolean debugMode = false; DebugUI debugUI; boolean uiOn = true; LXPattern restoreToPattern = null; +PImage logo; // Handles to UI objects UIContext[] overlays; @@ -153,7 +154,10 @@ void setup() { }; uiMapping.setVisible(false); logTime("Built overlay UI"); - + + // Load logo image + logo = loadImage("data/logo.png"); + // Setup camera midX = TRAILER_WIDTH/2.; midY = glucose.model.yMax/2; @@ -402,6 +406,14 @@ void draw() { vertex(TRAILER_WIDTH, 0, TRAILER_DEPTH); vertex(0, 0, TRAILER_DEPTH); endShape(); + + // Draw the logo on the front of platform + pushMatrix(); + translate(0, 0, -1); + float s = .07; + scale(s, -s, s); + image(logo, TRAILER_WIDTH/2/s-logo.width/2, TRAILER_HEIGHT/2/s-logo.height/2-2/s); + popMatrix(); noStroke(); // drawBassBox(glucose.model.bassBox); @@ -581,6 +593,7 @@ void drawUI() { } } + /** * Top-level keyboard event handling */ @@ -596,7 +609,7 @@ void keyPressed() { case '=': case '+': frameRate(++targetFramerate); - break; + break; case 'd': if (!midiQwertyAPC.isEnabled() && !midiQwertyKeys.isEnabled()) { debugMode = !debugMode; diff --git a/data/logo.png b/data/logo.png new file mode 100644 index 0000000..abc2c93 Binary files /dev/null and b/data/logo.png differ