diff options
author | Björn Stenberg <bjorn@haxx.se> | 2002-06-10 13:24:27 +0000 |
---|---|---|
committer | Björn Stenberg <bjorn@haxx.se> | 2002-06-10 13:24:27 +0000 |
commit | 42770ea88ea44363f4a2765b6d491ed2a04e4bd5 (patch) | |
tree | 7f43bc90e71036263da592e2402d6cc0788c8bde /apps | |
parent | 76caee83580564447324cfd566dabd951755a145 (diff) | |
download | rockbox-42770ea88ea44363f4a2765b6d491ed2a04e4bd5.tar.gz rockbox-42770ea88ea44363f4a2765b6d491ed2a04e4bd5.zip |
Added filename scrolling
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@937 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r-- | apps/tree.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/apps/tree.c b/apps/tree.c index 7bb473f28e..01580e7104 100644 --- a/apps/tree.c +++ b/apps/tree.c @@ -154,14 +154,7 @@ static int showdir(char *path, int start) 6, MARGIN_Y+(i-start)*LINE_HEIGTH, 6, 8, true); #endif - if(len < TREE_MAX_LEN_DISPLAY) - lcd_puts(LINE_X, LINE_Y+i-start, dircacheptr[i]->name); - else { - char storage = dircacheptr[i]->name[TREE_MAX_LEN_DISPLAY]; - dircacheptr[i]->name[TREE_MAX_LEN_DISPLAY]=0; - lcd_puts(LINE_X, LINE_Y+i-start, dircacheptr[i]->name); - dircacheptr[i]->name[TREE_MAX_LEN_DISPLAY]=storage; - } + lcd_puts(LINE_X, LINE_Y+i-start, dircacheptr[i]->name); } return filesindir; @@ -235,6 +228,8 @@ bool dirbrowse(char *root) return -1; /* root is not a directory */ lcd_puts(0, dircursor, CURSOR_CHAR); + lcd_puts_scroll(LINE_X, LINE_Y+dircursor, + dircacheptr[start+dircursor]->name); #ifdef HAVE_LCD_BITMAP lcd_update(); #endif @@ -298,8 +293,8 @@ bool dirbrowse(char *root) dircursor=0; start=0; } else { - int len= - strlen(dircacheptr[dircursor+start]->name); + int len=strlen(dircacheptr[dircursor+start]->name); + lcd_stop_scroll(); if((len > 4) && !strcmp(&dircacheptr[dircursor+start]->name[len-4], ".m3u")) { @@ -369,6 +364,7 @@ bool dirbrowse(char *root) #else case BUTTON_MENU: #endif + lcd_stop_scroll(); main_menu(); /* restore display */ @@ -384,6 +380,11 @@ bool dirbrowse(char *root) break; } + + lcd_stop_scroll(); + lcd_puts_scroll(LINE_X, LINE_Y+dircursor, + dircacheptr[start+dircursor]->name); + lcd_update(); } |