Skip to content

Commit ffddf6e

Browse files
committed
Auto stash for revert of "ok"
1 parent 9995a6e commit ffddf6e

File tree

2 files changed

+23
-13
lines changed

2 files changed

+23
-13
lines changed

src/menuFields.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -69,17 +69,17 @@ v2.0 - Calling action on every elements
6969
}*/
7070
}
7171
virtual void printName(menuOut& p) {
72-
//if (!enabled) p.print('*');
73-
print_P(p,text);
72+
print_P(p,text);
7473
p.print(activeNode==this?(tunning?'>':':'):' ');
7574
}
76-
virtual void printValue(menuOut& p) {p.print(value);}
77-
virtual void printUnit(menuOut& p) {print_P(p,units);}
78-
virtual void printTo(menuOut& p) {
79-
printName(p);
80-
printValue(p);
81-
printUnit(p);
82-
}
75+
virtual void printValue(menuOut& p) {p.print(value);}
76+
virtual void printUnit(menuOut& p) {print_P(p,units);}
77+
virtual void printTo(menuOut& p) {
78+
printName(p);
79+
p.print(activeNode==this?(tunning?'>':':'):' ');
80+
printValue(p);
81+
printUnit(p);
82+
}
8383
void clamp() {
8484
if (value<low) value=low;
8585
#ifdef ONLY_UP_KEY

src/menuU8G.h

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ www.r-site.net
2525
unsigned char bgColor;
2626
unsigned char enabledColor;
2727
unsigned char disabledColor;
28+
unsigned char enabledColorHi;
29+
unsigned char disabledColorHi;
30+
unsigned char valueColor;
31+
unsigned char valueColorHi;
2832

2933
U8GLIB& gfx;
3034
menuU8G(
@@ -33,6 +37,8 @@ www.r-site.net
3337
unsigned char bgColor=0,
3438
unsigned char enabledColor=2,
3539
unsigned char disabledColor=1,
40+
unsigned char valueColor=2,
41+
unsigned char valueColorHi=2,
3642
uint8_t resX = 7,//6 font width
3743
uint8_t resY = 8 //9 font height + 2 pixels of spacing
3844
)
@@ -41,6 +47,10 @@ www.r-site.net
4147
enabledColor(enabledColor),
4248
disabledColor(disabledColor),
4349
hiliteColor(hiliteColor),
50+
enabledColorHi(bgColor),
51+
disabledColorHi(bgColor),
52+
valueColor(enabledColor),
53+
valueColorHi(enabledColor),
4454
menuOut(gfx.getWidth()/resX,gfx.getHeight()/resY,resX,resY)
4555
{
4656
// Small typefaces used to draw the menu, do not forget to report resX and resY
@@ -75,10 +85,10 @@ www.r-site.net
7585
gfx.setColorIndex(selected?(o.enabled?enabledColorHi:disabledColorHi):(o.enabled?enabledColor:disabledColor));
7686
setCursor(posX,posY+1); //+1 compensate the height of the font and the way how U8Glib works
7787
//o.printTo(*this);
78-
o.printName(*this);
79-
gfx.setColorIndex(o.enabled?hiliteColor:selected?disabledColor:bgColor);
80-
o.printValue(*this);
81-
o.printUnit(*this);
88+
o.printName(*this);
89+
gfx.setColorIndex(selected?valueColorHi:valueColor);
90+
o.printValue(*this);
91+
o.printUnit(*this);
8292
}
8393
virtual void printMenu(menu& m,bool drawExit) {
8494
//Serial<<"printing menu "<<m<<" top:"<<top<<endl;

0 commit comments

Comments
 (0)