Add key indicators
This commit is contained in:
parent
af6d44122d
commit
5d62a49c7b
|
@ -439,6 +439,17 @@ void displayFooter(CommonData &commonData) {
|
|||
getdisplay().drawCircle(x0 + i * (r * 2 + space), 290, r, commonData.fgcolor);
|
||||
}
|
||||
}
|
||||
// key indicators
|
||||
// left side = top key "menu"
|
||||
getdisplay().drawLine(0, 280, 10, 280, commonData.fgcolor);
|
||||
getdisplay().drawLine(55, 280, 65, 280, commonData.fgcolor);
|
||||
getdisplay().drawLine(65, 280, 65, 299, commonData.fgcolor);
|
||||
drawTextCenter(33, 291, commonData.keydata[0].label);
|
||||
// right side = bottom key "exit"
|
||||
getdisplay().drawLine(390, 280, 399, 280, commonData.fgcolor);
|
||||
getdisplay().drawLine(335, 280, 345, 280, commonData.fgcolor);
|
||||
getdisplay().drawLine(335, 280, 335, 399, commonData.fgcolor);
|
||||
drawTextCenter(366, 291, commonData.keydata[1].label);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -103,6 +103,7 @@ class Page{
|
|||
virtual void displayPage(PageData &pageData)=0;
|
||||
virtual void displayNew(PageData &pageData){}
|
||||
virtual void setupKeys() {
|
||||
#ifdef HARDWARE_V21
|
||||
commonData->keydata[0].label = "";
|
||||
commonData->keydata[1].label = "";
|
||||
commonData->keydata[2].label = "#LEFT";
|
||||
|
@ -113,6 +114,12 @@ class Page{
|
|||
} else {
|
||||
commonData->keydata[5].label = "";
|
||||
}
|
||||
#endif
|
||||
#ifdef HARDWARE_LIGHT
|
||||
commonData->keydata[0].label = "";
|
||||
commonData->keydata[1].label = "";
|
||||
|
||||
#endif
|
||||
}
|
||||
//return -1 if handled by the page
|
||||
virtual int handleKey(int key){return key;}
|
||||
|
|
Loading…
Reference in New Issue