From 50a1dcb9dde78569a3ec8380932c9130e605f064 Mon Sep 17 00:00:00 2001 From: Mats Lidell Date: Sun, 26 Jan 2003 00:33:06 +0000 Subject: Cursor movement in the middle of the screen only moves the cursor. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3162 a1c6a512-1295-4272-9138-f99709370657 --- apps/player/keyboard.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'apps') diff --git a/apps/player/keyboard.c b/apps/player/keyboard.c index 15349a65fd..b33dcebbdf 100644 --- a/apps/player/keyboard.c +++ b/apps/player/keyboard.c @@ -92,6 +92,8 @@ int kbd_input(char* text, int buflen) int button_pressed; unsigned char temptext[12]; bool cursor_on=true; /* Blinking cursor control */ + int old_cursor_pos=0; /* Windowed cursor movement */ + int left_pos=0; lcd_clear_display(); @@ -99,13 +101,14 @@ int kbd_input(char* text, int buflen) int i, p; int len = strlen(text); - /* draw filename */ + /* draw input */ + if (old_cursor_pos7) { - i=cursor_pos-7; - } - + i = left_pos; while (p<10 && line[i]) { if (i == cursor_pos && cursor_on) { @@ -118,6 +121,7 @@ int kbd_input(char* text, int buflen) temptext[p]=0; lcd_puts(1, 0, temptext); cursor_on = !cursor_on; + old_cursor_pos=cursor_pos; switch (menu_line) { case MENU_LINE_INPUT: -- cgit v1.2.3