@@ -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