diff --git a/library.properties b/library.properties index 67582b51..2b411ffa 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=ArduinoMenu library -version=4.7.0 +version=4.7.1 author=Rui Azevedo, ruihfazevedo@gmail.com maintainer=neu-rah, ruihfazevedo@gmail.com sentence=Generic menu/interactivity system diff --git a/src/items.cpp b/src/items.cpp index ea4f8050..6ae705a9 100644 --- a/src/items.cpp +++ b/src/items.cpp @@ -185,81 +185,11 @@ Used textField::printTo(navRoot &root,bool sel,menuOut& out, idx_t idx,idx_t len bool menuNode::changed(const navNode &nav,const menuOut& out,bool sub,bool test) { trace(MENU_DEBUG_OUT<<*this<<" menuNode::changed"<(nav,out,sub,test); - /*if (dirty) { - trace(if (test) MENU_DEBUG_OUT<<"just dirty!"<level; - if (parentDraw()) { - trace(MENU_DEBUG_OUT<<"return changed of parent-draw element"<path[level-1].target->changed(nav.root->path[level-1],out,sub,test); - } - // idx_t tit=hasTitle(nav.root->path[lev])?1:0;//TODO: this might not be correct.. checking - idx_t my=out.maxY()-((has(showTitle)||(nav.root->showTitle&&!has(noTitle)))?1:0); - // trace(MENU_DEBUG_OUT<<"level:"<navFocus<<" "<navFocus->has(_parentDraw)<<" "<navFocus->has(_asPad)<navFocus->has(_parentDraw)&&nav.root->navFocus->isMenu()); - idx_t t=out.tops[level-nav.root->navFocus->has(_parentDraw)&&has(_asPad)]; - // trace(MENU_DEBUG_OUT<<"tit:"<=sz()) break; - trace(MENU_DEBUG_OUT<<"checking:"<(nav,out,sub,false); - /*dirty=false; - if (has((systemStyles)(_asPad|_parentDraw))) { - for(int i=0;ilevel; - if (parentDraw()) - return nav.root->path[level-1].target->clearChanged(nav.root->path[level-1],out,sub); - idx_t my=out.maxY()-((has(showTitle)||(nav.root->showTitle&&!has(noTitle)))?1:0); - // idx_t lev=level-(nav.root->navFocus->has(_parentDraw)&&nav.root->navFocus->isMenu()); - // idx_t t=out.tops[lev]; - idx_t t=out.tops[level-nav.root->navFocus->has(_parentDraw)&&has(_asPad)]; - for(idx_t i=0;i=sz()) break;//menu ended - operator[](t).clearChanged(nav,out,false); - } - } - #ifdef MENU_DEBUG - if(changed(nav,out,sub,true)) { - MENU_DEBUG_OUT<<"ERROR clear changed fail!"<level<getCmdChar(enterCmd)&&!tunning) { - nav.event(enterEvent); - }*/ if (dirty)//sending enter or update event nav.event(nav.root->useUpdateEvent?updateEvent:enterEvent); } @@ -481,7 +408,7 @@ template bool menuNode::_changes(const navNode &nav,const menuOut& out,bool sub,bool test) { if (clear) dirty=false; else if (dirty) { - _trace(if (test) MENU_DEBUG_OUT<<"just dirty!"<level; if (parentDraw()) { if (clear) nav.root->path[level-1].target->clearChanged(nav.root->path[level-1],out,sub); else { - _trace(MENU_DEBUG_OUT<<"return changed of parent-draw element"<path[level-1].target->changed(nav.root->path[level-1],out,sub,test); } } - // idx_t tit=hasTitle(nav.root->path[lev])?1:0;//TODO: this might not be correct.. checking idx_t my=out.maxY()-((has(showTitle)||(nav.root->showTitle&&!has(noTitle)))?1:0); - // trace(MENU_DEBUG_OUT<<"level:"<navFocus<<" "<navFocus->has(_parentDraw)<<" "<navFocus->has(_asPad)<navFocus->has(_parentDraw)&&(nav.root->navFocus->isMenu()||nav.root->navFocus->has(_asPad))); - // idx_t t=out.tops[lev]; - // idx_t t=out.tops[level];//-nav.root->navFocus->has(_parentDraw)&&has(_asPad)]; - // idx_t t=out.tops[level-((nav.root->navFocus->has(_parentDraw)&&nav.root->navFocus->has(_menuData))||nav.root->navFocus->has(_asPad))]; - // idx_t t=out.tops[level-(nav.root->path[level].target->has(_asPad))]; menuNode* target=nav.root->path[level].target; idx_t t=out.tops[level-(target->has(_asPad)||target->has(_parentDraw))]; trace(MENU_DEBUG_OUT<<"t:"<=sz()) break; - _trace(if (debugFlag) { - MENU_DEBUG_OUT<<*this - <<" level:"<level - <<" focus:"<<*nav.root->navFocus - <<" root target:"<<*nav.root->path[nav.root->level].target - <<" nav target:"<<*nav.target - <<" top:"<level] - <<" asPad:"<drawLevel() - <<" cur panel:"<