diff options
| author | Daniel Stenberg <daniel@haxx.se> | 2002-05-07 22:56:01 +0000 |
|---|---|---|
| committer | Daniel Stenberg <daniel@haxx.se> | 2002-05-07 22:56:01 +0000 |
| commit | 4674e870173ec46bfd2eb6b552aadc04669fd830 (patch) | |
| tree | 4ed3e010b3bc2a59481319656d894a695a339f53 | |
| parent | 802740cd88f82ed83dc11f299ada3264d015add0 (diff) | |
| download | rockbox-4674e870173ec46bfd2eb6b552aadc04669fd830.zip rockbox-4674e870173ec46bfd2eb6b552aadc04669fd830.tar.gz rockbox-4674e870173ec46bfd2eb6b552aadc04669fd830.tar.bz2 rockbox-4674e870173ec46bfd2eb6b552aadc04669fd830.tar.xz | |
my little icons in front of the files/dirs to show what kind of entry it
is, similar to how the Archos firmware works
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@500 a1c6a512-1295-4272-9138-f99709370657
| -rw-r--r-- | uisimulator/tree.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/uisimulator/tree.c b/uisimulator/tree.c index c8d15ac..5dfafe1 100644 --- a/uisimulator/tree.c +++ b/uisimulator/tree.c @@ -32,7 +32,7 @@ #define TREE_MAX_FILENAMELEN 64 #define TREE_MAX_ON_SCREEN 7 -#define TREE_MAX_LEN_DISPLAY 17 /* max length that fits on screen */ +#define TREE_MAX_LEN_DISPLAY 16 /* max length that fits on screen */ void browse_root(void) { dirbrowse("/"); @@ -45,11 +45,17 @@ struct entry { }; #define LINE_Y 8 /* Y position the entry-list starts at */ -#define LINE_X 6 /* X position the entry-list starts at */ +#define LINE_X 12 /* X position the entry-list starts at */ #define LINE_HEIGTH 8 /* pixels for each text line */ #ifdef HAVE_LCD_BITMAP +static unsigned char fileimage[] = { + 0x60, 0x7f, 0x03, 0x63, 0x7f, 0x00 }; + +static unsigned char dirimage[] = { + 0x3e, 0x26, 0x26, 0x24, 0x3c, 0x00 }; + int static showdir(char *path, struct entry *buffer, int start, int scrollpos, int* at_end) { @@ -83,6 +89,9 @@ showdir(char *path, struct entry *buffer, int start, int scrollpos, int* at_end) buffer[i].file = !(entry->attribute&ATTR_DIRECTORY); + lcd_bitmap(buffer[i].file? + fileimage:dirimage, 6, LINE_Y+i*LINE_HEIGTH, 6, 8, TRUE); + if(len < TREE_MAX_LEN_DISPLAY) lcd_puts(LINE_X, LINE_Y+i*LINE_HEIGTH, buffer[i].name, 0); else { |