1
0
Fork 0
forked from len0rd/rockbox

Solitaire: colourised selection frame on colour targets.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11097 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jens Arnold 2006-09-30 09:04:05 +00:00
parent 912574b5f9
commit d47983b642

View file

@ -253,8 +253,10 @@ static char helptext[] =
/* background color */ /* background color */
#ifdef HAVE_LCD_COLOR #ifdef HAVE_LCD_COLOR
# define BACKGROUND_COLOR LCD_RGBPACK(0,157,0) # define BACKGROUND_COLOR LCD_RGBPACK(0,157,0)
# define FRAME_COLOR LCD_RGBPACK(23,119,218)
#elif LCD_DEPTH > 1 #elif LCD_DEPTH > 1
# define BACKGROUND_COLOR LCD_WHITE # define BACKGROUND_COLOR LCD_WHITE
# define FRAME_COLOR LCD_BLACK
#endif #endif
@ -312,10 +314,6 @@ static void draw_cursor( int x, int y )
* if the cursor is currently over the card */ * if the cursor is currently over the card */
static void draw_card_ext( int x, int y, bool selected, bool cursor ) 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 #ifdef LARGE_CARD
rb->lcd_hline( x+2, x+CARD_WIDTH-3, y ); rb->lcd_hline( x+2, x+CARD_WIDTH-3, y );
rb->lcd_hline( x+2, x+CARD_WIDTH-3, y+CARD_HEIGHT-1 ); 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( 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 ); rb->lcd_drawrect( x+1, y+1, CARD_WIDTH-2, CARD_HEIGHT-2 );
#ifdef LARGE_CARD #ifdef LARGE_CARD
rb->lcd_drawrect( x+2, y+2, CARD_WIDTH-4, CARD_HEIGHT-4 ); rb->lcd_drawrect( x+2, y+2, CARD_WIDTH-4, CARD_HEIGHT-4 );
#endif #endif
} }
#if LCD_DEPTH > 1
rb->lcd_set_foreground( LCD_BLACK );
#endif
if( cursor ) if( cursor )
{ {
draw_cursor( x, y ); draw_cursor( x, y );
@ -529,7 +534,6 @@ int solitaire_menu(bool in_game)
#if LCD_DEPTH > 1 #if LCD_DEPTH > 1
rb->lcd_set_foreground(LCD_DEFAULT_FG); rb->lcd_set_foreground(LCD_DEFAULT_FG);
rb->lcd_set_background(LCD_DEFAULT_BG);
#endif #endif
if (in_game) if (in_game)
@ -1036,8 +1040,8 @@ int solitaire( void )
rb->lcd_clear_display(); rb->lcd_clear_display();
#if LCD_DEPTH > 1 #if LCD_DEPTH > 1
rb->lcd_set_background(LCD_DEFAULT_BG);
rb->lcd_set_foreground(LCD_BLACK); rb->lcd_set_foreground(LCD_BLACK);
rb->lcd_set_background(LCD_WHITE);
#endif #endif
/* get the biggest column length so that display can be "optimized" */ /* get the biggest column length so that display can be "optimized" */