void LCDPutStr2(const unsigned char *pString, int x, char orientation, int Size, int fColor, int bColor) {
unsigned char oldY, width;
unsigned char y, mylen;
mylen = strlen((const char*)pString);
if(Size == 0)
width = 6;
else
width = 8;
switch(orientation){
case LEFT:
y = 0;
break;
case RIGHT:
y = 131 - (mylen*width);
break;
case CENTER:
y = ((131 - (mylen*width)) / 2);
break;
}
oldY = y;
while (*pString) { // loop until 0 is found
LCDPutChar(*pString++, x, y, Size, fColor, bColor); // draw the character
y += width; // Depending on Font width add to y(left)
if(y > 131 - width){ // If y > 131 max res then goto new line and resume
y = oldY; // Reset y from the start.
x+=9; // Add 9 pixels to hight
}
}
}