So today out of curiosity I wrote the two functions in to one. Nothing so I removed the timer stuff and retried. Bingo!!!! when ever I would touch something with a popup added I would get words on the top of the screen real tiny. Next I made my own text bubble and added it. Bingo again. I didn't like that the function had a set placement and size on screen in the function. So I fixed that as well. Now you add the text sixe and cursor position when you call the function. Also it pops up only when touching the object walk away and it goes away!!!
- Code: Select all
void GrafxT3::Popup(const __FlashStringHelper* text, uint8_t s, int16_t x, int16_t y){
popupText = text;
textsize = (s > 0) ? s : 1;
fillRoundRect(0,0,320,60,4,BLUE);
drawRoundRect(0,0,320,60,4,WHITE);
if (x < 0) x = 0;
else if (x >= _width) x = _width - 1;
cursor_x = x;
if (y < 0) y = 0;
else if (y >= _height) y = _height - 1;
cursor_y = y;
print(popupText);
}