Hi I'm trying to display a simple dialog but I get compile errors on ESP32-S2
I'm following this: https://www.thecoderscorner.com/products/arduino-libraries/tc-menu/rendering-with-tcmenu-lcd-tft-oled/
BaseDialog* dlg = renderer.getDialog();
dlg->setButtons(BTNTYPE_OK, BTNTYPE_CANCEL, 1);
dlg->show("hello", false, onDialogFinished);
gives:
error: invalid use of incomplete type 'class BaseDialog'
dlg->setButtons(BTNTYPE_OK, BTNTYPE_CANCEL, 1);
Has something changed in the last version of tcMenu? What is the correct way to display (and hide!) an alert in version 2.4.0?
Thanks!
also tried this from the latest esp32 s2 example:
auto dlg = renderer.getDialog();
if (!dlg->isInUse()) {
dlg->setButtons(BTNTYPE_NONE, BTNTYPE_CLOSE);
dlg->showRam("Saved", false);
dlg->copyIntoBuffer("to flash");
}
which gives
error: invalid use of incomplete type 'class BaseDialog'
if(!dlg->isInUse()) {
....
note: forward declaration of 'class BaseDialog'
class BaseDialog;
so any idea on how to show a dialog would be great!