summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2008-05-18 13:58:21 +0000
committerJens Arnold <amiconn@rockbox.org>2008-05-18 13:58:21 +0000
commit306acbd2a11f2993dcde602b2d58748b918ade5a (patch)
treeb0b204df059823369d7ea640dd951373cb5920c4
parent5716f734ddaec4281a6dea4310c9ba32ee0f7bba (diff)
downloadrockbox-306acbd2a11f2993dcde602b2d58748b918ade5a.tar.gz
rockbox-306acbd2a11f2993dcde602b2d58748b918ade5a.zip
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
-rw-r--r--apps/plugins/sokoban.c32
1 files changed, 14 insertions, 18 deletions
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)
815#else 815#else
816#define STAT_X COLS*SOKOBAN_TILESIZE 816#define STAT_X COLS*SOKOBAN_TILESIZE
817#endif 817#endif
818#if LCD_HEIGHT >= 70 818#define STAT_Y (LCD_HEIGHT - 64)/2
819#define STAT_Y (LCD_HEIGHT - 70)/2
820#else
821#define STAT_Y (LCD_HEIGHT - 47)/2
822#endif
823#define STAT_WIDTH (LCD_WIDTH - STAT_X) 819#define STAT_WIDTH (LCD_WIDTH - STAT_X)
824#define BOARD_WIDTH (LCD_WIDTH - STAT_WIDTH) 820#define BOARD_WIDTH (LCD_WIDTH - STAT_WIDTH)
825#define BOARD_HEIGHT LCD_HEIGHT 821#define BOARD_HEIGHT LCD_HEIGHT
826 rb->lcd_putsxy(STAT_X + 1, STAT_Y + 3, "Level"); 822 rb->lcd_putsxy(STAT_X + 1, STAT_Y + 2, "Level");
827 rb->snprintf(buf, sizeof(buf), "%d", current_info.level.index + 1); 823 rb->snprintf(buf, sizeof(buf), "%d", current_info.level.index + 1);
828 rb->lcd_putsxy(STAT_X + 4, STAT_Y + 13, buf); 824 rb->lcd_putsxy(STAT_X + 4, STAT_Y + 12, buf);
829 rb->lcd_putsxy(STAT_X + 1, STAT_Y + 26, "Moves"); 825 rb->lcd_putsxy(STAT_X + 1, STAT_Y + 23, "Moves");
830 rb->snprintf(buf, sizeof(buf), "%d", current_info.level.moves); 826 rb->snprintf(buf, sizeof(buf), "%d", current_info.level.moves);
831 rb->lcd_putsxy(STAT_X + 4, STAT_Y + 36, buf); 827 rb->lcd_putsxy(STAT_X + 4, STAT_Y + 33, buf);
832 828#if STAT_WIDTH < 38
833 rb->lcd_drawrect(STAT_X, STAT_Y + 0, STAT_WIDTH, 24); 829 rb->lcd_putsxy(STAT_X + 1, STAT_Y + 44, "Push");
834 rb->lcd_drawrect(STAT_X, STAT_Y + 23, STAT_WIDTH, 24); 830#else
835 831 rb->lcd_putsxy(STAT_X + 1, STAT_Y + 44, "Pushes");
836#if LCD_HEIGHT >= 70 832#endif
837 rb->lcd_putsxy(STAT_X + 1, STAT_Y + 49, "Pushes");
838 rb->snprintf(buf, sizeof(buf), "%d", current_info.level.pushes); 833 rb->snprintf(buf, sizeof(buf), "%d", current_info.level.pushes);
839 rb->lcd_putsxy(STAT_X + 4, STAT_Y + 59, buf); 834 rb->lcd_putsxy(STAT_X + 4, STAT_Y + 54, buf);
840 835
841 rb->lcd_drawrect(STAT_X, STAT_Y + 46, STAT_WIDTH, 24); 836 rb->lcd_drawrect(STAT_X, STAT_Y + 0, STAT_WIDTH, 64);
842#endif 837 rb->lcd_hline(STAT_X, LCD_WIDTH - 1, STAT_Y + 21);
838 rb->lcd_hline(STAT_X, LCD_WIDTH - 1, STAT_Y + 42);
843 839
844#endif 840#endif
845 841