mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Improved displaying 'sub-title' and 'bottom text' in the CAM menu
This commit is contained in:
parent
704e17859f
commit
23aa374e3d
1
HISTORY
1
HISTORY
@ -3868,3 +3868,4 @@ Video Disk Recorder Revision History
|
||||
Richter).
|
||||
- Fixed setting current menu item if the first one is non-selectable.
|
||||
- cOsdItem::cOsdItem() now has a 'Selectable' parameter.
|
||||
- Improved displaying 'sub-title' and 'bottom text' in the CAM menu.
|
||||
|
27
menu.c
27
menu.c
@ -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;
|
||||
|
3
menu.h
3
menu.h
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: menu.h 1.74 2005/09/25 09:03:32 kls Exp $
|
||||
* $Id: menu.h 1.75 2005/10/02 09:59:30 kls Exp $
|
||||
*/
|
||||
|
||||
#ifndef __MENU_H
|
||||
@ -120,6 +120,7 @@ class cMenuCam : public cOsdMenu {
|
||||
private:
|
||||
cCiMenu *ciMenu;
|
||||
bool selected;
|
||||
int offset;
|
||||
eOSState Select(void);
|
||||
public:
|
||||
cMenuCam(cCiMenu *CiMenu);
|
||||
|
Loading…
Reference in New Issue
Block a user