mirror of
https://github.com/vdr-projects/vdr.git
synced 2025-03-01 10:50:46 +00:00
Plugins can now have their own raw OSD
This commit is contained in:
23
menu.c
23
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.224 2002/11/10 16:05:15 kls Exp $
|
||||
* $Id: menu.c 1.225 2002/11/23 14:51:24 kls Exp $
|
||||
*/
|
||||
|
||||
#include "menu.h"
|
||||
@@ -2176,6 +2176,8 @@ cMenuPluginItem::cMenuPluginItem(const char *Name, int Index)
|
||||
#define STOP_RECORDING tr(" Stop recording ")
|
||||
#define ON_PRIMARY_INTERFACE tr("on primary interface")
|
||||
|
||||
cOsdObject *cMenuMain::pluginOsdObject = NULL;
|
||||
|
||||
cMenuMain::cMenuMain(bool Replaying, eOSState State)
|
||||
:cOsdMenu("")
|
||||
{
|
||||
@@ -2195,6 +2197,13 @@ cMenuMain::cMenuMain(bool Replaying, eOSState State)
|
||||
}
|
||||
}
|
||||
|
||||
cOsdObject *cMenuMain::PluginOsdObject(void)
|
||||
{
|
||||
cOsdObject *o = pluginOsdObject;
|
||||
pluginOsdObject = NULL;
|
||||
return o;
|
||||
}
|
||||
|
||||
void cMenuMain::Set(void)
|
||||
{
|
||||
Clear();
|
||||
@@ -2308,9 +2317,15 @@ eOSState cMenuMain::ProcessKey(eKeys Key)
|
||||
if (item) {
|
||||
cPlugin *p = cPluginManager::GetPlugin(item->PluginIndex());
|
||||
if (p) {
|
||||
cOsdMenu *menu = p->MainMenuAction();
|
||||
if (menu)
|
||||
return AddSubMenu(menu);
|
||||
cOsdObject *menu = p->MainMenuAction();
|
||||
if (menu) {
|
||||
if (menu->IsMenu())
|
||||
return AddSubMenu((cOsdMenu *)menu);
|
||||
else {
|
||||
pluginOsdObject = menu;
|
||||
return osPlugin;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
state = osEnd;
|
||||
|
Reference in New Issue
Block a user