summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/plugins/solitaire.c27
-rw-r--r--apps/plugins/star.c9
2 files changed, 29 insertions, 7 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 */
619static bool solitaire_help( void ) 619static 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 */
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)
1002 { 35, C_RED }, 1002 { 35, C_RED },
1003 { -1, 0 } 1003 { -1, 0 }
1004 }; 1004 };
1005 1005#ifndef HAVE_LCD_COLOR
1006 rb->lcd_set_background(LCD_WHITE );
1007 rb->lcd_set_foreground(LCD_BLACK );
1008#endif
1006 if (display_text(WORDS, help_text, formation, NULL)) 1009 if (display_text(WORDS, help_text, formation, NULL))
1007 return true; 1010 return true;
1008 do { 1011 do {
@@ -1012,6 +1015,10 @@ static bool star_help(void)
1012 } while( ( button == BUTTON_NONE ) 1015 } while( ( button == BUTTON_NONE )
1013 || ( button & (BUTTON_REL|BUTTON_REPEAT) ) ); 1016 || ( button & (BUTTON_REL|BUTTON_REPEAT) ) );
1014 1017
1018#ifndef HAVE_LCD_COLOR
1019 rb->lcd_set_background(LCD_BLACK );
1020 rb->lcd_set_foreground(LCD_WHITE );
1021#endif
1015 return false; 1022 return false;
1016} 1023}
1017 1024