summaryrefslogtreecommitdiff
path: root/osdbase.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2015-09-10 11:26:15 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2015-09-10 11:26:15 +0200
commit14f97d0f2a84aaca2b13638db406e629ceb4785f (patch)
treee50e55540370d24eea273884efa8824174e70bc8 /osdbase.c
parent75f28cb0cb66543419a0952eb1988c626ecd7e9e (diff)
downloadvdr-14f97d0f2a84aaca2b13638db406e629ceb4785f.tar.gz
vdr-14f97d0f2a84aaca2b13638db406e629ceb4785f.tar.bz2
Skins can now implement cSkinDisplayMenu::MenuOrientation() to display horizontal menus
Diffstat (limited to 'osdbase.c')
-rw-r--r--osdbase.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/osdbase.c b/osdbase.c
index e03f2d07..52ab240e 100644
--- a/osdbase.c
+++ b/osdbase.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: osdbase.c 3.3 2015/01/15 10:11:11 kls Exp $
+ * $Id: osdbase.c 4.1 2015/09/10 11:23:07 kls Exp $
*/
#include "osdbase.h"
@@ -87,6 +87,7 @@ cOsdMenu::cOsdMenu(const char *Title, int c0, int c1, int c2, int c3, int c4)
title = NULL;
menuCategory = mcUnknown;
menuSortMode = msmUnknown;
+ menuOrientation = moVertical;
SetTitle(Title);
SetCols(c0, c1, c2, c3, c4);
first = 0;
@@ -231,6 +232,7 @@ void cOsdMenu::Display(void)
if (menuCategory != displayMenu->MenuCategory())
displayMenu->SetMenuCategory(menuCategory);
displayMenu->SetMenuSortMode(menuSortMode);
+ menuOrientation = displayMenu->MenuOrientation();
displayMenuItems = displayMenu->MaxItems();
displayMenu->SetTabs(cols[0], cols[1], cols[2], cols[3], cols[4]);//XXX
displayMenu->SetTitle(title);
@@ -541,13 +543,13 @@ eOSState cOsdMenu::ProcessKey(eKeys Key)
case k0: return osUnknown;
case k1...k9: return hasHotkeys ? HotKey(Key) : osUnknown;
case kUp|k_Repeat:
- case kUp: CursorUp(); break;
+ case kUp: if (menuOrientation == moHorizontal) PageUp(); else CursorUp(); break;
case kDown|k_Repeat:
- case kDown: CursorDown(); break;
+ case kDown: if (menuOrientation == moHorizontal) PageDown(); else CursorDown(); break;
case kLeft|k_Repeat:
- case kLeft: PageUp(); break;
+ case kLeft: if (menuOrientation == moHorizontal) CursorUp(); else PageUp(); break;
case kRight|k_Repeat:
- case kRight: PageDown(); break;
+ case kRight: if (menuOrientation == moHorizontal) CursorDown(); else PageDown(); break;
case kBack: return osBack;
case kOk: if (marked >= 0) {
SetStatus(NULL);