We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d1fa279 commit 14a6203Copy full SHA for 14a6203
examples/U8G2/U8G2/U8G2.ino
@@ -221,7 +221,7 @@ void setup() {
221
#endif
222
u8g2.begin();
223
u8g2.setFont(fontName);
224
- u8g2.setBitmapMode(0);
+ // u8g2.setBitmapMode(0);
225
226
//disable second option
227
mainMenu[1].enabled=disabledStatus;
examples/U8x8/U8x8/U8x8.ino
@@ -37,13 +37,22 @@ const char* constMEM hexDigit MEMMODE="0123456789ABCDEF";
37
const char* constMEM hexNr[] MEMMODE={"0","x",hexDigit,hexDigit};
38
char buf1[]="0x11";//<-- menu will edit this text
39
40
+int chooseTest=-1;
41
+CHOOSE(chooseTest,chooseMenu,"Choose",doNothing,noEvent,noStyle
42
+ ,VALUE("First",1,doNothing,noEvent)
43
+ ,VALUE("Second",2,doNothing,noEvent)
44
+ ,VALUE("Third",3,doNothing,noEvent)
45
+ ,VALUE("Last",-1,doNothing,noEvent)
46
+);
47
+
48
MENU(mainMenu,"Main menu",doNothing,noEvent,wrapStyle
49
,OP("Op1",doNothing,noEvent)
50
,EDIT("Hex",buf1,hexNr,doNothing,noEvent,noStyle)
51
+ ,SUBMENU(chooseMenu)
52
,EXIT("<Back")
53
);
54
-#define MAX_DEPTH 1
55
+#define MAX_DEPTH 2
56
57
MENU_OUTPUTS(out,MAX_DEPTH
58
,SERIAL_OUT(Serial)
examples/UCGLib/UCGLib/UCGLib.ino
@@ -43,13 +43,22 @@ const char* constMEM hexDigit MEMMODE="0123456789ABCDEF";
59
60
61
62
63
//define colors
64
#define BLACK {0,0,0}
library.properties
@@ -1,5 +1,5 @@
1
name=ArduinoMenu library
2
-version=4.0.9
+version=4.0.10
3
author=Rui Azevedo, [email protected]
4
maintainer=neu-rah, [email protected]
5
sentence=AVR generic menu/interactivity system
src/items.cpp
@@ -305,12 +305,15 @@ Used menuVariantBase::printTo(navRoot &root,bool sel,menuOut& out, idx_t idx,idx
305
out.print(this==&root.active()?':':' ');
306
l--;
307
#ifdef MENU_FMT_WRAPS
308
- if (out.fmtStart(type()==selectClass?menuOut::fmtSelect:menuOut::fmtChoose,root.node(),idx)==proceed) {
+ if (out.fmtStart(type()==selectClass?menuOut::fmtSelect:menuOut::fmtChoose,root.node(),idx)==proceed) {
309
310
+ // Serial<<"variant ";
311
+ // print_P(Serial,operator[](at).getText());
312
+ // Serial<<endl;
313
out.setColor(valColor,sel,prompt::enabled,ed);
314
if (l>0) l-=operator[](at).printRaw(out,l);
315
- }
316
+ }
317
318
319
out.fmtEnd(type()==selectClass?menuOut::fmtSelect:menuOut::fmtChoose,root.node(),idx);
src/items.h
@@ -368,6 +368,7 @@
368
369
virtual classes type() const {return chooseClass;}
370
371
+ Used printTo(navRoot &root,bool sel,menuOut& out, idx_t idx,idx_t len,idx_t panelNr=0) override;
372
result sysHandler(SYS_FUNC_PARAMS) override;
373
bool changed(const navNode &nav,const menuOut& out,bool sub=true) override {
374
return menuVariant<T>::changed(nav,out)||menuNode::changed(nav,out);
@@ -411,6 +412,14 @@
411
412
void menuField<T>::printLow(menuOut& o) const {o.print(low());}
413
414
415
+ template<typename T>
416
+ Used choose<T>::printTo(navRoot &root,bool sel,menuOut& out, idx_t idx,idx_t len,idx_t panelNr) {
417
+ bool ed=this==root.navFocus;
418
+ return ed?
419
+ prompt::printTo(root,sel,out,idx,len,panelNr)
420
+ :menuVariantBase::printTo(root,sel,out,idx,len,panelNr);
421
422
423
template<typename T>
424
Used toggle<T>::printTo(navRoot &root,bool sel,menuOut& out, idx_t idx,idx_t len,idx_t panelNr) {
425
return menuVariantBase::togglePrintTo(root,sel,out,idx,len,panelNr);
src/nav.h
@@ -137,7 +137,7 @@
137
}
138
//async printMenu on arbitrary menuOut device
139
Used printMenu(menuOut& o) const {
140
- _trace(Serial<<"navRoot::printMenu(menuOut& o)"<<endl);
+ trace(Serial<<"navRoot::printMenu(menuOut& o)"<<endl);
141
if ((active().sysStyles()&_parentDraw)&&level)
142
return o.printMenu(path[level-1]);
143
else return o.printMenu(node());
@@ -188,7 +188,10 @@
188
};
189
190
#ifdef DEBUG
191
- inline Stream& operator<<(Stream&o,const navNode& p) {return o<<*(prompt*)p.target;}
+ inline Stream& operator<<(Stream&o,const navNode& p) {
192
+ o.print((__FlashStringHelper*)p.target->getText());
193
+ return o;
194
195
inline Stream& operator<<(Stream&o,const navRoot& p) {return o<<p.node();}
196
197
0 commit comments