summaryrefslogtreecommitdiff
path: root/apps/menu.c
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2005-08-30 11:10:08 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2005-08-30 11:10:08 +0000
commitf43216ff0bc6fdf7c2339aefc6c56be09249ce06 (patch)
tree04f30ecbf442f66971ebb432c3382119f8238651 /apps/menu.c
parent5efbdb76aa15dc86f2158912b23ad64111ed0b90 (diff)
downloadrockbox-f43216ff0bc6fdf7c2339aefc6c56be09249ce06.zip
rockbox-f43216ff0bc6fdf7c2339aefc6c56be09249ce06.tar.gz
rockbox-f43216ff0bc6fdf7c2339aefc6c56be09249ce06.tar.bz2
rockbox-f43216ff0bc6fdf7c2339aefc6c56be09249ce06.tar.xz
Removed the line selector option, it is now always an inverse bar (except for the Player/Studio of course)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7423 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/menu.c')
-rw-r--r--apps/menu.c45
1 files changed, 10 insertions, 35 deletions
diff --git a/apps/menu.c b/apps/menu.c
index ad22047..3b0ee4d 100644
--- a/apps/menu.c
+++ b/apps/menu.c
@@ -59,8 +59,7 @@ struct menu {
/* pixel margins */
#define MARGIN_X (global_settings.scrollbar && \
- menu_lines < menus[m].itemcount ? SCROLLBAR_WIDTH : 0) +\
- CURSOR_WIDTH
+ menu_lines < menus[m].itemcount ? SCROLLBAR_WIDTH : 0)
#define MARGIN_Y (global_settings.statusbar ? STATUSBAR_HEIGHT : 0)
/* position the entry-list starts at */
@@ -73,7 +72,6 @@ struct menu {
the margins, so this is the amount of lines
we add to the cursor Y position to position
it on a line */
-#define CURSOR_WIDTH (global_settings.invert_cursor ? 0 : 4)
#define SCROLLBAR_X 0
#define SCROLLBAR_Y lcd_getymargin()
@@ -95,44 +93,19 @@ struct menu {
static struct menu menus[MAX_MENUS];
static bool inuse[MAX_MENUS] = { false };
+#ifdef HAVE_LCD_CHARCELLS
/* count in letter positions, NOT pixels */
void put_cursorxy(int x, int y, bool on)
{
-#ifdef HAVE_LCD_BITMAP
- int fh, fw;
- int xpos, ypos;
-
- /* check here instead of at every call (ugly, but cheap) */
- if (global_settings.invert_cursor)
- return;
-
- lcd_getstringsize("A", &fw, &fh);
- xpos = x*6;
- ypos = y*fh + lcd_getymargin();
- if ( fh > 8 )
- ypos += (fh - 8) / 2;
-#endif
-
/* place the cursor */
if(on) {
-#ifdef HAVE_LCD_BITMAP
- lcd_mono_bitmap(bitmap_icons_6x8[Icon_Cursor], xpos, ypos, 4, 8);
-#else
lcd_putc(x, y, CURSOR_CHAR);
-#endif
}
else {
-#if defined(HAVE_LCD_BITMAP)
- /* I use xy here since it needs to disregard the margins */
- lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
- lcd_fillrect (xpos, ypos, 4, 8);
- lcd_set_drawmode(DRMODE_SOLID);
-#else
lcd_putc(x, y, ' ');
-#endif
}
}
-
+#endif
void menu_draw(int m)
{
int i = 0;
@@ -180,18 +153,20 @@ void menu_draw(int m)
/* We want to scroll the line where the cursor is */
if((menus[m].cursor - menus[m].top)==(i-menus[m].top))
#ifdef HAVE_LCD_BITMAP
- if (global_settings.invert_cursor)
- lcd_puts_scroll_style(LINE_X, i-menus[m].top,
- P2STR(menus[m].items[i].desc), STYLE_INVERT);
- else
+ lcd_puts_scroll_style(LINE_X, i-menus[m].top,
+ P2STR(menus[m].items[i].desc), STYLE_INVERT);
+#else
+ lcd_puts_scroll(LINE_X, i-menus[m].top,
+ P2STR(menus[m].items[i].desc));
#endif
- lcd_puts_scroll(LINE_X, i-menus[m].top, P2STR(menus[m].items[i].desc));
else
lcd_puts(LINE_X, i-menus[m].top, P2STR(menus[m].items[i].desc));
}
+#ifdef HAVE_LCD_CHARCELLS
/* place the cursor */
put_cursorxy(CURSOR_X, menus[m].cursor - menus[m].top, true);
+#endif
#ifdef HAVE_LCD_BITMAP
if (global_settings.scrollbar && menus[m].itemcount > menu_lines)