@@ -27,6 +27,8 @@ www.r-site.net
2727 unsigned char disabledColor;
2828 unsigned char enabledColorHi;
2929 unsigned char disabledColorHi;
30+ unsigned char valueColor;
31+ unsigned char valueColorHi;
3032
3133 U8GLIB& gfx;
3234 menuU8G (
@@ -35,6 +37,8 @@ www.r-site.net
3537 unsigned char bgColor=0 ,
3638 unsigned char enabledColor=2 ,
3739 unsigned char disabledColor=1 ,
40+ unsigned char valueColor=2 ,
41+ unsigned char valueColorHi=2 ,
3842 uint8_t resX = 7 ,// 6 font width
3943 uint8_t resY = 9 // 9 font height + 2 pixels of spacing
4044 )
@@ -45,6 +49,8 @@ www.r-site.net
4549 hiliteColor(hiliteColor),
4650 enabledColorHi(bgColor),
4751 disabledColorHi(bgColor),
52+ valueColor(enabledColor),
53+ valueColorHi(enabledColor),
4854 menuOut(gfx.getWidth()/resX,gfx.getHeight()/resY,resX,resY)
4955 {
5056 // Small typefaces used to draw the menu, do not forget to report resX and resY
@@ -77,7 +83,11 @@ www.r-site.net
7783 gfx.drawBox (posX*resX,posY*resY,maxX*resX,resY);
7884 gfx.setColorIndex (selected?(o.enabled ?enabledColorHi:disabledColorHi):(o.enabled ?enabledColor:disabledColor));
7985 setCursor (posX,posY+1 ); // +1 compensate the height of the font and the way how U8Glib works
80- o.printTo (*this );
86+ // o.printTo(*this);
87+ o.printName (*this );
88+ gfx.setColorIndex (selected?valueColorHi:valueColor);
89+ o.printValue (*this );
90+ o.printUnit (*this );
8191 }
8292 virtual void printMenu (menu& m,bool drawExit) {
8393 // Serial<<"printing menu "<<m<<" top:"<<top<<endl;
0 commit comments