class StateGraphicsDB { // For seeing the sprites better int emoSize = 60; PImage zoomIn = null; PImage zoomOut = null; // Empty face to re-randomize display PImage pressR = null; // States PImage[] stateImages = new PImage[56]; void drawState(int stateID, int x, int y) { if (stateID >= 0 && stateID < stateImages.length){ if (stateImages[stateID] == null) stateImages[stateID] = requestImage(stateID + ".png"); image(stateImages[stateID], x, y, emoSize, emoSize); } else { //println("No emotion branch found to draw"); //text("Press r to find a new emotion", x, y); PFont font; // The font must be located in the sketch's // "data" directory to load successfully font = loadFont("Gisha-Bold-32.vlw"); textFont(font); fill(0, 0, 0); if (pressR == null) pressR = requestImage("PressR.png"); text("To Reset", x-30, y+40+emoSize); image(pressR, x, y, emoSize, emoSize); } } void drawZoom() { PFont font; // The font must be located in the sketch's // "data" directory to load successfully font = loadFont("Gisha-Bold-32.vlw"); if (zoomIn == null) zoomIn = requestImage("ZoomIn.png"); if (zoomOut == null) zoomOut = requestImage("ZoomOut.png"); textFont(font); fill(0, 0, 0); text("To Zoom...", 10, 40); image(zoomOut, 20, 50); image(zoomIn, 40, 50); } }