From 50d3928901069d908238930b880b878f3d760dd4 Mon Sep 17 00:00:00 2001 From: Karl Kurbjun Date: Mon, 3 Aug 2009 01:07:58 +0000 Subject: Blackjack: Use standard menu and add playback menu, use pluginlib high scores. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22126 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/lib/highscore.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'apps/plugins/lib/highscore.c') diff --git a/apps/plugins/lib/highscore.c b/apps/plugins/lib/highscore.c index 909c3a89ef..280c0c7724 100644 --- a/apps/plugins/lib/highscore.c +++ b/apps/plugins/lib/highscore.c @@ -120,7 +120,7 @@ bool highscore_would_update(int score, struct highscore *scores, } #ifdef HAVE_LCD_BITMAP -void highscore_show(int position, struct highscore *scores, int num_scores) +void highscore_show(int position, struct highscore *scores, int num_scores, bool show_level) { int i, w, h; char str[30]; @@ -141,7 +141,11 @@ void highscore_show(int position, struct highscore *scores, int num_scores) } rb->lcd_putsxy(LCD_WIDTH/2-w/2, MARGIN, "High Scores"); rb->lcd_putsxy(LCD_WIDTH/4-w/4,2*h, "Score"); - rb->lcd_putsxy(LCD_WIDTH*3/4-w/4,2*h, "Level"); + + /* Decide whether to display the level column or not */ + if(show_level) { + rb->lcd_putsxy(LCD_WIDTH*3/4-w/4,2*h, "Level"); + } for (i = 0; ilcd_putsxy (MARGIN,3*h + h*i, str); rb->snprintf (str, sizeof (str), "%d", scores[i].score); rb->lcd_putsxy (LCD_WIDTH/4-w/4,3*h + h*i, str); - rb->snprintf (str, sizeof (str), "%d", scores[i].level); - rb->lcd_putsxy (LCD_WIDTH*3/4-w/4,3*h + h*i, str); + + /* Decide whether to display the level column or not */ + if(show_level) { + rb->snprintf (str, sizeof (str), "%d", scores[i].level); + rb->lcd_putsxy (LCD_WIDTH*3/4-w/4,3*h + h*i, str); + } + if(i == position) { #ifdef HAVE_LCD_COLOR rb->lcd_set_foreground(LCD_WHITE); -- cgit v1.2.3