I'm trying to display a keypad and use it to draw information from touch input. I'm using a touch screen lcd from here http://imall.iteadstudio.com/im120417021.html attached to a Mega2560 arduino board. The code I'm using is here:
void drawButtons()
{
myGLCD.setFont(UbuntuBold);
myGLCD.fillScr(255, 255, 255);
myGLCD.setBackColor(255, 255, 255);
for(v = 0; v < 3; v++)
{
myGLCD.setColor(0, 0, 0);
myGLCD.fillRoundRect(5, 180-(v*45), 75, 220-(v*45));
myGLCD.fillRoundRect(85, 180-(v*45), 155, 220-(v*45));
myGLCD.fillRoundRect(165, 180-(v*45), 235, 220-(v*45));
myGLCD.setBackColor(0, 0, 0);
myGLCD.setColor(255, 255, 255);
//myGLCD.printNumI(((v*3)+1), 80, 212-(v*60));
//myGLCD.printNumI(((v*3)+2), 140, 212-(v*60));
//myGLCD.printNumI(((v*3)+3), 200, 212-(v*60));
}
myGLCD.setColor(0, 0, 0);
myGLCD.print("Clear", 60, 268);
myGLCD.fillRoundRect(85, 225, 155, 265);
myGLCD.drawRoundRect(5, 225, 75, 265);
myGLCD.drawRoundRect(165, 225, 235, 265);
myGLCD.drawRoundRect(5, 275, 235, 315);
myGLCD.setColor(255, 255, 255);
myGLCD.printNumI(0, 109, 232);
myGLCD.drawBitmap(25, 230, 29, 32, backButton);
myGLCD.drawBitmap(189, 230, 29, 32, enterButton);
}
It produces a keypad (minus the numbers, since I still have to place them) with a forward button, a back button, and a Clear button, but the Clear button is only displaying a black rectangle where the text should be. I'm not sure what is causing this, but I've tried moving the buttons up higher to make space, moving the text around so it isn't off the screen, and removing the rectangle around the Clear button to see if it is interfering, but, no matter what I do, it's always just a black square.