From 306acbd2a11f2993dcde602b2d58748b918ade5a Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Sun, 18 May 2008 13:58:21 +0000 Subject: Reduce the info boxes height a little bit so the 3rd box fits again on Archos. * Use just 'Push' if the string 'Pushes' is too wide (Archos, M3, c200). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17571 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/sokoban.c | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) (limited to 'apps') diff --git a/apps/plugins/sokoban.c b/apps/plugins/sokoban.c index 9459f1e869..f372995f7d 100644 --- a/apps/plugins/sokoban.c +++ b/apps/plugins/sokoban.c @@ -815,31 +815,27 @@ static void update_screen(void) #else #define STAT_X COLS*SOKOBAN_TILESIZE #endif -#if LCD_HEIGHT >= 70 -#define STAT_Y (LCD_HEIGHT - 70)/2 -#else -#define STAT_Y (LCD_HEIGHT - 47)/2 -#endif +#define STAT_Y (LCD_HEIGHT - 64)/2 #define STAT_WIDTH (LCD_WIDTH - STAT_X) #define BOARD_WIDTH (LCD_WIDTH - STAT_WIDTH) #define BOARD_HEIGHT LCD_HEIGHT - rb->lcd_putsxy(STAT_X + 1, STAT_Y + 3, "Level"); + rb->lcd_putsxy(STAT_X + 1, STAT_Y + 2, "Level"); rb->snprintf(buf, sizeof(buf), "%d", current_info.level.index + 1); - rb->lcd_putsxy(STAT_X + 4, STAT_Y + 13, buf); - rb->lcd_putsxy(STAT_X + 1, STAT_Y + 26, "Moves"); + rb->lcd_putsxy(STAT_X + 4, STAT_Y + 12, buf); + rb->lcd_putsxy(STAT_X + 1, STAT_Y + 23, "Moves"); rb->snprintf(buf, sizeof(buf), "%d", current_info.level.moves); - rb->lcd_putsxy(STAT_X + 4, STAT_Y + 36, buf); - - rb->lcd_drawrect(STAT_X, STAT_Y + 0, STAT_WIDTH, 24); - rb->lcd_drawrect(STAT_X, STAT_Y + 23, STAT_WIDTH, 24); - -#if LCD_HEIGHT >= 70 - rb->lcd_putsxy(STAT_X + 1, STAT_Y + 49, "Pushes"); + rb->lcd_putsxy(STAT_X + 4, STAT_Y + 33, buf); +#if STAT_WIDTH < 38 + rb->lcd_putsxy(STAT_X + 1, STAT_Y + 44, "Push"); +#else + rb->lcd_putsxy(STAT_X + 1, STAT_Y + 44, "Pushes"); +#endif rb->snprintf(buf, sizeof(buf), "%d", current_info.level.pushes); - rb->lcd_putsxy(STAT_X + 4, STAT_Y + 59, buf); + rb->lcd_putsxy(STAT_X + 4, STAT_Y + 54, buf); - rb->lcd_drawrect(STAT_X, STAT_Y + 46, STAT_WIDTH, 24); -#endif + rb->lcd_drawrect(STAT_X, STAT_Y + 0, STAT_WIDTH, 64); + rb->lcd_hline(STAT_X, LCD_WIDTH - 1, STAT_Y + 21); + rb->lcd_hline(STAT_X, LCD_WIDTH - 1, STAT_Y + 42); #endif -- cgit v1.2.3