diff options
Diffstat (limited to 'screen_ui.h')
-rw-r--r-- | screen_ui.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/screen_ui.h b/screen_ui.h index 2ec5f5d..e198503 100644 --- a/screen_ui.h +++ b/screen_ui.h @@ -52,6 +52,12 @@ class ScreenRecoveryUI : public RecoveryUI { void PrintOnScreenOnly(const char* fmt, ...) __printflike(2, 3); void ShowFile(const char* filename); + void DialogShowInfo(const char* text); + void DialogShowError(const char* text); + int DialogShowing() const { return (dialog_text != NULL); } + bool DialogDismissable() const { return (dialog_icon == ERROR); } + void DialogDismiss(); + // menu display void StartMenu(const char* const * headers, const char* const * items, int initial_selection); @@ -63,7 +69,7 @@ class ScreenRecoveryUI : public RecoveryUI { void Redraw(); enum UIElement { - HEADER, MENU, MENU_SEL_BG, MENU_SEL_BG_ACTIVE, MENU_SEL_FG, LOG, TEXT_FILL, INFO + HEADER, MENU, MENU_SEL_BG, MENU_SEL_BG_ACTIVE, MENU_SEL_FG, LOG, TEXT_FILL, INFO, ERROR_TEXT }; void SetColor(UIElement e); @@ -74,8 +80,8 @@ class ScreenRecoveryUI : public RecoveryUI { bool rtl_locale; pthread_mutex_t updateMutex; - GRSurface* backgroundIcon[5]; - GRSurface* backgroundText[5]; + GRSurface* backgroundIcon[NR_ICONS]; + GRSurface* backgroundText[NR_ICONS]; GRSurface** installation; GRSurface* progressBarEmpty; GRSurface* progressBarFill; @@ -99,6 +105,9 @@ class ScreenRecoveryUI : public RecoveryUI { bool show_text; bool show_text_ever; // has show_text ever been true? + Icon dialog_icon; + char *dialog_text; + char** menu_; const char* const* menu_headers_; bool show_menu; @@ -121,6 +130,7 @@ class ScreenRecoveryUI : public RecoveryUI { void draw_background_locked(Icon icon); void draw_progress_locked(); + void draw_dialog(); void draw_screen_locked(); void update_screen_locked(); void update_progress_locked(); |