From 9314a68db6d992fcc220e9bd5d8a7278199e2563 Mon Sep 17 00:00:00 2001 From: Björn Stenberg Date: Fri, 31 May 2002 09:04:51 +0000 Subject: Replaced - cursor with more suitable char for player git-svn-id: svn://svn.rockbox.org/rockbox/trunk@848 a1c6a512-1295-4272-9138-f99709370657 --- apps/menu.c | 14 ++++++++++++-- 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 { #define MENU_LINES 2 #endif +#ifdef HAVE_LCD_BITMAP +#define CURSOR_CHAR "-" +#else +#ifdef HAVE_NEW_CHARCELL_LCD +#define CURSOR_CHAR "\x7e" +#else +#define CURSOR_CHAR "\x89" +#endif +#endif + static struct menu menus[MAX_MENUS]; static bool inuse[MAX_MENUS] = { false }; @@ -57,7 +67,7 @@ static void menu_draw(int m) } /* place the cursor */ - lcd_puts(0, menus[m].cursor - menus[m].top, "-"); + lcd_puts(0, menus[m].cursor - menus[m].top, CURSOR_CHAR); lcd_update(); } @@ -85,7 +95,7 @@ static void put_cursor(int m, int target) } if (do_update) { - lcd_puts(0, menus[m].cursor - menus[m].top, "-"); + lcd_puts(0, menus[m].cursor - menus[m].top, CURSOR_CHAR); lcd_update(); } 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) #define LINE_Y 0 /* Y position the entry-list starts at */ #define LINE_X 2 /* X position the entry-list starts at */ #define LINE_HEIGTH 8 /* pixels for each text line */ +#define CURSOR_CHAR "-" extern unsigned char bitmap_icons_6x8[LastIcon][6]; @@ -76,6 +77,12 @@ extern unsigned char bitmap_icons_6x8[LastIcon][6]; #define LINE_Y 0 /* Y position the entry-list starts at */ #define LINE_X 1 /* X position the entry-list starts at */ +#ifdef HAVE_NEW_CHARCELL_LCD +#define CURSOR_CHAR "\x7e" +#else +#define CURSOR_CHAR "\x89" +#endif + #endif /* HAVE_LCD_BITMAP */ static int compare(const void* e1, const void* e2) @@ -182,7 +189,7 @@ bool dirbrowse(char *root) if (numentries == -1) return -1; /* root is not a directory */ - lcd_puts(0, dircursor, "-"); + lcd_puts(0, dircursor, CURSOR_CHAR); #ifdef HAVE_LCD_BITMAP lcd_update(); #endif @@ -217,7 +224,7 @@ bool dirbrowse(char *root) else start = dircursor = 0; numentries = showdir(currdir, start); - lcd_puts(0, LINE_Y+dircursor, "-"); + lcd_puts(0, LINE_Y+dircursor, CURSOR_CHAR); } else mpeg_stop(); @@ -254,7 +261,7 @@ bool dirbrowse(char *root) } numentries = showdir(currdir, start); - lcd_puts(0, LINE_Y+dircursor, "-"); + lcd_puts(0, LINE_Y+dircursor, CURSOR_CHAR); break; #ifdef HAVE_RECORDER_KEYPAD @@ -265,14 +272,14 @@ bool dirbrowse(char *root) if(dircursor) { lcd_puts(0, LINE_Y+dircursor, " "); dircursor--; - lcd_puts(0, LINE_Y+dircursor, "-"); + lcd_puts(0, LINE_Y+dircursor, CURSOR_CHAR); lcd_update(); } else { if (start) { start--; numentries = showdir(currdir, start); - lcd_puts(0, LINE_Y+dircursor, "-"); + lcd_puts(0, LINE_Y+dircursor, CURSOR_CHAR); } } break; @@ -286,12 +293,12 @@ bool dirbrowse(char *root) if(dircursor+1 < TREE_MAX_ON_SCREEN) { lcd_puts(0, LINE_Y+dircursor, " "); dircursor++; - lcd_puts(0, LINE_Y+dircursor, "-"); + lcd_puts(0, LINE_Y+dircursor, CURSOR_CHAR); } else { start++; numentries = showdir(currdir, start); - lcd_puts(0, LINE_Y+dircursor, "-"); + lcd_puts(0, LINE_Y+dircursor, CURSOR_CHAR); } } break; @@ -314,7 +321,7 @@ bool dirbrowse(char *root) lcd_setfont(0); #endif numentries = showdir(currdir, start); - lcd_puts(0, LINE_Y+dircursor, "-"); + lcd_puts(0, LINE_Y+dircursor, CURSOR_CHAR); break; } -- cgit v1.2.3