removed example code
This commit is contained in:
parent
7e6246c1ba
commit
21769f0746
@ -115,33 +115,16 @@ CHOOSE(chooseTest,chooseMenu,"Choose",doNothing,noEvent,wrapStyle
|
|||||||
,VALUE("Last",-1,doNothing,noEvent)
|
,VALUE("Last",-1,doNothing,noEvent)
|
||||||
);
|
);
|
||||||
|
|
||||||
//customizing a prompt look!
|
|
||||||
//by extending the prompt class
|
|
||||||
class altPrompt:public prompt {
|
|
||||||
public:
|
|
||||||
altPrompt(constMEM promptShadow& p):prompt(p) {}
|
|
||||||
Used printTo(navRoot &root,bool sel,menuOut& out, idx_t idx,idx_t len,idx_t) override {
|
|
||||||
return out.printRaw(F("special prompt!"),len);;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
MENU(subMenu,"Sub-Menu",doNothing,anyEvent,wrapStyle
|
MENU(subMenu,"Sub-Menu",doNothing,anyEvent,wrapStyle
|
||||||
,OP("Sub1",showEvent,enterEvent)
|
,OP("Sub1",showEvent,enterEvent)
|
||||||
,OP("Sub2",showEvent,enterEvent)
|
,OP("Sub2",showEvent,enterEvent)
|
||||||
,OP("Sub3",showEvent,enterEvent)
|
,OP("Sub3",showEvent,enterEvent)
|
||||||
,altOP(altPrompt,"",showEvent,enterEvent)
|
|
||||||
,EXIT("<Back")
|
,EXIT("<Back")
|
||||||
);
|
);
|
||||||
|
|
||||||
//constText* constMEM textFilter MEMMODE=" .0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTWXYZ";
|
|
||||||
//constText* constMEM textMask[] MEMMODE={textFilter};//this mask will repeat till the end of the field
|
|
||||||
//char name[]=" ";//<-- menu will edit this text
|
|
||||||
|
|
||||||
MENU(mainMenu,"Main menu",doNothing,noEvent,wrapStyle
|
MENU(mainMenu,"Main menu",doNothing,noEvent,wrapStyle
|
||||||
,OP("Op1",action1,anyEvent)
|
,OP("Op1",action1,anyEvent)
|
||||||
,OP("Op2",action2,enterEvent)
|
,OP("Op2",action2,enterEvent)
|
||||||
//,EDIT("Name",name,textMask,doNothing,noEvent,noStyle)
|
|
||||||
//,SUBMENU(togOp)
|
|
||||||
,FIELD(test,"Test","%",0,100,10,1,doNothing,noEvent,wrapStyle)
|
,FIELD(test,"Test","%",0,100,10,1,doNothing,noEvent,wrapStyle)
|
||||||
,SUBMENU(subMenu)
|
,SUBMENU(subMenu)
|
||||||
,SUBMENU(setLed)
|
,SUBMENU(setLed)
|
||||||
@ -158,12 +141,8 @@ MENU_OUTPUTS(out,MAX_DEPTH
|
|||||||
,NONE//must have 2 items at least
|
,NONE//must have 2 items at least
|
||||||
);
|
);
|
||||||
|
|
||||||
stringIn<0> strIn;//buffer size: 2^5 = 32 bytes, eventually use 0 for a single byte
|
stringIn<0> strIn;
|
||||||
serialIn serial(Serial);
|
serialIn serial(Serial);
|
||||||
// use this commented lines if you want your stringIn object to be used as part or normal menu input
|
|
||||||
// menuIn* inputsList[]={&serial,&strIn};
|
|
||||||
// chainStream<sizeof(inputsList)> in(inputsList);
|
|
||||||
// NAVROOT(nav,mainMenu,MAX_DEPTH,in,out);
|
|
||||||
NAVROOT(nav,mainMenu,MAX_DEPTH,serial,out);
|
NAVROOT(nav,mainMenu,MAX_DEPTH,serial,out);
|
||||||
|
|
||||||
result alert(menuOut& o,idleEvent e) {
|
result alert(menuOut& o,idleEvent e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user