@@ -5,7 +5,7 @@ This software is furnished "as is", without technical support, and with no
55warranty, express or implied, as to its usefulness for any purpose.
66
77Thread Safe: No
8- Extendable : Yes
8+ Extensible : Yes
99
1010Arduino generic menu system
1111
@@ -15,8 +15,8 @@ Arduino generic menu system
1515 menuPrint: menuOut implementation for generic print (as Serial)
1616 menuLCD: menuOut implementation for standard LiquidCrystal LCD
1717
18- the menu system will read provided stream for input, it works for Serial
19- for encoders, joysticks, keyboards or touch a stream must be made out of them
18+ the menu system will read provided stream for input, it works for Serial,
19+ encoders, joysticks, keyboards ( or touch?) a stream must be made out of them
2020*/
2121#ifndef RSITE_ARDUINOP_MENU_SYSTEM
2222 #define RSITE_ARDUINOP_MENU_SYSTEM
@@ -142,6 +142,9 @@ for encoders, joysticks, keyboards or touch a stream must be made out of them
142142 // device resolution
143143 int resX;
144144 int resY;
145+ // preventing uneeded redraws
146+ int lastTop;
147+ int lastSel;
145148 menuOut (int x=0x7F ,int y=0x7F ,int resX=1 ,int resY=1 )
146149 :maxX(x),maxY(y),top(0 ),resX(resX),resY(resY),drawn(0 ) {}
147150 virtual void clear ()=0;
0 commit comments