diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2005-10-02 09:59:30 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2005-10-02 09:59:30 +0200 |
commit | 23aa374e3d428512623675afa11ebf34e650ed7e (patch) | |
tree | eca819475382dd0e176b2a2d8e5b68d185ce1d75 /menu.c | |
parent | 704e17859f633ce54e75b0b06019037751b92b3d (diff) | |
download | vdr-23aa374e3d428512623675afa11ebf34e650ed7e.tar.gz vdr-23aa374e3d428512623675afa11ebf34e650ed7e.tar.bz2 |
Improved displaying 'sub-title' and 'bottom text' in the CAM menu
Diffstat (limited to 'menu.c')
-rw-r--r-- | menu.c | 27 |
1 files changed, 19 insertions, 8 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: menu.c 1.364 2005/10/01 10:12:32 kls Exp $ + * $Id: menu.c 1.365 2005/10/02 09:59:30 kls Exp $ */ #include "menu.h" @@ -1287,18 +1287,28 @@ eOSState cMenuCommands::ProcessKey(eKeys Key) cMenuCam::cMenuCam(cCiMenu *CiMenu) :cOsdMenu("") { + dsyslog("CAM: Menu ------------------"); ciMenu = CiMenu; selected = false; + offset = 0; if (ciMenu->Selectable()) SetHasHotkeys(); - SetTitle(ciMenu->TitleText() ? ciMenu->TitleText() : "CAM"); - for (int i = 0; i < ciMenu->NumEntries(); i++) + SetTitle(*ciMenu->TitleText() ? ciMenu->TitleText() : "CAM"); + dsyslog("CAM: %s", ciMenu->TitleText()); + if (*ciMenu->SubTitleText()) { + Add(new cOsdItem(ciMenu->SubTitleText(), osUnknown, false)); + offset = 1; + dsyslog("CAM: %s", ciMenu->SubTitleText()); + } + for (int i = 0; i < ciMenu->NumEntries(); i++) { Add(new cOsdItem(hk(ciMenu->Entry(i)))); - //XXX implement a clean way of displaying this: - Add(new cOsdItem(ciMenu->SubTitleText())); - Add(new cOsdItem(ciMenu->BottomText())); + dsyslog("CAM: %s", ciMenu->Entry(i)); + } + if (*ciMenu->BottomText()) { + Add(new cOsdItem(ciMenu->BottomText(), osUnknown, false)); + dsyslog("CAM: %s", ciMenu->BottomText()); + } Display(); - dsyslog("CAM: Menu - %s", ciMenu->TitleText()); } cMenuCam::~cMenuCam() @@ -1311,7 +1321,8 @@ cMenuCam::~cMenuCam() eOSState cMenuCam::Select(void) { if (ciMenu->Selectable()) { - ciMenu->Select(Current()); + ciMenu->Select(Current() - offset); + dsyslog("CAM: select %d", Current() - offset); selected = true; } return osEnd; |