From c0f74483844e57500097168166a302cc9c366002 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 9 Jun 2005 21:19:38 +0000 Subject: Martin Arver's fix to properly adapt the menu for the chosen font. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6644 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/solitaire.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'apps/plugins') diff --git a/apps/plugins/solitaire.c b/apps/plugins/solitaire.c index 72bf1958ce..9fc0062454 100644 --- a/apps/plugins/solitaire.c +++ b/apps/plugins/solitaire.c @@ -486,8 +486,8 @@ int solitaire_help(void){ /* the menu */ /* text displayed changes depending on the 'when' parameter */ -int solitaire_menu(unsigned char when) { - +int solitaire_menu(unsigned char when) +{ static char menu[2][MENU_LENGTH][13] = { { "Start Game", "", @@ -502,6 +502,10 @@ int solitaire_menu(unsigned char when) { int i; int cursor=0; int button; + int fh; + + rb->lcd_getstringsize("A", NULL, &fh); + fh++; if(when!=MENU_BEFOREGAME && when!=MENU_DURINGGAME) when = MENU_DURINGGAME; @@ -513,9 +517,9 @@ int solitaire_menu(unsigned char when) { rb->lcd_putsxy(20, 1, "Solitaire"); for(i = 0; ilcd_putsxy(1, 17+9*i, menu[when][i]); + rb->lcd_putsxy(1, 17+fh*i, menu[when][i]); if(cursor == i) - rb->lcd_invertrect(0,17-1+9*i, LCD_WIDTH, 9); + rb->lcd_invertrect(0,17+fh*i, LCD_WIDTH, fh); } rb->lcd_update(); -- cgit v1.2.3