From 8ef07c8a2f43f3efb4993446a122e32f4ae23efc Mon Sep 17 00:00:00 2001 From: Johannes Schwarz Date: Mon, 27 Jul 2009 16:55:37 +0000 Subject: Fix some tiny bugs in the help screen from solitaire and star git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22071 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/solitaire.c | 27 +++++++++++++++++++++------ apps/plugins/star.c | 9 ++++++++- 2 files changed, 29 insertions(+), 7 deletions(-) (limited to 'apps') diff --git a/apps/plugins/solitaire.c b/apps/plugins/solitaire.c index 668f0d5f96..2291eaceb9 100644 --- a/apps/plugins/solitaire.c +++ b/apps/plugins/solitaire.c @@ -618,10 +618,10 @@ static void draw_empty_stack( int s, int x, int y, bool cursor ) /* Help */ static bool solitaire_help( void ) { - int button; + #define WORDS (sizeof help_text / sizeof (char*)) static char* help_text[] = { - "Solitaire", "", "Controlls", "", + "Solitaire", "", "Controls", "", HK_LR ":", "Move", "the", "cursor", "to", "the", "previous/", "next", "column.", "", HK_UD ":", "Move", "the", "cursor", "up/", "down", "in", "the", @@ -639,8 +639,22 @@ static bool solitaire_help( void ) "remains", "stack", "on", "one", "of", "the", "4", "final", "stacks." }; - - if (display_text(WORDS, help_text, NULL, NULL)) + static struct style_text formation[]={ + { 0, TEXT_CENTER|TEXT_UNDERLINE }, + { 2, C_RED }, + { 48, C_RED }, + { -1, 0 } + }; +#if LCD_DEPTH > 1 + fb_data* backdrop = rb->lcd_get_backdrop(); + rb->lcd_set_backdrop(NULL); +#endif +#ifdef HAVE_LCD_COLOR + rb->lcd_set_background(LCD_BLACK); + rb->lcd_set_foreground(LCD_WHITE); +#endif + int button; + if (display_text(WORDS, help_text, formation, NULL)) return true; do { button = rb->button_get(true); @@ -649,6 +663,9 @@ static bool solitaire_help( void ) } while( ( button == BUTTON_NONE ) || ( button & (BUTTON_REL|BUTTON_REPEAT) ) ); +#if LCD_DEPTH > 1 + rb->lcd_set_backdrop(backdrop); +#endif return false; } @@ -1815,8 +1832,6 @@ enum plugin_status plugin_start(const void* parameter ) /* plugin init */ (void)parameter; - rb->splash( HZ, "Welcome to Solitaire!" ); - configfile_load(CONFIG_FILENAME, config, sizeof(config) / sizeof(config[0]), CFGFILE_VERSION); rb->memcpy(&sol, &sol_disk, sizeof(sol)); /* copy to running config */ diff --git a/apps/plugins/star.c b/apps/plugins/star.c index bb216bf17c..0ed902dedb 100644 --- a/apps/plugins/star.c +++ b/apps/plugins/star.c @@ -1002,7 +1002,10 @@ static bool star_help(void) { 35, C_RED }, { -1, 0 } }; - +#ifndef HAVE_LCD_COLOR + rb->lcd_set_background(LCD_WHITE ); + rb->lcd_set_foreground(LCD_BLACK ); +#endif if (display_text(WORDS, help_text, formation, NULL)) return true; do { @@ -1012,6 +1015,10 @@ static bool star_help(void) } while( ( button == BUTTON_NONE ) || ( button & (BUTTON_REL|BUTTON_REPEAT) ) ); +#ifndef HAVE_LCD_COLOR + rb->lcd_set_background(LCD_BLACK ); + rb->lcd_set_foreground(LCD_WHITE ); +#endif return false; } -- cgit v1.2.3