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
This commit is contained in:
parent
527b069653
commit
8ef07c8a2f
2 changed files with 29 additions and 7 deletions
|
@ -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 */
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue