Skip to content

Commit 5069522

Browse files
committed
fix #187
1 parent 2552bb7 commit 5069522

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

examples/Confirm/Confirm/Confirm.ino

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@ using namespace Menu;
1818
class confirmExit:public menu {
1919
public:
2020
confirmExit(constMEM menuNodeShadow& shadow):menu(shadow) {}
21-
Used printTo(navRoot &root,bool sel,menuOut& out, idx_t idx,idx_t len,idx_t) override {
22-
return out.printRaw((constText*)F("Exit"),len);
21+
Used printTo(navRoot &root,bool sel,menuOut& out, idx_t idx,idx_t len,idx_t p) override {
22+
return idx<0?//idx woll be -1 when printing a menu title or a valid index when printing as option
23+
menu::printTo(root,sel,out,idx,len,p)://when printing title
24+
out.printRaw((constText*)F("Exit"),len);//when printing as regular option
2325
}
2426
};
2527

0 commit comments

Comments
 (0)