diff options
author | Robert Kukla <roolku@rockbox.org> | 2008-03-02 21:28:26 +0000 |
---|---|---|
committer | Robert Kukla <roolku@rockbox.org> | 2008-03-02 21:28:26 +0000 |
commit | 3e3e1d518ead4c1f864f61b219fa975396fe75f2 (patch) | |
tree | 9881d351a37d037d2ce8d4905fea37ae77e16646 /uisimulator | |
parent | 793fc3f0729103ad8d2c196f0783b9f36662f6bd (diff) |
simulator:
- correct colours for m:robe 100 display & screendump
- labelled button on background
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16488 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator')
-rw-r--r-- | uisimulator/sdl/UI-mrobe100.bmp | bin | 309558 -> 309558 bytes | |||
-rw-r--r-- | uisimulator/sdl/button.c | 1 | ||||
-rw-r--r-- | uisimulator/sdl/lcd-bitmap.c | 7 | ||||
-rw-r--r-- | uisimulator/sdl/lcd-charcells.c | 6 | ||||
-rw-r--r-- | uisimulator/sdl/uisdl.h | 45 |
5 files changed, 39 insertions, 20 deletions
diff --git a/uisimulator/sdl/UI-mrobe100.bmp b/uisimulator/sdl/UI-mrobe100.bmp Binary files differindex 17e7abcde1..19e5e1f3d3 100644 --- a/uisimulator/sdl/UI-mrobe100.bmp +++ b/uisimulator/sdl/UI-mrobe100.bmp diff --git a/uisimulator/sdl/button.c b/uisimulator/sdl/button.c index 0b347c9322..967f41baf7 100644 --- a/uisimulator/sdl/button.c +++ b/uisimulator/sdl/button.c @@ -702,6 +702,7 @@ void button_event(int key, bool pressed) case SDLK_SPACE: new_btn = BUTTON_SELECT; break; + case SDLK_KP_MULTIPLY: case SDLK_F8: case SDLK_ESCAPE: new_btn = BUTTON_POWER; diff --git a/uisimulator/sdl/lcd-bitmap.c b/uisimulator/sdl/lcd-bitmap.c index 7b6e2217c6..438b133804 100644 --- a/uisimulator/sdl/lcd-bitmap.c +++ b/uisimulator/sdl/lcd-bitmap.c @@ -27,9 +27,10 @@ int lcd_backlight_val; #if LCD_DEPTH <= 8 #ifdef HAVE_BACKLIGHT SDL_Color lcd_backlight_color_zero = {UI_LCD_BGCOLORLIGHT, 0}; +SDL_Color lcd_backlight_color_max = {UI_LCD_FGCOLORLIGHT, 0}; #endif SDL_Color lcd_color_zero = {UI_LCD_BGCOLOR, 0}; -SDL_Color lcd_color_max = {0, 0, 0, 0}; +SDL_Color lcd_color_max = {UI_LCD_FGCOLOR, 0}; #endif #if LCD_DEPTH < 8 @@ -79,7 +80,7 @@ void sim_backlight(int value) #if LCD_DEPTH <= 8 if (value > 0) { sdl_set_gradient(lcd_surface, &lcd_backlight_color_zero, - &lcd_color_max, 0, (1<<LCD_DEPTH)); + &lcd_backlight_color_max, 0, (1<<LCD_DEPTH)); } else { sdl_set_gradient(lcd_surface, &lcd_color_zero, &lcd_color_max, 0, (1<<LCD_DEPTH)); @@ -87,7 +88,7 @@ void sim_backlight(int value) #if LCD_DEPTH < 8 if (lcd_ex_shades) { if (value > 0) { - sdl_set_gradient(lcd_surface, &lcd_color_max, + sdl_set_gradient(lcd_surface, &lcd_backlight_color_max, &lcd_backlight_color_zero, (1<<LCD_DEPTH), lcd_ex_shades); } else { diff --git a/uisimulator/sdl/lcd-charcells.c b/uisimulator/sdl/lcd-charcells.c index 722933f002..85ff9678e4 100644 --- a/uisimulator/sdl/lcd-charcells.c +++ b/uisimulator/sdl/lcd-charcells.c @@ -35,7 +35,8 @@ extern int sim_creat(const char *name); SDL_Surface* lcd_surface; SDL_Color lcd_color_zero = {UI_LCD_BGCOLOR, 0}; SDL_Color lcd_backlight_color_zero = {UI_LCD_BGCOLORLIGHT, 0}; -SDL_Color lcd_color_max = {0, 0, 0, 0}; +SDL_Color lcd_color_max = {UI_LCD_FGCOLOR, 0}; +SDL_Color lcd_backlight_color_max = {UI_LCD_FGCOLORLIGHT, 0}; static unsigned long get_lcd_pixel(int x, int y) @@ -75,7 +76,8 @@ void lcd_update(void) void sim_backlight(int value) { if (value > 0) { - sdl_set_gradient(lcd_surface, &lcd_backlight_color_zero, &lcd_color_max, + sdl_set_gradient(lcd_surface, &lcd_backlight_color_zero, + &lcd_backlight_color_max, 0, (1<<LCD_DEPTH)); } else { sdl_set_gradient(lcd_surface, &lcd_color_zero, &lcd_color_max, diff --git a/uisimulator/sdl/uisdl.h b/uisimulator/sdl/uisdl.h index db11047dd1..5a7d89a8ec 100644 --- a/uisimulator/sdl/uisdl.h +++ b/uisimulator/sdl/uisdl.h @@ -31,7 +31,8 @@ #define UI_HEIGHT 406 /* height of GUI window */ #define UI_LCD_BGCOLOR 90, 145, 90 /* bkgnd color of LCD (no backlight) */ #define UI_LCD_BGCOLORLIGHT 126, 229, 126 /* bkgnd color of LCD (backlight) */ -#define UI_LCD_BLACK 0, 0, 0 /* black */ +#define UI_LCD_FGCOLOR 0, 0, 0 /* foreground color of LCD (no backlight) */ +#define UI_LCD_FGCOLORLIGHT 0, 0, 0 /* foreground color of LCD (backlight) */ #define UI_LCD_POSX 80 /* x position of lcd */ #define UI_LCD_POSY 104 /* y position of lcd (96 for real aspect) */ #define UI_LCD_WIDTH 112 @@ -43,7 +44,8 @@ #define UI_HEIGHT 420 /* height of GUI window */ #define UI_LCD_BGCOLOR 90, 145, 90 /* bkgnd color of LCD (no backlight) */ #define UI_LCD_BGCOLORLIGHT 126, 229, 126 /* bkgnd color of LCD (backlight) */ -#define UI_LCD_BLACK 0, 0, 0 /* black */ +#define UI_LCD_FGCOLOR 0, 0, 0 /* foreground color of LCD (no backlight) */ +#define UI_LCD_FGCOLORLIGHT 0, 0, 0 /* foreground color of LCD (backlight) */ #define UI_LCD_POSX 75 /* x position of lcd */ #define UI_LCD_POSY 116 /* y position of lcd */ #define UI_LCD_WIDTH 132 @@ -55,7 +57,8 @@ #define UI_HEIGHT 414 /* height of GUI window */ #define UI_LCD_BGCOLOR 90, 145, 90 /* bkgnd color of LCD (no backlight) */ #define UI_LCD_BGCOLORLIGHT 126, 229, 126 /* bkgnd color of LCD (backlight) */ -#define UI_LCD_BLACK 0, 0, 0 /* black */ +#define UI_LCD_FGCOLOR 0, 0, 0 /* foreground color of LCD (no backlight) */ +#define UI_LCD_FGCOLORLIGHT 0, 0, 0 /* foreground color of LCD (backlight) */ #define UI_LCD_POSX 87 /* x position of lcd */ #define UI_LCD_POSY 77 /* y position of lcd (69 for real aspect) */ #define UI_LCD_WIDTH 112 @@ -67,7 +70,8 @@ #define UI_HEIGHT 334 /* height of GUI window */ #define UI_LCD_BGCOLOR 90, 145, 90 /* bkgnd color of LCD (no backlight) */ #define UI_LCD_BGCOLORLIGHT 130, 180, 250 /* bkgnd color of LCD (backlight mod) */ -#define UI_LCD_BLACK 0, 0, 0 /* black */ +#define UI_LCD_FGCOLOR 0, 0, 0 /* foreground color of LCD (no backlight) */ +#define UI_LCD_FGCOLORLIGHT 0, 0, 0 /* foreground color of LCD (backlight) */ #define UI_LCD_POSX 21 /* x position of lcd */ #define UI_LCD_POSY 82 /* y position of lcd (74 for real aspect) */ #define UI_LCD_WIDTH 112 @@ -79,13 +83,16 @@ #define UI_HEIGHT 508 /* height of GUI window */ #define UI_LCD_BGCOLOR 90, 145, 90 /* bkgnd color of LCD (no backlight) */ #define UI_LCD_BGCOLORLIGHT 173, 216, 230 /* bkgnd color of LCD (backlight) */ -#define UI_LCD_BLACK 0, 0, 0 /* black */ +#define UI_LCD_FGCOLOR 0, 0, 0 /* foreground color of LCD (no backlight) */ +#define UI_LCD_FGCOLORLIGHT 0, 0, 0 /* foreground color of LCD (backlight) */ #define UI_LCD_POSX 109 /* x position of lcd */ #define UI_LCD_POSY 23 /* y position of lcd */ #define UI_LCD_WIDTH 160 #define UI_LCD_HEIGHT 128 #define UI_REMOTE_BGCOLOR 90, 145, 90 /* bkgnd of remote lcd (no bklight) */ #define UI_REMOTE_BGCOLORLIGHT 130, 180, 250 /* bkgnd of remote lcd (bklight) */ +#define UI_REMOTE_FGCOLOR 0, 0, 0 /* foreground color of remote LCD (no backlight) */ +#define UI_REMOTE_FGCOLORLIGHT 0, 0, 0 /* foreground color of remote LCD (backlight) */ #define UI_REMOTE_POSX 50 /* x position of remote lcd */ #define UI_REMOTE_POSY 403 /* y position of remote lcd */ #define UI_REMOTE_WIDTH 128 @@ -113,7 +120,8 @@ #define UI_HEIGHT 382 /* height of GUI window */ #define UI_LCD_BGCOLOR 100, 135, 100 /* bkgnd color of LCD (no backlight) */ #define UI_LCD_BGCOLORLIGHT 223, 216, 255 /* bkgnd color of LCD (backlight) */ -#define UI_LCD_BLACK 0, 0, 0 /* black */ +#define UI_LCD_FGCOLOR 0, 0, 0 /* foreground color of LCD (no backlight) */ +#define UI_LCD_FGCOLORLIGHT 0, 0, 0 /* foreground color of LCD (backlight) */ #define UI_LCD_POSX 32 /* x position of lcd */ #define UI_LCD_POSY 12 /* y position of lcd */ #define UI_LCD_WIDTH 160 @@ -125,7 +133,8 @@ #define UI_HEIGHT 389 /* height of GUI window */ #define UI_LCD_BGCOLOR 90, 145, 90 /* bkgnd color of LCD (no backlight) */ #define UI_LCD_BGCOLORLIGHT 173, 216, 230 /* bkgnd color of LCD (backlight) */ -#define UI_LCD_BLACK 0, 0, 0 /* black */ +#define UI_LCD_FGCOLOR 0, 0, 0 /* foreground color of LCD (no backlight) */ +#define UI_LCD_FGCOLORLIGHT 0, 0, 0 /* foreground color of LCD (backlight) */ #define UI_LCD_POSX 29 /* x position of lcd */ #define UI_LCD_POSY 16 /* y position of lcd */ #define UI_LCD_WIDTH 160 @@ -137,7 +146,8 @@ #define UI_HEIGHT 370 /* height of GUI window */ #define UI_LCD_BGCOLOR 90, 145, 90 /* bkgnd color of LCD (no backlight) */ #define UI_LCD_BGCOLORLIGHT 173, 216, 230 /* bkgnd color of LCD (backlight) */ -#define UI_LCD_BLACK 0, 0, 0 /* black */ +#define UI_LCD_FGCOLOR 0, 0, 0 /* foreground color of LCD (no backlight) */ +#define UI_LCD_FGCOLORLIGHT 0, 0, 0 /* foreground color of LCD (backlight) */ #define UI_LCD_POSX 19 /* x position of lcd */ #define UI_LCD_POSY 14 /* y position of lcd */ #define UI_LCD_WIDTH 160 @@ -149,7 +159,8 @@ #define UI_HEIGHT 365 /* height of GUI window */ #define UI_LCD_BGCOLOR 100, 135, 100 /* bkgnd color of LCD (no backlight) */ #define UI_LCD_BGCOLORLIGHT 223, 216, 255 /* bkgnd color of LCD (backlight) */ -#define UI_LCD_BLACK 0, 0, 0 /* black */ +#define UI_LCD_FGCOLOR 0, 0, 0 /* foreground color of LCD (no backlight) */ +#define UI_LCD_FGCOLORLIGHT 0, 0, 0 /* foreground color of LCD (backlight) */ #define UI_LCD_POSX 24 /* x position of lcd */ #define UI_LCD_POSY 17 /* y position of lcd */ #define UI_LCD_WIDTH 138 @@ -301,7 +312,8 @@ #define UI_HEIGHT 183 /* height of GUI window */ #define UI_LCD_BGCOLOR 94, 104, 84 /* bkgnd color of LCD (no backlight) */ #define UI_LCD_BGCOLORLIGHT 60, 160, 230 /* bkgnd color of LCD (backlight) */ -#define UI_LCD_BLACK 0, 0, 0 /* black */ +#define UI_LCD_FGCOLOR 0, 0, 0 /* foreground color of LCD (no backlight) */ +#define UI_LCD_FGCOLORLIGHT 0, 0, 0 /* foreground color of LCD (backlight) */ #define UI_LCD_POSX 115 /* x position of lcd */ #define UI_LCD_POSY 54 /* y position of lcd */ #define UI_LCD_WIDTH LCD_WIDTH /* * 1.5 */ @@ -318,15 +330,17 @@ #define UI_LCD_HEIGHT 240 #define UI_LCD_BGCOLOR 90, 145, 90 /* bkgnd color of LCD (no backlight) */ #define UI_LCD_BGCOLORLIGHT 173, 216, 230 /* bkgnd color of LCD (backlight) */ -#define UI_LCD_BLACK 0, 0, 0 /* black */ +#define UI_LCD_FGCOLOR 0, 0, 0 /* foreground color of LCD (no backlight) */ +#define UI_LCD_FGCOLORLIGHT 0, 0, 0 /* foreground color of LCD (backlight) */ #elif defined(MROBE_100) #define UI_TITLE "Olympus M:Robe 100" #define UI_WIDTH 247 /* width of GUI window */ #define UI_HEIGHT 416 /* height of GUI window */ -#define UI_LCD_BGCOLOR 94, 2, 2 /* bkgnd color of LCD (no backlight) */ -#define UI_LCD_BGCOLORLIGHT 241, 6, 3 /* bkgnd color of LCD (backlight) */ -#define UI_LCD_BLACK 0, 0, 0 /* black */ +#define UI_LCD_BGCOLOR 0, 0, 0 /* bkgnd color of LCD (no backlight) */ +#define UI_LCD_BGCOLORLIGHT 94, 2, 2 /* bkgnd color of LCD (backlight) */ +#define UI_LCD_FGCOLOR 50, 50, 50 /* foreground color of LCD (no backlight) */ +#define UI_LCD_FGCOLORLIGHT 241, 6, 3 /* foreground color of LCD (backlight) */ #define UI_LCD_POSX 43 /* x position of lcd */ #define UI_LCD_POSY 25 /* y position of lcd */ #define UI_LCD_WIDTH 160 @@ -342,7 +356,8 @@ #define UI_LCD_HEIGHT 240 #define UI_LCD_BGCOLOR 32, 32, 32 /* bkgnd color of LCD (no backlight) */ #define UI_LCD_BGCOLORLIGHT 192, 192, 192 /* bkgnd color of LCD (backlight) */ -#define UI_LCD_BLACK 0, 0, 0 /* black */ +#define UI_LCD_FGCOLOR 0, 0, 0 /* foreground color of LCD (no backlight) */ +#define UI_LCD_FGCOLORLIGHT 0, 0, 0 /* foreground color of LCD (backlight) */ #endif extern SDL_Surface *gui_surface; |