Skip to content

Versao 2.0.00

Latest

Choose a tag to compare

@ppsilv ppsilv released this 14 Oct 17:30
· 3 commits to master since this release

Esta tag promove a correção do grande bug do scroll.
A correção foi feita nas funções:
void print(const char ch)
{
if (!font)
return;

	if(ch == '\n')
	{
		cursorX = 0;//cursorBaseX;
		cursorY += cursorYIncrement;
	}
	else if (font->valid(ch)){
		drawChar(cursorX, cursorY, ch);
		cursorX += cursorXIncrement;
	}
	else{
		drawChar(cursorX, cursorY, ' ');
	}

	if ( (cursorX + cursorXIncrement) > xres )
	{
		cursorY += cursorYIncrement;
		cursorX = cursorBaseX;
		if( cursorY > yres ){
			cursorY = yres-cursorYIncrement;
		}
	}
	if ( (cursorY + cursorYIncrement) > yres  )
	{
		if(autoScroll && ( (cursorY + cursorYIncrement) > yres) ){
			//onScroll = true;
			//Serial.print("\nCursorY ");Serial.print(cursorY);
			//Serial.print(" yres ");Serial.print(yres);
			//Serial.print(" cursorYIncrement ");Serial.print(cursorYIncrement);
			scroll((cursorY - yres)+cursorYIncrement, backColor);
		}
	}
}

void print(const char *str)
{
	if (!font)
		return;
	while (*str)
	{
		print(*str);
		str++;
	}
}