void Mixer::render(UTFT tft) { tft.clrScr(); tft.setColor(255, 255, 255); tft.fillRect(0, 0, tft.getDisplayXSize() - 1, 12); tft.setBackColor(255, 255, 255); tft.setColor(0, 0, 0); tft.setFont(SmallFont); tft.print("Mixer", 10, 0); _tft = tft; for(byte x=0;x<3; x++) { renderedGains[x] = 0; renderMute(x); } update(); }
void Keyboard::render(UTFT tft) { tft.clrScr(); tft.setFont(BigFont); tft.setBackColor(255, 255, 255); tft.setColor(255, 255, 255); tft.drawRoundRect(30, 30, tft.getDisplayXSize() - 111, 70); tft.fillRect(tft.getDisplayXSize() - 106, 30, tft.getDisplayXSize() - 66, 70); tft.setColor(0, 0, 0); tft.print("<-", tft.getDisplayXSize() - 102, 43); tft.setColor(255, 255, 255); tft.fillRect(tft.getDisplayXSize() - 61, 30, tft.getDisplayXSize() - 21, 70); tft.setColor(0, 0, 0); tft.print("OK", tft.getDisplayXSize() - 57, 43); byte br = 9, nl = 0, offset = 1; int x = offset, y = 120; for(byte j=0; j<numKeys; j++) { tft.setColor(255, 255, 255); tft.fillRect(x, y, x + 30, y + 30); tft.setColor(0, 0, 0); String str = ""; str += keys[j]; //lame! tft.print(str, x + 7, y + 8); x += 32; nl++; if(nl > br) { offset += 15; x = offset; nl = 0; y += 32; br -= 1; } } _tft = tft; }