mirror of
https://github.com/Threnklyn/esphome-dev.git
synced 2026-05-25 15:18:29 +02:00
Add graphical display menu (#4105)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Co-authored-by: Alex Hermann <gaaf@gmx.net>
This commit is contained in:
@@ -166,6 +166,13 @@ void Display::qr_code(int x, int y, qr_code::QrCode *qr_code, Color color_on, in
|
||||
}
|
||||
#endif // USE_QR_CODE
|
||||
|
||||
#ifdef USE_GRAPHICAL_DISPLAY_MENU
|
||||
void Display::menu(int x, int y, graphical_display_menu::GraphicalDisplayMenu *menu, int width, int height) {
|
||||
Rect rect(x, y, width, height);
|
||||
menu->draw(this, &rect);
|
||||
}
|
||||
#endif // USE_GRAPHICAL_DISPLAY_MENU
|
||||
|
||||
void Display::get_text_bounds(int x, int y, const char *text, BaseFont *font, TextAlign align, int *x1, int *y1,
|
||||
int *width, int *height) {
|
||||
int x_offset, baseline;
|
||||
|
||||
Reference in New Issue
Block a user