diff options
author | Björn Stenberg <bjorn@haxx.se> | 2002-12-12 15:20:37 +0000 |
---|---|---|
committer | Björn Stenberg <bjorn@haxx.se> | 2002-12-12 15:20:37 +0000 |
commit | a2e98c1cd926efdbfd0fd9f43005068b7684efbe (patch) | |
tree | 66185d3ff83eac6daa66fd9ba0cfe4f464fa19f8 /apps/settings_menu.c | |
parent | 2950f6c1e72cf7d600dc03b8cdec162aa5ba4676 (diff) |
Merged Uwe Freese's bidirectional scrolling patch. Added configurable scroll step size and scroll start delay.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2974 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/settings_menu.c')
-rw-r--r-- | apps/settings_menu.c | 39 |
1 files changed, 36 insertions, 3 deletions
diff --git a/apps/settings_menu.c b/apps/settings_menu.c index 4342e9b2d5..95d3feaf25 100644 --- a/apps/settings_menu.c +++ b/apps/settings_menu.c @@ -399,10 +399,36 @@ static bool poweroff_idle_timer(void) static bool scroll_speed(void) { - return set_int(str(LANG_SCROLL), "", &global_settings.scroll_speed, - &lcd_scroll_speed, 1, 1, 30 ); + return set_int(str(LANG_SCROLL), "Hz", &global_settings.scroll_speed, + &lcd_scroll_speed, 1, 1, 10 ); } +#ifdef HAVE_LCD_BITMAP +static bool scroll_step(void) +{ + return set_int(str(LANG_SCROLL_STEP_EXAMPLE), "pixels", + &global_settings.scroll_step, + &lcd_scroll_step, 1, 1, LCD_WIDTH ); +} +#endif + +static bool scroll_delay(void) +{ + int dummy = global_settings.scroll_delay * (HZ/10); + int rc = set_int(str(LANG_SCROLL_DELAY), "ms", &dummy, + &lcd_scroll_delay, 100, 0, 2500 ); + global_settings.scroll_delay = dummy / (HZ/10); + return rc; +} + +#ifdef HAVE_LCD_BITMAP +static bool bidir_limit(void) +{ + return set_int(str(LANG_BIDIR_SCROLL), "%", &global_settings.bidir_limit, + &lcd_bidir_scroll, 25, 0, 200 ); +} +#endif + #ifdef HAVE_CHARGE_CTRL static bool deep_discharge(void) { @@ -636,7 +662,14 @@ static bool display_settings_menu(void) bool result; struct menu_items items[] = { - { str(LANG_SCROLL_MENU), scroll_speed }, + { str(LANG_SCROLL_MENU), scroll_speed }, +#ifdef HAVE_LCD_BITMAP + { str(LANG_SCROLL_STEP), scroll_step }, +#endif + { str(LANG_SCROLL_DELAY), scroll_delay }, +#ifdef HAVE_LCD_BITMAP + { str(LANG_BIDIR_SCROLL), bidir_limit }, +#endif { str(LANG_BACKLIGHT), backlight_timer }, { str(LANG_BACKLIGHT_ON_WHEN_CHARGING), backlight_on_when_charging }, { str(LANG_CONTRAST), contrast }, |