diff options
author | Johannes Schwarz <ubuntuxer@rockbox.org> | 2009-07-27 16:55:37 +0000 |
---|---|---|
committer | Johannes Schwarz <ubuntuxer@rockbox.org> | 2009-07-27 16:55:37 +0000 |
commit | 8ef07c8a2f43f3efb4993446a122e32f4ae23efc (patch) | |
tree | d18676d8224c9c472a425ea3e637fe9fe5e4d36f /apps/plugins/solitaire.c | |
parent | 527b069653bf06661b8a9650e1f5eb2c6e7cc2bf (diff) | |
download | rockbox-8ef07c8a2f43f3efb4993446a122e32f4ae23efc.tar.gz rockbox-8ef07c8a2f43f3efb4993446a122e32f4ae23efc.zip |
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
Diffstat (limited to 'apps/plugins/solitaire.c')
-rw-r--r-- | apps/plugins/solitaire.c | 27 |
1 files changed, 21 insertions, 6 deletions
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 ) | |||
618 | /* Help */ | 618 | /* Help */ |
619 | static bool solitaire_help( void ) | 619 | static bool solitaire_help( void ) |
620 | { | 620 | { |
621 | int button; | 621 | |
622 | #define WORDS (sizeof help_text / sizeof (char*)) | 622 | #define WORDS (sizeof help_text / sizeof (char*)) |
623 | static char* help_text[] = { | 623 | static char* help_text[] = { |
624 | "Solitaire", "", "Controlls", "", | 624 | "Solitaire", "", "Controls", "", |
625 | HK_LR ":", "Move", "the", "cursor", "to", "the", | 625 | HK_LR ":", "Move", "the", "cursor", "to", "the", |
626 | "previous/", "next", "column.", "", | 626 | "previous/", "next", "column.", "", |
627 | HK_UD ":", "Move", "the", "cursor", "up/", "down", "in", "the", | 627 | HK_UD ":", "Move", "the", "cursor", "up/", "down", "in", "the", |
@@ -639,8 +639,22 @@ static bool solitaire_help( void ) | |||
639 | "remains", "stack", "on", "one", "of", "the", "4", "final", | 639 | "remains", "stack", "on", "one", "of", "the", "4", "final", |
640 | "stacks." | 640 | "stacks." |
641 | }; | 641 | }; |
642 | 642 | static struct style_text formation[]={ | |
643 | if (display_text(WORDS, help_text, NULL, NULL)) | 643 | { 0, TEXT_CENTER|TEXT_UNDERLINE }, |
644 | { 2, C_RED }, | ||
645 | { 48, C_RED }, | ||
646 | { -1, 0 } | ||
647 | }; | ||
648 | #if LCD_DEPTH > 1 | ||
649 | fb_data* backdrop = rb->lcd_get_backdrop(); | ||
650 | rb->lcd_set_backdrop(NULL); | ||
651 | #endif | ||
652 | #ifdef HAVE_LCD_COLOR | ||
653 | rb->lcd_set_background(LCD_BLACK); | ||
654 | rb->lcd_set_foreground(LCD_WHITE); | ||
655 | #endif | ||
656 | int button; | ||
657 | if (display_text(WORDS, help_text, formation, NULL)) | ||
644 | return true; | 658 | return true; |
645 | do { | 659 | do { |
646 | button = rb->button_get(true); | 660 | button = rb->button_get(true); |
@@ -649,6 +663,9 @@ static bool solitaire_help( void ) | |||
649 | } while( ( button == BUTTON_NONE ) | 663 | } while( ( button == BUTTON_NONE ) |
650 | || ( button & (BUTTON_REL|BUTTON_REPEAT) ) ); | 664 | || ( button & (BUTTON_REL|BUTTON_REPEAT) ) ); |
651 | 665 | ||
666 | #if LCD_DEPTH > 1 | ||
667 | rb->lcd_set_backdrop(backdrop); | ||
668 | #endif | ||
652 | return false; | 669 | return false; |
653 | } | 670 | } |
654 | 671 | ||
@@ -1815,8 +1832,6 @@ enum plugin_status plugin_start(const void* parameter ) | |||
1815 | /* plugin init */ | 1832 | /* plugin init */ |
1816 | (void)parameter; | 1833 | (void)parameter; |
1817 | 1834 | ||
1818 | rb->splash( HZ, "Welcome to Solitaire!" ); | ||
1819 | |||
1820 | configfile_load(CONFIG_FILENAME, config, | 1835 | configfile_load(CONFIG_FILENAME, config, |
1821 | sizeof(config) / sizeof(config[0]), CFGFILE_VERSION); | 1836 | sizeof(config) / sizeof(config[0]), CFGFILE_VERSION); |
1822 | rb->memcpy(&sol, &sol_disk, sizeof(sol)); /* copy to running config */ | 1837 | rb->memcpy(&sol, &sol_disk, sizeof(sol)); /* copy to running config */ |