diff options
author | Björn Stenberg <bjorn@haxx.se> | 2002-05-31 09:04:51 +0000 |
---|---|---|
committer | Björn Stenberg <bjorn@haxx.se> | 2002-05-31 09:04:51 +0000 |
commit | 9314a68db6d992fcc220e9bd5d8a7278199e2563 (patch) | |
tree | fd57828904990fd9c86cf3bc36899ac20bfdb7a1 | |
parent | 3f7d6d5217a3e1a701779ed8adf2152d6fb3f003 (diff) | |
download | rockbox-9314a68db6d992fcc220e9bd5d8a7278199e2563.tar.gz rockbox-9314a68db6d992fcc220e9bd5d8a7278199e2563.zip |
Replaced - cursor with more suitable char for player
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@848 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/menu.c | 14 | ||||
-rw-r--r-- | apps/tree.c | 23 |
2 files changed, 27 insertions, 10 deletions
diff --git a/apps/menu.c b/apps/menu.c index a863925eca..b8c652c04a 100644 --- a/apps/menu.c +++ b/apps/menu.c | |||
@@ -38,6 +38,16 @@ struct menu { | |||
38 | #define MENU_LINES 2 | 38 | #define MENU_LINES 2 |
39 | #endif | 39 | #endif |
40 | 40 | ||
41 | #ifdef HAVE_LCD_BITMAP | ||
42 | #define CURSOR_CHAR "-" | ||
43 | #else | ||
44 | #ifdef HAVE_NEW_CHARCELL_LCD | ||
45 | #define CURSOR_CHAR "\x7e" | ||
46 | #else | ||
47 | #define CURSOR_CHAR "\x89" | ||
48 | #endif | ||
49 | #endif | ||
50 | |||
41 | static struct menu menus[MAX_MENUS]; | 51 | static struct menu menus[MAX_MENUS]; |
42 | static bool inuse[MAX_MENUS] = { false }; | 52 | static bool inuse[MAX_MENUS] = { false }; |
43 | 53 | ||
@@ -57,7 +67,7 @@ static void menu_draw(int m) | |||
57 | } | 67 | } |
58 | 68 | ||
59 | /* place the cursor */ | 69 | /* place the cursor */ |
60 | lcd_puts(0, menus[m].cursor - menus[m].top, "-"); | 70 | lcd_puts(0, menus[m].cursor - menus[m].top, CURSOR_CHAR); |
61 | 71 | ||
62 | lcd_update(); | 72 | lcd_update(); |
63 | } | 73 | } |
@@ -85,7 +95,7 @@ static void put_cursor(int m, int target) | |||
85 | } | 95 | } |
86 | 96 | ||
87 | if (do_update) { | 97 | if (do_update) { |
88 | lcd_puts(0, menus[m].cursor - menus[m].top, "-"); | 98 | lcd_puts(0, menus[m].cursor - menus[m].top, CURSOR_CHAR); |
89 | lcd_update(); | 99 | lcd_update(); |
90 | } | 100 | } |
91 | 101 | ||
diff --git a/apps/tree.c b/apps/tree.c index 53a4054ed2..822172a30c 100644 --- a/apps/tree.c +++ b/apps/tree.c | |||
@@ -66,6 +66,7 @@ void browse_root(void) | |||
66 | #define LINE_Y 0 /* Y position the entry-list starts at */ | 66 | #define LINE_Y 0 /* Y position the entry-list starts at */ |
67 | #define LINE_X 2 /* X position the entry-list starts at */ | 67 | #define LINE_X 2 /* X position the entry-list starts at */ |
68 | #define LINE_HEIGTH 8 /* pixels for each text line */ | 68 | #define LINE_HEIGTH 8 /* pixels for each text line */ |
69 | #define CURSOR_CHAR "-" | ||
69 | 70 | ||
70 | extern unsigned char bitmap_icons_6x8[LastIcon][6]; | 71 | extern unsigned char bitmap_icons_6x8[LastIcon][6]; |
71 | 72 | ||
@@ -76,6 +77,12 @@ extern unsigned char bitmap_icons_6x8[LastIcon][6]; | |||
76 | #define LINE_Y 0 /* Y position the entry-list starts at */ | 77 | #define LINE_Y 0 /* Y position the entry-list starts at */ |
77 | #define LINE_X 1 /* X position the entry-list starts at */ | 78 | #define LINE_X 1 /* X position the entry-list starts at */ |
78 | 79 | ||
80 | #ifdef HAVE_NEW_CHARCELL_LCD | ||
81 | #define CURSOR_CHAR "\x7e" | ||
82 | #else | ||
83 | #define CURSOR_CHAR "\x89" | ||
84 | #endif | ||
85 | |||
79 | #endif /* HAVE_LCD_BITMAP */ | 86 | #endif /* HAVE_LCD_BITMAP */ |
80 | 87 | ||
81 | static int compare(const void* e1, const void* e2) | 88 | static int compare(const void* e1, const void* e2) |
@@ -182,7 +189,7 @@ bool dirbrowse(char *root) | |||
182 | if (numentries == -1) | 189 | if (numentries == -1) |
183 | return -1; /* root is not a directory */ | 190 | return -1; /* root is not a directory */ |
184 | 191 | ||
185 | lcd_puts(0, dircursor, "-"); | 192 | lcd_puts(0, dircursor, CURSOR_CHAR); |
186 | #ifdef HAVE_LCD_BITMAP | 193 | #ifdef HAVE_LCD_BITMAP |
187 | lcd_update(); | 194 | lcd_update(); |
188 | #endif | 195 | #endif |
@@ -217,7 +224,7 @@ bool dirbrowse(char *root) | |||
217 | else | 224 | else |
218 | start = dircursor = 0; | 225 | start = dircursor = 0; |
219 | numentries = showdir(currdir, start); | 226 | numentries = showdir(currdir, start); |
220 | lcd_puts(0, LINE_Y+dircursor, "-"); | 227 | lcd_puts(0, LINE_Y+dircursor, CURSOR_CHAR); |
221 | } | 228 | } |
222 | else | 229 | else |
223 | mpeg_stop(); | 230 | mpeg_stop(); |
@@ -254,7 +261,7 @@ bool dirbrowse(char *root) | |||
254 | } | 261 | } |
255 | 262 | ||
256 | numentries = showdir(currdir, start); | 263 | numentries = showdir(currdir, start); |
257 | lcd_puts(0, LINE_Y+dircursor, "-"); | 264 | lcd_puts(0, LINE_Y+dircursor, CURSOR_CHAR); |
258 | break; | 265 | break; |
259 | 266 | ||
260 | #ifdef HAVE_RECORDER_KEYPAD | 267 | #ifdef HAVE_RECORDER_KEYPAD |
@@ -265,14 +272,14 @@ bool dirbrowse(char *root) | |||
265 | if(dircursor) { | 272 | if(dircursor) { |
266 | lcd_puts(0, LINE_Y+dircursor, " "); | 273 | lcd_puts(0, LINE_Y+dircursor, " "); |
267 | dircursor--; | 274 | dircursor--; |
268 | lcd_puts(0, LINE_Y+dircursor, "-"); | 275 | lcd_puts(0, LINE_Y+dircursor, CURSOR_CHAR); |
269 | lcd_update(); | 276 | lcd_update(); |
270 | } | 277 | } |
271 | else { | 278 | else { |
272 | if (start) { | 279 | if (start) { |
273 | start--; | 280 | start--; |
274 | numentries = showdir(currdir, start); | 281 | numentries = showdir(currdir, start); |
275 | lcd_puts(0, LINE_Y+dircursor, "-"); | 282 | lcd_puts(0, LINE_Y+dircursor, CURSOR_CHAR); |
276 | } | 283 | } |
277 | } | 284 | } |
278 | break; | 285 | break; |
@@ -286,12 +293,12 @@ bool dirbrowse(char *root) | |||
286 | if(dircursor+1 < TREE_MAX_ON_SCREEN) { | 293 | if(dircursor+1 < TREE_MAX_ON_SCREEN) { |
287 | lcd_puts(0, LINE_Y+dircursor, " "); | 294 | lcd_puts(0, LINE_Y+dircursor, " "); |
288 | dircursor++; | 295 | dircursor++; |
289 | lcd_puts(0, LINE_Y+dircursor, "-"); | 296 | lcd_puts(0, LINE_Y+dircursor, CURSOR_CHAR); |
290 | } | 297 | } |
291 | else { | 298 | else { |
292 | start++; | 299 | start++; |
293 | numentries = showdir(currdir, start); | 300 | numentries = showdir(currdir, start); |
294 | lcd_puts(0, LINE_Y+dircursor, "-"); | 301 | lcd_puts(0, LINE_Y+dircursor, CURSOR_CHAR); |
295 | } | 302 | } |
296 | } | 303 | } |
297 | break; | 304 | break; |
@@ -314,7 +321,7 @@ bool dirbrowse(char *root) | |||
314 | lcd_setfont(0); | 321 | lcd_setfont(0); |
315 | #endif | 322 | #endif |
316 | numentries = showdir(currdir, start); | 323 | numentries = showdir(currdir, start); |
317 | lcd_puts(0, LINE_Y+dircursor, "-"); | 324 | lcd_puts(0, LINE_Y+dircursor, CURSOR_CHAR); |
318 | 325 | ||
319 | break; | 326 | break; |
320 | } | 327 | } |