diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2001-02-03 14:35:28 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2001-02-03 14:35:28 +0100 |
commit | caa96c00eaecd5f0c67f0575468dd088f2c8ee1e (patch) | |
tree | 5f016c95da5f294fa54ee6cb467ae9aeb3460302 /osd.c | |
parent | b79ccf22921a93ee79d844e9f777ce5d6bf5ee3c (diff) | |
download | vdr-caa96c00eaecd5f0c67f0575468dd088f2c8ee1e.tar.gz vdr-caa96c00eaecd5f0c67f0575468dd088f2c8ee1e.tar.bz2 |
Implemented page up/down with 'Left'/'Right'
Diffstat (limited to 'osd.c')
-rw-r--r-- | osd.c | 36 |
1 files changed, 35 insertions, 1 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: osd.c 1.13 2000/11/12 15:29:25 kls Exp $ + * $Id: osd.c 1.14 2001/02/03 14:26:18 kls Exp $ */ #include "osd.h" @@ -252,6 +252,36 @@ void cOsdMenu::CursorDown(void) } } +void cOsdMenu::PageUp(void) +{ + if (Count() <= MAXOSDITEMS) + return; + int relpos = current - first; + current -= MAXOSDITEMS; + first -= MAXOSDITEMS; + if (first < 0) { + first = Count() - MAXOSDITEMS; + current = first + relpos; + } + Display(); + DisplayCurrent(true); +} + +void cOsdMenu::PageDown(void) +{ + if (Count() <= MAXOSDITEMS) + return; + int relpos = current - first; + current += MAXOSDITEMS; + first += MAXOSDITEMS; + if (current > Count() - 1) { + first = 0; + current = first + relpos; + } + Display(); + DisplayCurrent(true); +} + void cOsdMenu::Mark(void) { if (Count() && marked < 0) { @@ -293,6 +323,10 @@ eOSState cOsdMenu::ProcessKey(eKeys Key) case kUp: CursorUp(); break; case kDown|k_Repeat: case kDown: CursorDown(); break; + case kLeft|k_Repeat: + case kLeft: PageUp(); break; + case kRight|k_Repeat: + case kRight: PageDown(); break; case kBack: return osBack; case kOk: if (marked >= 0) { SetStatus(NULL); |