diff options
author | Daniel Stenberg <daniel@haxx.se> | 2005-06-09 21:19:38 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2005-06-09 21:19:38 +0000 |
commit | c0f74483844e57500097168166a302cc9c366002 (patch) | |
tree | 824bd52db8507d7905f7bd2fe8600fae000a9b33 | |
parent | 0bcc64cb4c80d8f8e245fc8630e8732b64882245 (diff) | |
download | rockbox-c0f74483844e57500097168166a302cc9c366002.tar.gz rockbox-c0f74483844e57500097168166a302cc9c366002.zip |
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
-rw-r--r-- | apps/plugins/solitaire.c | 12 |
1 files changed, 8 insertions, 4 deletions
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){ | |||
486 | 486 | ||
487 | /* the menu */ | 487 | /* the menu */ |
488 | /* text displayed changes depending on the 'when' parameter */ | 488 | /* text displayed changes depending on the 'when' parameter */ |
489 | int solitaire_menu(unsigned char when) { | 489 | int solitaire_menu(unsigned char when) |
490 | 490 | { | |
491 | static char menu[2][MENU_LENGTH][13] = | 491 | static char menu[2][MENU_LENGTH][13] = |
492 | { { "Start Game", | 492 | { { "Start Game", |
493 | "", | 493 | "", |
@@ -502,6 +502,10 @@ int solitaire_menu(unsigned char when) { | |||
502 | int i; | 502 | int i; |
503 | int cursor=0; | 503 | int cursor=0; |
504 | int button; | 504 | int button; |
505 | int fh; | ||
506 | |||
507 | rb->lcd_getstringsize("A", NULL, &fh); | ||
508 | fh++; | ||
505 | 509 | ||
506 | if(when!=MENU_BEFOREGAME && when!=MENU_DURINGGAME) | 510 | if(when!=MENU_BEFOREGAME && when!=MENU_DURINGGAME) |
507 | when = MENU_DURINGGAME; | 511 | when = MENU_DURINGGAME; |
@@ -513,9 +517,9 @@ int solitaire_menu(unsigned char when) { | |||
513 | rb->lcd_putsxy(20, 1, "Solitaire"); | 517 | rb->lcd_putsxy(20, 1, "Solitaire"); |
514 | 518 | ||
515 | for(i = 0; i<MENU_LENGTH; i++){ | 519 | for(i = 0; i<MENU_LENGTH; i++){ |
516 | rb->lcd_putsxy(1, 17+9*i, menu[when][i]); | 520 | rb->lcd_putsxy(1, 17+fh*i, menu[when][i]); |
517 | if(cursor == i) | 521 | if(cursor == i) |
518 | rb->lcd_invertrect(0,17-1+9*i, LCD_WIDTH, 9); | 522 | rb->lcd_invertrect(0,17+fh*i, LCD_WIDTH, fh); |
519 | } | 523 | } |
520 | 524 | ||
521 | rb->lcd_update(); | 525 | rb->lcd_update(); |