diff options
author | Jens Arnold <amiconn@rockbox.org> | 2006-09-30 09:04:05 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2006-09-30 09:04:05 +0000 |
commit | d47983b64200c8fafef3072114edd6075b75be4d (patch) | |
tree | 5ffd441fc6cc445ef74a52126fd66b29a693c3b3 /apps | |
parent | 912574b5f946ef8b0089288ff29fc515c6ce5e22 (diff) |
Solitaire: colourised selection frame on colour targets.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11097 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r-- | apps/plugins/solitaire.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/apps/plugins/solitaire.c b/apps/plugins/solitaire.c index 1e1b2dd780..09c8b90eb0 100644 --- a/apps/plugins/solitaire.c +++ b/apps/plugins/solitaire.c @@ -253,8 +253,10 @@ static char helptext[] = /* background color */ #ifdef HAVE_LCD_COLOR # define BACKGROUND_COLOR LCD_RGBPACK(0,157,0) +# define FRAME_COLOR LCD_RGBPACK(23,119,218) #elif LCD_DEPTH > 1 # define BACKGROUND_COLOR LCD_WHITE +# define FRAME_COLOR LCD_BLACK #endif @@ -312,10 +314,6 @@ static void draw_cursor( int x, int y ) * if the cursor is currently over the card */ static void draw_card_ext( int x, int y, bool selected, bool cursor ) { -#if LCD_DEPTH > 1 - rb->lcd_set_foreground( LCD_BLACK ); -#endif - #ifdef LARGE_CARD rb->lcd_hline( x+2, x+CARD_WIDTH-3, y ); rb->lcd_hline( x+2, x+CARD_WIDTH-3, y+CARD_HEIGHT-1 ); @@ -334,11 +332,18 @@ static void draw_card_ext( int x, int y, bool selected, bool cursor ) if( selected ) { +#if LCD_DEPTH > 1 + rb->lcd_set_foreground( FRAME_COLOR ); +#endif rb->lcd_drawrect( x+1, y+1, CARD_WIDTH-2, CARD_HEIGHT-2 ); #ifdef LARGE_CARD rb->lcd_drawrect( x+2, y+2, CARD_WIDTH-4, CARD_HEIGHT-4 ); #endif } +#if LCD_DEPTH > 1 + rb->lcd_set_foreground( LCD_BLACK ); +#endif + if( cursor ) { draw_cursor( x, y ); @@ -529,7 +534,6 @@ int solitaire_menu(bool in_game) #if LCD_DEPTH > 1 rb->lcd_set_foreground(LCD_DEFAULT_FG); - rb->lcd_set_background(LCD_DEFAULT_BG); #endif if (in_game) @@ -1036,8 +1040,8 @@ int solitaire( void ) rb->lcd_clear_display(); #if LCD_DEPTH > 1 + rb->lcd_set_background(LCD_DEFAULT_BG); rb->lcd_set_foreground(LCD_BLACK); - rb->lcd_set_background(LCD_WHITE); #endif /* get the biggest column length so that display can be "optimized" */ |