summaryrefslogtreecommitdiff
path: root/apps/plugins
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2005-06-09 21:19:38 +0000
committerDaniel Stenberg <daniel@haxx.se>2005-06-09 21:19:38 +0000
commitc0f74483844e57500097168166a302cc9c366002 (patch)
tree824bd52db8507d7905f7bd2fe8600fae000a9b33 /apps/plugins
parent0bcc64cb4c80d8f8e245fc8630e8732b64882245 (diff)
downloadrockbox-c0f74483844e57500097168166a302cc9c366002.zip
rockbox-c0f74483844e57500097168166a302cc9c366002.tar.gz
rockbox-c0f74483844e57500097168166a302cc9c366002.tar.bz2
rockbox-c0f74483844e57500097168166a302cc9c366002.tar.xz
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
Diffstat (limited to 'apps/plugins')
-rw-r--r--apps/plugins/solitaire.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/apps/plugins/solitaire.c b/apps/plugins/solitaire.c
index 72bf195..9fc0062 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; i<MENU_LENGTH; i++){
- rb->lcd_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();