void drawHeader() {
tft.fillScreen(TFT_WHITE);
tft.setTextSize(2);
tft.setTextColor(TFT_BLACK,TFT_WHITE);
tft.setTextDatum(MC_DATUM);
tft.drawString(String(hostname),0,0);
if (wifi_connected){
// draw a green wifi logo
} else {
// draw a grey wifi logo
}
}
This code does what i want it to do as long as i call it in the setup. When i try to call it after the idleEnd event the titlebar gets drawn but i think due to nav.poll() the screen gets filled with the bgColor right after.
result idle(menuOut& o,idleEvent e) {
if (e==idling) {
// Idle stuff
}
if(e==idleEnd){
drawHeader();
}
return proceed;
}
if i call nav.refresh() manually only the panel gets refreshed
Is there a way to "attach" a function to nav.poll() to laverage the menuEvents?
Thanks in advance
also thank you for arduinoMenu in general
I've been trying to implement a header/titlebar above the
panel
for the menuthis gets me an epmty space aobve the menu.
This code does what i want it to do as long as i call it in the setup. When i try to call it after the
idleEnd
event the titlebar gets drawn but i think due tonav.poll()
the screen gets filled with the bgColor right after.if i call
nav.refresh()
manually only thepanel
gets refreshed Is there a way to "attach" a function tonav.poll()
to laverage themenuEvents
?Thanks in advance also thank you for arduinoMenu in general
ps: using tft_eSPI