From 8fd86d77f1a2f15c6fa95bc390bcbe646374873a Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Mon, 13 Apr 2015 14:36:02 -0700 Subject: Move the menu header out of the menu. This makes it easier for us to deal with arbitrary information at the top, and means that headers added by specific commands don't overwrite the default ones. Add the fingerprint back, but broken up so it fits even on sprout's display. Change-Id: Id71da79ab1aa455a611d72756a3100a97ceb4c1c --- screen_ui.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'screen_ui.h') diff --git a/screen_ui.h b/screen_ui.h index 50a456425..d473b8e94 100644 --- a/screen_ui.h +++ b/screen_ui.h @@ -61,7 +61,9 @@ class ScreenRecoveryUI : public RecoveryUI { void Redraw(); - enum UIElement { HEADER, MENU, MENU_SEL_BG, MENU_SEL_BG_ACTIVE, MENU_SEL_FG, LOG, TEXT_FILL }; + enum UIElement { + HEADER, MENU, MENU_SEL_BG, MENU_SEL_BG_ACTIVE, MENU_SEL_FG, LOG, TEXT_FILL, INFO + }; void SetColor(UIElement e); private: @@ -95,8 +97,9 @@ class ScreenRecoveryUI : public RecoveryUI { bool show_text_ever; // has show_text ever been true? char** menu; + const char* const* menu_headers; bool show_menu; - int menu_top, menu_items, menu_sel; + int menu_items, menu_sel; pthread_t progress_thread_; @@ -121,6 +124,8 @@ class ScreenRecoveryUI : public RecoveryUI { void ClearText(); void DrawHorizontalRule(int* y); + void DrawTextLine(int* y, const char* line, bool bold); + void DrawTextLines(int* y, const char* const* lines); void LoadBitmap(const char* filename, gr_surface* surface); void LoadBitmapArray(const char* filename, int* frames, gr_surface** surface); -- cgit v1.2.3