diff options
Diffstat (limited to 'uisimulator/tree.c')
-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 c8d15ac5b9..5dfafe1824 100644 --- a/uisimulator/tree.c +++ b/uisimulator/tree.c | |||
@@ -32,7 +32,7 @@ | |||
32 | 32 | ||
33 | #define TREE_MAX_FILENAMELEN 64 | 33 | #define TREE_MAX_FILENAMELEN 64 |
34 | #define TREE_MAX_ON_SCREEN 7 | 34 | #define TREE_MAX_ON_SCREEN 7 |
35 | #define TREE_MAX_LEN_DISPLAY 17 /* max length that fits on screen */ | 35 | #define TREE_MAX_LEN_DISPLAY 16 /* max length that fits on screen */ |
36 | 36 | ||
37 | void browse_root(void) { | 37 | void browse_root(void) { |
38 | dirbrowse("/"); | 38 | dirbrowse("/"); |
@@ -45,11 +45,17 @@ struct entry { | |||
45 | }; | 45 | }; |
46 | 46 | ||
47 | #define LINE_Y 8 /* Y position the entry-list starts at */ | 47 | #define LINE_Y 8 /* Y position the entry-list starts at */ |
48 | #define LINE_X 6 /* X position the entry-list starts at */ | 48 | #define LINE_X 12 /* X position the entry-list starts at */ |
49 | #define LINE_HEIGTH 8 /* pixels for each text line */ | 49 | #define LINE_HEIGTH 8 /* pixels for each text line */ |
50 | 50 | ||
51 | #ifdef HAVE_LCD_BITMAP | 51 | #ifdef HAVE_LCD_BITMAP |
52 | 52 | ||
53 | static unsigned char fileimage[] = { | ||
54 | 0x60, 0x7f, 0x03, 0x63, 0x7f, 0x00 }; | ||
55 | |||
56 | static unsigned char dirimage[] = { | ||
57 | 0x3e, 0x26, 0x26, 0x24, 0x3c, 0x00 }; | ||
58 | |||
53 | int static | 59 | int static |
54 | showdir(char *path, struct entry *buffer, int start, int scrollpos, int* at_end) | 60 | showdir(char *path, struct entry *buffer, int start, int scrollpos, int* at_end) |
55 | { | 61 | { |
@@ -83,6 +89,9 @@ showdir(char *path, struct entry *buffer, int start, int scrollpos, int* at_end) | |||
83 | 89 | ||
84 | buffer[i].file = !(entry->attribute&ATTR_DIRECTORY); | 90 | buffer[i].file = !(entry->attribute&ATTR_DIRECTORY); |
85 | 91 | ||
92 | lcd_bitmap(buffer[i].file? | ||
93 | fileimage:dirimage, 6, LINE_Y+i*LINE_HEIGTH, 6, 8, TRUE); | ||
94 | |||
86 | if(len < TREE_MAX_LEN_DISPLAY) | 95 | if(len < TREE_MAX_LEN_DISPLAY) |
87 | lcd_puts(LINE_X, LINE_Y+i*LINE_HEIGTH, buffer[i].name, 0); | 96 | lcd_puts(LINE_X, LINE_Y+i*LINE_HEIGTH, buffer[i].name, 0); |
88 | else { | 97 | else { |