forked from len0rd/rockbox
Fix bug #5298 - hard-code the background color in Sokoban to prevent everything else from being potentially unreadable (if the user has set a dark background color).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9894 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
a0308f8c0a
commit
67faac4368
1 changed files with 43 additions and 35 deletions
|
@ -105,6 +105,7 @@ PLUGIN_HEADER
|
||||||
#define FREE_BLOCK_COLOR LCD_RGBPACK(22,130,53) /* Color of a block when it's not on a 'target' */
|
#define FREE_BLOCK_COLOR LCD_RGBPACK(22,130,53) /* Color of a block when it's not on a 'target' */
|
||||||
#define USED_BLOCK_COLOR LCD_RGBPACK(22,130,53) /* Color of a block when it is on a 'target' */
|
#define USED_BLOCK_COLOR LCD_RGBPACK(22,130,53) /* Color of a block when it is on a 'target' */
|
||||||
#define CHAR_COLOR LCD_BLACK /* Color of the 'character' */
|
#define CHAR_COLOR LCD_BLACK /* Color of the 'character' */
|
||||||
|
#define BG_COLOR LCD_RGBPACK(181,199,231) /* Background color. Default Rockbox light blue. */
|
||||||
|
|
||||||
#elif LCD_DEPTH > 1
|
#elif LCD_DEPTH > 1
|
||||||
#define MEDIUM_GRAY LCD_BRIGHTNESS(127)
|
#define MEDIUM_GRAY LCD_BRIGHTNESS(127)
|
||||||
|
@ -565,6 +566,9 @@ static bool sokoban_loop(void)
|
||||||
{
|
{
|
||||||
case SOKOBAN_QUIT:
|
case SOKOBAN_QUIT:
|
||||||
/* get out of here */
|
/* get out of here */
|
||||||
|
#ifdef HAVE_LCD_COLOR /* reset background color */
|
||||||
|
rb->lcd_set_background(rb->global_settings->bg_color);
|
||||||
|
#endif
|
||||||
return PLUGIN_OK;
|
return PLUGIN_OK;
|
||||||
|
|
||||||
case SOKOBAN_UNDO:
|
case SOKOBAN_UNDO:
|
||||||
|
@ -938,6 +942,10 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
|
||||||
rb->lcd_setfont(FONT_SYSFIXED);
|
rb->lcd_setfont(FONT_SYSFIXED);
|
||||||
rb->lcd_getstringsize(SOKOBAN_TITLE, &w, &h);
|
rb->lcd_getstringsize(SOKOBAN_TITLE, &w, &h);
|
||||||
|
|
||||||
|
#ifdef HAVE_LCD_COLOR
|
||||||
|
rb->lcd_set_background(BG_COLOR);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Get horizontel centering for text */
|
/* Get horizontel centering for text */
|
||||||
len = w;
|
len = w;
|
||||||
if (len%2 != 0)
|
if (len%2 != 0)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue