summaryrefslogtreecommitdiff
path: root/osd.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2000-07-26 17:42:48 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2000-07-26 17:42:48 +0200
commit59237584e97466aaa923579118f5ca6277d77f1b (patch)
tree64df7581dacb0106d557c743c3d949a10e3445ac /osd.c
parent2260fc961590edd31bea173ec8550f4fb0e31545 (diff)
downloadvdr-59237584e97466aaa923579118f5ca6277d77f1b.tar.gz
vdr-59237584e97466aaa923579118f5ca6277d77f1b.tar.bz2
Implemented page mode for menus
Diffstat (limited to 'osd.c')
-rw-r--r--osd.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/osd.c b/osd.c
index ee9ba287..3c323738 100644
--- a/osd.c
+++ b/osd.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: osd.c 1.4 2000/04/24 09:44:31 kls Exp $
+ * $Id: osd.c 1.5 2000/07/26 17:35:09 kls Exp $
*/
#include "osd.h"
@@ -166,14 +166,20 @@ void cOsdMenu::CursorUp(void)
{
if (current > 0) {
DisplayCurrent(false);
- if (--current < first) {
+ if (current == first) {
first -= MAXOSDITEMS;
if (first < 0)
first = 0;
+ if (current - MAXOSDITEMS > 0)
+ current -= MAXOSDITEMS;
+ else
+ current--;
Display();
}
- else
+ else {
+ current--;
DisplayCurrent(true);
+ }
}
}
@@ -182,14 +188,20 @@ void cOsdMenu::CursorDown(void)
int count = Count();
if (current < count - 1) {
DisplayCurrent(false);
- if (++current >= first + MAXOSDITEMS) {
+ if (current == first + MAXOSDITEMS - 1) {
first += MAXOSDITEMS;
if (first > count - MAXOSDITEMS)
first = count - MAXOSDITEMS;
+ if (current + MAXOSDITEMS < count)
+ current += MAXOSDITEMS;
+ else
+ current++;
Display();
}
- else
+ else {
+ current++;
DisplayCurrent(true);
+ }
}
}