mirror of
https://projects.vdr-developer.org/git/vdr-plugin-skindesigner.git
synced 2023-10-19 17:58:31 +02:00
Merge branch 'master' into plugininterface
This commit is contained in:
commit
0341add15e
6
HISTORY
6
HISTORY
@ -192,3 +192,9 @@ Version 0.2.1
|
|||||||
|
|
||||||
- fixed bug that global tokens were not parsed correctly
|
- fixed bug that global tokens were not parsed correctly
|
||||||
- added finnish translation
|
- added finnish translation
|
||||||
|
- some more nopacity optimizations - thanx@utility
|
||||||
|
- added possibiliy to use submenus in the skin setup menus
|
||||||
|
- reloading active skin directly after closing setup menu so that
|
||||||
|
changes of setup parameters are immediately in use
|
||||||
|
|
||||||
|
Version 0.2.2
|
||||||
|
14
config.c
14
config.c
@ -25,6 +25,7 @@ cDesignerConfig::cDesignerConfig() {
|
|||||||
SetOSDSize();
|
SetOSDSize();
|
||||||
SetOSDFonts();
|
SetOSDFonts();
|
||||||
osdLanguage = "";
|
osdLanguage = "";
|
||||||
|
setupCloseDoReload = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
cDesignerConfig::~cDesignerConfig() {
|
cDesignerConfig::~cDesignerConfig() {
|
||||||
@ -88,7 +89,7 @@ void cDesignerConfig::DebugSkinSetups(void) {
|
|||||||
dsyslog("skindesigner: skin setups:");
|
dsyslog("skindesigner: skin setups:");
|
||||||
InitSetupIterator();
|
InitSetupIterator();
|
||||||
cSkinSetup *skinSetup = NULL;
|
cSkinSetup *skinSetup = NULL;
|
||||||
while (skinSetup = GetSkinSetup()) {
|
while (skinSetup = GetNextSkinSetup()) {
|
||||||
skinSetup->Debug();
|
skinSetup->Debug();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -125,7 +126,7 @@ cSkinSetup* cDesignerConfig::GetSkinSetup(string &skin) {
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
cSkinSetup* cDesignerConfig::GetSkinSetup(void) {
|
cSkinSetup* cDesignerConfig::GetNextSkinSetup(void) {
|
||||||
if (setupIt == skinSetups.end()) {
|
if (setupIt == skinSetups.end()) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -134,6 +135,15 @@ cSkinSetup* cDesignerConfig::GetSkinSetup(void) {
|
|||||||
return skinSetup;
|
return skinSetup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cSkinSetupMenu* cDesignerConfig::GetSkinSetupMenu(string &skin, string &menu) {
|
||||||
|
cSkinSetup *skinSetup = GetSkinSetup(skin);
|
||||||
|
if (!skinSetup)
|
||||||
|
return NULL;
|
||||||
|
esyslog("skindesigner: skinsetup found");
|
||||||
|
return skinSetup->GetMenu(menu);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void cDesignerConfig::TranslateSetup(void) {
|
void cDesignerConfig::TranslateSetup(void) {
|
||||||
for (map< string, cSkinSetup* >::iterator it = skinSetups.begin(); it != skinSetups.end(); it++) {
|
for (map< string, cSkinSetup* >::iterator it = skinSetups.begin(); it != skinSetups.end(); it++) {
|
||||||
(it->second)->TranslateSetup();
|
(it->second)->TranslateSetup();
|
||||||
|
5
config.h
5
config.h
@ -49,7 +49,8 @@ public:
|
|||||||
void DebugSkinSetups(void);
|
void DebugSkinSetups(void);
|
||||||
void DebugSkinSetupParameters(void);
|
void DebugSkinSetupParameters(void);
|
||||||
cSkinSetup* GetSkinSetup(string &skin);
|
cSkinSetup* GetSkinSetup(string &skin);
|
||||||
cSkinSetup* GetSkinSetup(void);
|
cSkinSetup* GetNextSkinSetup(void);
|
||||||
|
cSkinSetupMenu* GetSkinSetupMenu(string &skin, string &menu);
|
||||||
void InitSetupIterator(void) { setupIt = skinSetups.begin(); };
|
void InitSetupIterator(void) { setupIt = skinSetups.begin(); };
|
||||||
void TranslateSetup(void);
|
void TranslateSetup(void);
|
||||||
void SetSkinSetupParameters(void);
|
void SetSkinSetupParameters(void);
|
||||||
@ -85,6 +86,8 @@ public:
|
|||||||
int rerunDistance;
|
int rerunDistance;
|
||||||
int rerunMaxChannel;
|
int rerunMaxChannel;
|
||||||
int blockFlush;
|
int blockFlush;
|
||||||
|
//TemplateReload on Setup Close
|
||||||
|
bool setupCloseDoReload;
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef DEFINE_CONFIG
|
#ifdef DEFINE_CONFIG
|
||||||
|
@ -163,8 +163,8 @@ void cSkinDesigner::ListCustomTokens(void) {
|
|||||||
* PRIVATE FUNCTIONS
|
* PRIVATE FUNCTIONS
|
||||||
*********************************************************************************/
|
*********************************************************************************/
|
||||||
void cSkinDesigner::Init(void) {
|
void cSkinDesigner::Init(void) {
|
||||||
if (init || config.OsdSizeChanged() || config.SkinChanged() || config.OsdLanguageChanged()) {
|
if (init || config.OsdSizeChanged() || config.SkinChanged() || config.OsdLanguageChanged() || config.setupCloseDoReload) {
|
||||||
|
config.setupCloseDoReload = false;
|
||||||
if (init) {
|
if (init) {
|
||||||
config.SetSkin();
|
config.SetSkin();
|
||||||
config.SetOSDSize();
|
config.SetOSDSize();
|
||||||
|
@ -1,9 +1,15 @@
|
|||||||
<?xml encoding="UTF-8"?>
|
<?xml encoding="UTF-8"?>
|
||||||
|
|
||||||
<!ELEMENT setup (parameters,translations)>
|
<!ELEMENT setup (menu,translations)>
|
||||||
<!ELEMENT parameters (parameter)*>
|
<!ELEMENT menu (submenu | parameter)*>
|
||||||
<!ELEMENT translations (token)*>
|
<!ELEMENT translations (token)*>
|
||||||
|
|
||||||
|
<!ELEMENT submenu (submenu | parameter)*>
|
||||||
|
<!ATTLIST submenu
|
||||||
|
name NMTOKEN #REQUIRED
|
||||||
|
displaytext CDATA #REQUIRED
|
||||||
|
>
|
||||||
|
|
||||||
<!ELEMENT parameter (#PCDATA)>
|
<!ELEMENT parameter (#PCDATA)>
|
||||||
<!ATTLIST parameter
|
<!ATTLIST parameter
|
||||||
name NMTOKEN #REQUIRED
|
name NMTOKEN #REQUIRED
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#include "skinsetup.h"
|
#include "skinsetup.h"
|
||||||
|
#include "../config.h"
|
||||||
#include "../libtemplate/xmlparser.h"
|
#include "../libtemplate/xmlparser.h"
|
||||||
|
|
||||||
// --- cSkinSetupParameter -----------------------------------------------------------
|
// --- cSkinSetupParameter -----------------------------------------------------------
|
||||||
@ -23,76 +24,192 @@ void cSkinSetupParameter::Debug(void) {
|
|||||||
dsyslog("skindesigner: min %d, max %d", min, max);
|
dsyslog("skindesigner: min %d, max %d", min, max);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// --- cSkinSetupMenu -----------------------------------------------------------
|
||||||
|
cSkinSetupMenu::cSkinSetupMenu(void) {
|
||||||
|
name = "";
|
||||||
|
displayText = "";
|
||||||
|
parent = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
cSkinSetupMenu::~cSkinSetupMenu(void) {
|
||||||
|
for (map < string, cSkinSetupParameter* >::iterator p = parameters.begin(); p != parameters.end(); p++) {
|
||||||
|
delete p->second;
|
||||||
|
}
|
||||||
|
for (vector < cSkinSetupMenu* >::iterator s = subMenus.begin(); s != subMenus.end(); s++) {
|
||||||
|
delete (*s);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
cSkinSetupParameter *cSkinSetupMenu::GetNextParameter(bool deep) {
|
||||||
|
cSkinSetupParameter *param = NULL;
|
||||||
|
if (paramIt != parameters.end()) {
|
||||||
|
param = paramIt->second;
|
||||||
|
paramIt++;
|
||||||
|
return param;
|
||||||
|
}
|
||||||
|
if (!deep)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
if (subMenuIt != subMenus.end()) {
|
||||||
|
param = (*subMenuIt)->GetNextParameter();
|
||||||
|
if (!param) {
|
||||||
|
subMenuIt++;
|
||||||
|
if (subMenuIt != subMenus.end()) {
|
||||||
|
(*subMenuIt)->InitIterators();
|
||||||
|
param = (*subMenuIt)->GetNextParameter();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return param;
|
||||||
|
}
|
||||||
|
|
||||||
|
cSkinSetupParameter *cSkinSetupMenu::GetParameter(string name) {
|
||||||
|
map < string, cSkinSetupParameter* >::iterator hit = parameters.find(name);
|
||||||
|
if (hit != parameters.end())
|
||||||
|
return hit->second;
|
||||||
|
|
||||||
|
cSkinSetupParameter *paramHit = NULL;
|
||||||
|
for (vector < cSkinSetupMenu* >::iterator subMenu = subMenus.begin(); subMenu != subMenus.end(); subMenu++) {
|
||||||
|
paramHit = (*subMenu)->GetParameter(name);
|
||||||
|
if (paramHit)
|
||||||
|
return paramHit;
|
||||||
|
}
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
void cSkinSetupMenu::InitIterators(void) {
|
||||||
|
paramIt = parameters.begin();
|
||||||
|
subMenuIt = subMenus.begin();
|
||||||
|
while (subMenuIt != subMenus.end()) {
|
||||||
|
(*subMenuIt)->InitIterators();
|
||||||
|
subMenuIt++;
|
||||||
|
}
|
||||||
|
subMenuIt = subMenus.begin();
|
||||||
|
}
|
||||||
|
|
||||||
|
void cSkinSetupMenu::SetParameter(eSetupParameterType paramType, xmlChar *name, xmlChar* displayText, xmlChar *min, xmlChar *max, xmlChar *value) {
|
||||||
|
cSkinSetupParameter *param = new cSkinSetupParameter();
|
||||||
|
param->type = paramType;
|
||||||
|
param->name = (const char*)name;
|
||||||
|
param->displayText = (const char*)displayText;
|
||||||
|
|
||||||
|
if (min && paramType == sptInt) {
|
||||||
|
param->min = atoi((const char*)min);
|
||||||
|
}
|
||||||
|
if (max && paramType == sptInt) {
|
||||||
|
param->max = atoi((const char*)max);
|
||||||
|
}
|
||||||
|
param->value = atoi((const char*)value);
|
||||||
|
|
||||||
|
parameters.insert(pair< string, cSkinSetupParameter* >(param->name, param));
|
||||||
|
}
|
||||||
|
|
||||||
|
cSkinSetupMenu *cSkinSetupMenu::GetMenu(string &name) {
|
||||||
|
for (vector<cSkinSetupMenu*>::iterator m = subMenus.begin(); m != subMenus.end(); m++) {
|
||||||
|
cSkinSetupMenu *menu = (*m);
|
||||||
|
if (!name.compare(menu->GetName()))
|
||||||
|
return menu;
|
||||||
|
menu = menu->GetMenu(name);
|
||||||
|
if (menu)
|
||||||
|
return menu;
|
||||||
|
}
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
cSkinSetupMenu *cSkinSetupMenu::GetNextSubMenu(bool deep) {
|
||||||
|
cSkinSetupMenu *menu = NULL;
|
||||||
|
if (subMenuIt != subMenus.end()) {
|
||||||
|
if (deep) {
|
||||||
|
menu = (*subMenuIt)->GetNextSubMenu(deep);
|
||||||
|
if (menu)
|
||||||
|
return menu;
|
||||||
|
}
|
||||||
|
menu = *subMenuIt;
|
||||||
|
subMenuIt++;
|
||||||
|
return menu;
|
||||||
|
}
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void cSkinSetupMenu::Debug(bool deep) {
|
||||||
|
dsyslog("skindesigner: Menu %s Setup Parameters", name.c_str());
|
||||||
|
for (map < string, cSkinSetupParameter* >::iterator p = parameters.begin(); p != parameters.end(); p++) {
|
||||||
|
(p->second)->Debug();
|
||||||
|
}
|
||||||
|
if (subMenus.empty())
|
||||||
|
return;
|
||||||
|
for (vector < cSkinSetupMenu* >::iterator s = subMenus.begin(); s != subMenus.end(); s++) {
|
||||||
|
dsyslog("skindesigner: SubMenu %s, Parent %s", ((*s)->GetName()).c_str(), ((*s)->GetParent()->GetName()).c_str());
|
||||||
|
if (deep)
|
||||||
|
(*s)->Debug();
|
||||||
|
}
|
||||||
|
}
|
||||||
// --- cSkinSetup -----------------------------------------------------------
|
// --- cSkinSetup -----------------------------------------------------------
|
||||||
|
|
||||||
cSkinSetup::cSkinSetup(string skin) {
|
cSkinSetup::cSkinSetup(string skin) {
|
||||||
this->skin = skin;
|
this->skin = skin;
|
||||||
|
rootMenu = new cSkinSetupMenu();
|
||||||
|
rootMenu->SetName("root");
|
||||||
|
currentMenu = rootMenu;
|
||||||
}
|
}
|
||||||
|
|
||||||
cSkinSetup::~cSkinSetup() {
|
cSkinSetup::~cSkinSetup() {
|
||||||
for (map < string, cSkinSetupParameter* >::iterator p = parameters.begin(); p != parameters.end(); p++) {
|
delete rootMenu;
|
||||||
delete p->second;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool cSkinSetup::ReadFromXML(void) {
|
bool cSkinSetup::ReadFromXML(void) {
|
||||||
string xmlFile = "setup.xml";
|
string xmlPath = *cString::sprintf("%s%s/setup.xml", *config.skinPath, skin.c_str());
|
||||||
cXmlParser parser;
|
cXmlParser parser;
|
||||||
if (!parser.ReadSkinSetup(this, skin, xmlFile)) {
|
if (!parser.ReadSkinSetup(this, xmlPath)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
parser.ParseSkinSetup(skin);
|
parser.ParseSkinSetup(skin);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void cSkinSetup::SetParameter(xmlChar *type, xmlChar *name, xmlChar* displayText, xmlChar *min, xmlChar *max, xmlChar *value) {
|
void cSkinSetup::SetSubMenu(xmlChar *name, xmlChar *displayText) {
|
||||||
if (!type || !name || !displayText || !value) {
|
cSkinSetupMenu *subMenu = new cSkinSetupMenu();
|
||||||
esyslog("skindesigner: invalid setup parameter for skin %s", skin.c_str());
|
subMenu->SetName((const char*)name);
|
||||||
return;
|
subMenu->SetDisplayText((const char*)displayText);
|
||||||
}
|
subMenu->SetParent(currentMenu);
|
||||||
eSetupParameterType paramType = sptUnknown;
|
currentMenu->AddSubMenu(subMenu);
|
||||||
if (!xmlStrcmp(type, (const xmlChar *) "int")) {
|
currentMenu = subMenu;
|
||||||
paramType = sptInt;
|
|
||||||
} else if (!xmlStrcmp(type, (const xmlChar *) "bool")) {
|
|
||||||
paramType = sptBool;
|
|
||||||
}
|
|
||||||
if (paramType == sptUnknown) {
|
|
||||||
esyslog("skindesigner: invalid setup parameter for skin %s", skin.c_str());
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
cSkinSetupParameter *param = new cSkinSetupParameter();
|
|
||||||
param->type = paramType;
|
|
||||||
param->name = (const char*)name;
|
|
||||||
param->displayText = (const char*)displayText;
|
|
||||||
|
|
||||||
if (min && paramType == sptInt) {
|
|
||||||
param->min = atoi((const char*)min);
|
|
||||||
}
|
|
||||||
if (max && paramType == sptInt) {
|
|
||||||
param->max = atoi((const char*)max);
|
|
||||||
}
|
|
||||||
param->value = atoi((const char*)value);
|
|
||||||
|
|
||||||
parameters.insert(pair< string, cSkinSetupParameter* >(param->name, param));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cSkinSetupParameter *cSkinSetup::GetParameter(void) {
|
void cSkinSetup::SubMenuDone(void) {
|
||||||
if (paramIt == parameters.end())
|
cSkinSetupMenu *parent = currentMenu->GetParent();
|
||||||
return NULL;
|
if (parent) {
|
||||||
cSkinSetupParameter *param = paramIt->second;
|
currentMenu = parent;
|
||||||
paramIt++;
|
}
|
||||||
return param;
|
}
|
||||||
|
|
||||||
|
void cSkinSetup::SetParameter(xmlChar *type, xmlChar *name, xmlChar* displayText, xmlChar *min, xmlChar *max, xmlChar *value) {
|
||||||
|
if (!type || !name || !displayText || !value) {
|
||||||
|
esyslog("skindesigner: invalid setup parameter for skin %s", skin.c_str());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
eSetupParameterType paramType = sptUnknown;
|
||||||
|
if (!xmlStrcmp(type, (const xmlChar *) "int")) {
|
||||||
|
paramType = sptInt;
|
||||||
|
} else if (!xmlStrcmp(type, (const xmlChar *) "bool")) {
|
||||||
|
paramType = sptBool;
|
||||||
|
}
|
||||||
|
if (paramType == sptUnknown) {
|
||||||
|
esyslog("skindesigner: invalid setup parameter for skin %s", skin.c_str());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
currentMenu->SetParameter(paramType, name, displayText, min, max, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
cSkinSetupParameter *cSkinSetup::GetNextParameter(void) {
|
||||||
|
return rootMenu->GetNextParameter();
|
||||||
}
|
}
|
||||||
|
|
||||||
cSkinSetupParameter *cSkinSetup::GetParameter(string name) {
|
cSkinSetupParameter *cSkinSetup::GetParameter(string name) {
|
||||||
map < string, cSkinSetupParameter* >::iterator hit = parameters.find(name);
|
return rootMenu->GetParameter(name);
|
||||||
if (hit != parameters.end())
|
|
||||||
return hit->second;
|
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void cSkinSetup::SetTranslation(string translationToken, map < string, string > transl) {
|
void cSkinSetup::SetTranslation(string translationToken, map < string, string > transl) {
|
||||||
translations.insert(pair<string, map < string, string > >(translationToken, transl));
|
translations.insert(pair<string, map < string, string > >(translationToken, transl));
|
||||||
}
|
}
|
||||||
@ -100,21 +217,37 @@ void cSkinSetup::SetTranslation(string translationToken, map < string, string >
|
|||||||
void cSkinSetup::AddToGlobals(cGlobals *globals) {
|
void cSkinSetup::AddToGlobals(cGlobals *globals) {
|
||||||
if (!globals)
|
if (!globals)
|
||||||
return;
|
return;
|
||||||
for (map < string, cSkinSetupParameter* >::iterator p = parameters.begin(); p != parameters.end(); p++) {
|
rootMenu->InitIterators();
|
||||||
cSkinSetupParameter *param = p->second;
|
cSkinSetupParameter *param = NULL;
|
||||||
|
while (param = rootMenu->GetNextParameter()) {
|
||||||
globals->AddInt(param->name, param->value);
|
globals->AddInt(param->name, param->value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void cSkinSetup::TranslateSetup(void) {
|
void cSkinSetup::TranslateSetup(void) {
|
||||||
InitParameterIterator();
|
rootMenu->InitIterators();
|
||||||
cSkinSetupParameter *param = NULL;
|
cSkinSetupParameter *param = NULL;
|
||||||
while (param = GetParameter()) {
|
while (param = rootMenu->GetNextParameter()) {
|
||||||
string transl = "";
|
string transl = "";
|
||||||
if (Translate(param->displayText, transl)) {
|
if (Translate(param->displayText, transl)) {
|
||||||
param->displayText = transl;
|
param->displayText = transl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rootMenu->InitIterators();
|
||||||
|
cSkinSetupMenu *subMenu = NULL;
|
||||||
|
while (subMenu = rootMenu->GetNextSubMenu()) {
|
||||||
|
string transl = "";
|
||||||
|
if (Translate(subMenu->GetDisplayText(), transl)) {
|
||||||
|
subMenu->SetDisplayText(transl);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
cSkinSetupMenu *cSkinSetup::GetMenu(string &name) {
|
||||||
|
if (name.size() == 0)
|
||||||
|
return rootMenu;
|
||||||
|
return rootMenu->GetMenu(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool cSkinSetup::Translate(string text, string &translation) {
|
bool cSkinSetup::Translate(string text, string &translation) {
|
||||||
@ -161,11 +294,8 @@ string cSkinSetup::DoTranslate(string token) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void cSkinSetup::Debug(void) {
|
void cSkinSetup::Debug(void) {
|
||||||
dsyslog("skindesigner: Skin \"%s\" Setup Parameters", skin.c_str());
|
rootMenu->Debug();
|
||||||
for (map < string, cSkinSetupParameter* >::iterator p = parameters.begin(); p != parameters.end(); p++) {
|
return;
|
||||||
(p->second)->Debug();
|
|
||||||
}
|
|
||||||
|
|
||||||
dsyslog("skindesigner: Skin \"%s\" Setup Parameter Translations", skin.c_str());
|
dsyslog("skindesigner: Skin \"%s\" Setup Parameter Translations", skin.c_str());
|
||||||
for (map<string, map<string,string> >::iterator trans = translations.begin(); trans != translations.end(); trans++) {
|
for (map<string, map<string,string> >::iterator trans = translations.begin(); trans != translations.end(); trans++) {
|
||||||
dsyslog("skindesigner: translation token %s", (trans->first).c_str());
|
dsyslog("skindesigner: translation token %s", (trans->first).c_str());
|
||||||
|
@ -34,28 +34,63 @@ public:
|
|||||||
void Debug(void);
|
void Debug(void);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// --- cSkinSetupMenu -----------------------------------------------------------
|
||||||
|
|
||||||
|
class cSkinSetupMenu {
|
||||||
|
private:
|
||||||
|
string name;
|
||||||
|
string displayText;
|
||||||
|
cSkinSetupMenu *parent;
|
||||||
|
vector < cSkinSetupMenu* > subMenus;
|
||||||
|
vector < cSkinSetupMenu* >::iterator subMenuIt;
|
||||||
|
map < string, cSkinSetupParameter* > parameters;
|
||||||
|
map < string, cSkinSetupParameter* >::iterator paramIt;
|
||||||
|
public:
|
||||||
|
cSkinSetupMenu(void);
|
||||||
|
virtual ~cSkinSetupMenu(void);
|
||||||
|
void SetName(string name) { this->name = name; };
|
||||||
|
void SetDisplayText(string displayText) { this->displayText = displayText; };
|
||||||
|
string GetName(void) { return name; };
|
||||||
|
string GetDisplayText(void) { return displayText; };
|
||||||
|
void SetParent(cSkinSetupMenu *p) { parent = p; };
|
||||||
|
cSkinSetupMenu *GetParent(void) { return parent; };
|
||||||
|
void AddSubMenu(cSkinSetupMenu *sub) { subMenus.push_back(sub); };
|
||||||
|
void SetParameter(eSetupParameterType paramType, xmlChar *name, xmlChar* displayText, xmlChar *min, xmlChar *max, xmlChar *value);
|
||||||
|
void InitIterators(void);
|
||||||
|
void InitParameterIterator(void) { paramIt = parameters.begin(); };
|
||||||
|
cSkinSetupParameter *GetNextParameter(bool deep = true);
|
||||||
|
cSkinSetupParameter *GetParameter(string name);
|
||||||
|
void InitSubmenuIterator(void) { subMenuIt = subMenus.begin(); };
|
||||||
|
cSkinSetupMenu *GetNextSubMenu(bool deep = true);
|
||||||
|
cSkinSetupMenu *GetMenu(string &name);
|
||||||
|
void Debug(bool deep = true);
|
||||||
|
};
|
||||||
|
|
||||||
// --- cSkinSetup -----------------------------------------------------------
|
// --- cSkinSetup -----------------------------------------------------------
|
||||||
|
|
||||||
class cSkinSetup {
|
class cSkinSetup {
|
||||||
private:
|
private:
|
||||||
string skin;
|
string skin;
|
||||||
map < string, cSkinSetupParameter* > parameters;
|
cSkinSetupMenu *rootMenu;
|
||||||
map < string, cSkinSetupParameter* >::iterator paramIt;
|
cSkinSetupMenu *currentMenu;
|
||||||
map < string, map< string, string > > translations;
|
map < string, map< string, string > > translations;
|
||||||
string DoTranslate(string token);
|
string DoTranslate(string token);
|
||||||
bool Translate(string text, string &translation);
|
bool Translate(string text, string &translation);
|
||||||
public:
|
public:
|
||||||
cSkinSetup(string skin);
|
cSkinSetup(string skin);
|
||||||
virtual ~cSkinSetup(void);
|
virtual ~cSkinSetup(void);
|
||||||
bool ReadFromXML(void);
|
bool ReadFromXML(void);
|
||||||
|
void SetSubMenu(xmlChar *name, xmlChar *displayText);
|
||||||
|
void SubMenuDone(void);
|
||||||
void SetParameter(xmlChar *type, xmlChar *name, xmlChar* displayText, xmlChar *min, xmlChar *max, xmlChar *value);
|
void SetParameter(xmlChar *type, xmlChar *name, xmlChar* displayText, xmlChar *min, xmlChar *max, xmlChar *value);
|
||||||
|
void InitParameterIterator(void) { rootMenu->InitIterators(); };
|
||||||
|
cSkinSetupParameter *GetNextParameter(void);
|
||||||
|
cSkinSetupParameter *GetParameter(string name);
|
||||||
void SetTranslation(string translationToken, map < string, string > transl);
|
void SetTranslation(string translationToken, map < string, string > transl);
|
||||||
void AddToGlobals(cGlobals *globals);
|
void AddToGlobals(cGlobals *globals);
|
||||||
void TranslateSetup(void);
|
void TranslateSetup(void);
|
||||||
void InitParameterIterator(void) { paramIt = parameters.begin(); };
|
|
||||||
cSkinSetupParameter *GetParameter(void);
|
|
||||||
cSkinSetupParameter *GetParameter(string name);
|
|
||||||
string GetSkin(void) { return skin; };
|
string GetSkin(void) { return skin; };
|
||||||
|
cSkinSetupMenu *GetMenu(string &name);
|
||||||
void Debug(void);
|
void Debug(void);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -135,28 +135,27 @@ bool cXmlParser::ReadGlobals(cGlobals *globals, string xmlFile, bool mandatory)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool cXmlParser::ReadSkinSetup(cSkinSetup *skinSetup, string skin, string xmlFile) {
|
bool cXmlParser::ReadSkinSetup(cSkinSetup *skinSetup, string xmlFile) {
|
||||||
this->skinSetup = skinSetup;
|
this->skinSetup = skinSetup;
|
||||||
string xmlPath = *cString::sprintf("%s%s/%s", *config.skinPath, skin.c_str(), xmlFile.c_str());
|
|
||||||
|
|
||||||
if (!FileExists(xmlPath))
|
if (!FileExists(xmlFile))
|
||||||
return false;
|
return false;
|
||||||
if (ctxt == NULL) {
|
if (ctxt == NULL) {
|
||||||
esyslog("skindesigner: Failed to allocate parser context");
|
esyslog("skindesigner: Failed to allocate parser context");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
doc = xmlCtxtReadFile(ctxt, xmlPath.c_str(), NULL, XML_PARSE_NOENT | XML_PARSE_DTDVALID);
|
doc = xmlCtxtReadFile(ctxt, xmlFile.c_str(), NULL, XML_PARSE_NOENT | XML_PARSE_DTDVALID);
|
||||||
|
|
||||||
if (doc == NULL ) {
|
if (doc == NULL ) {
|
||||||
esyslog("skindesigner: ERROR: skin setup %s not parsed successfully.", xmlPath.c_str());
|
esyslog("skindesigner: ERROR: skin setup %s not parsed successfully.", xmlFile.c_str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
root = xmlDocGetRootElement(doc);
|
root = xmlDocGetRootElement(doc);
|
||||||
|
|
||||||
if (ctxt->valid == 0) {
|
if (ctxt->valid == 0) {
|
||||||
esyslog("skindesigner: Failed to validate %s", xmlPath.c_str());
|
esyslog("skindesigner: Failed to validate %s", xmlFile.c_str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (root == NULL) {
|
if (root == NULL) {
|
||||||
@ -282,8 +281,8 @@ bool cXmlParser::ParseSkinSetup(string skin) {
|
|||||||
node = node->next;
|
node = node->next;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!xmlStrcmp(node->name, (const xmlChar *) "parameters")) {
|
if (!xmlStrcmp(node->name, (const xmlChar *) "menu")) {
|
||||||
ParseSetupParameter(node->xmlChildrenNode);
|
ParseSetupMenu(node->xmlChildrenNode);
|
||||||
node = node->next;
|
node = node->next;
|
||||||
continue;
|
continue;
|
||||||
} else if (!xmlStrcmp(node->name, (const xmlChar *) "translations")) {
|
} else if (!xmlStrcmp(node->name, (const xmlChar *) "translations")) {
|
||||||
@ -325,64 +324,88 @@ string cXmlParser::GetPath(string xmlFile) {
|
|||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
|
||||||
void cXmlParser::ParseSetupParameter(xmlNodePtr node) {
|
void cXmlParser::ParseSetupMenu(xmlNodePtr node) {
|
||||||
if (!node)
|
if (!node)
|
||||||
return;
|
return;
|
||||||
if (!skinSetup)
|
if (!skinSetup)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
while (node != NULL) {
|
while (node != NULL) {
|
||||||
|
|
||||||
if (node->type != XML_ELEMENT_NODE) {
|
if (node->type != XML_ELEMENT_NODE) {
|
||||||
node = node->next;
|
node = node->next;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (xmlStrcmp(node->name, (const xmlChar *) "parameter")) {
|
|
||||||
node = node->next;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
xmlAttrPtr attr = node->properties;
|
|
||||||
if (attr == NULL) {
|
|
||||||
node = node->next;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
xmlChar *paramType = NULL;
|
|
||||||
xmlChar *paramName = NULL;
|
|
||||||
xmlChar *paramDisplayText = NULL;
|
|
||||||
xmlChar *paramMin = NULL;
|
|
||||||
xmlChar *paramMax = NULL;
|
|
||||||
xmlChar *paramValue = NULL;
|
|
||||||
while (NULL != attr) {
|
|
||||||
if (!xmlStrcmp(attr->name, (const xmlChar *) "type")) {
|
|
||||||
paramType = xmlGetProp(node, attr->name);
|
|
||||||
} else if (!xmlStrcmp(attr->name, (const xmlChar *) "name")) {
|
|
||||||
paramName = xmlGetProp(node, attr->name);
|
|
||||||
} else if (!xmlStrcmp(attr->name, (const xmlChar *) "displaytext")) {
|
|
||||||
paramDisplayText = xmlGetProp(node, attr->name);
|
|
||||||
} else if (!xmlStrcmp(attr->name, (const xmlChar *) "min")) {
|
|
||||||
paramMin = xmlGetProp(node, attr->name);
|
|
||||||
} else if (!xmlStrcmp(attr->name, (const xmlChar *) "max")) {
|
|
||||||
paramMax = xmlGetProp(node, attr->name);
|
|
||||||
}
|
|
||||||
attr = attr->next;
|
|
||||||
}
|
|
||||||
paramValue = xmlNodeListGetString(doc, node->xmlChildrenNode, 1);
|
|
||||||
skinSetup->SetParameter(paramType, paramName, paramDisplayText, paramMin, paramMax, paramValue);
|
|
||||||
|
|
||||||
if (paramType)
|
if (!xmlStrcmp(node->name, (const xmlChar *) "parameter")) {
|
||||||
xmlFree(paramType);
|
ParseSetupParameter(node);
|
||||||
if (paramName)
|
} else if (!xmlStrcmp(node->name, (const xmlChar *) "submenu")) {
|
||||||
xmlFree(paramName);
|
xmlAttrPtr attr = node->properties;
|
||||||
if (paramDisplayText)
|
xmlChar *subMenuName = NULL;
|
||||||
xmlFree(paramDisplayText);
|
xmlChar *subDisplayText = NULL;
|
||||||
if (paramMin)
|
while (NULL != attr) {
|
||||||
xmlFree(paramMin);
|
if (!xmlStrcmp(attr->name, (const xmlChar *) "name")) {
|
||||||
if (paramMax)
|
subMenuName = xmlGetProp(node, attr->name);
|
||||||
xmlFree(paramMax);
|
} else if (!xmlStrcmp(attr->name, (const xmlChar *) "displaytext")) {
|
||||||
if (paramValue)
|
subDisplayText = xmlGetProp(node, attr->name);
|
||||||
xmlFree(paramValue);
|
}
|
||||||
|
attr = attr->next;
|
||||||
|
}
|
||||||
|
skinSetup->SetSubMenu(subMenuName, subDisplayText);
|
||||||
|
ParseSetupMenu(node->xmlChildrenNode);
|
||||||
|
if (subMenuName)
|
||||||
|
xmlFree(subMenuName);
|
||||||
|
if (subDisplayText)
|
||||||
|
xmlFree(subDisplayText);
|
||||||
|
}
|
||||||
node = node->next;
|
node = node->next;
|
||||||
}
|
}
|
||||||
|
skinSetup->SubMenuDone();
|
||||||
|
}
|
||||||
|
|
||||||
|
void cXmlParser::ParseSetupParameter(xmlNodePtr node) {
|
||||||
|
if (!node)
|
||||||
|
return;
|
||||||
|
if (!skinSetup)
|
||||||
|
return;
|
||||||
|
|
||||||
|
xmlAttrPtr attr = node->properties;
|
||||||
|
if (attr == NULL) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
xmlChar *paramType = NULL;
|
||||||
|
xmlChar *paramName = NULL;
|
||||||
|
xmlChar *paramDisplayText = NULL;
|
||||||
|
xmlChar *paramMin = NULL;
|
||||||
|
xmlChar *paramMax = NULL;
|
||||||
|
xmlChar *paramValue = NULL;
|
||||||
|
while (NULL != attr) {
|
||||||
|
if (!xmlStrcmp(attr->name, (const xmlChar *) "type")) {
|
||||||
|
paramType = xmlGetProp(node, attr->name);
|
||||||
|
} else if (!xmlStrcmp(attr->name, (const xmlChar *) "name")) {
|
||||||
|
paramName = xmlGetProp(node, attr->name);
|
||||||
|
} else if (!xmlStrcmp(attr->name, (const xmlChar *) "displaytext")) {
|
||||||
|
paramDisplayText = xmlGetProp(node, attr->name);
|
||||||
|
} else if (!xmlStrcmp(attr->name, (const xmlChar *) "min")) {
|
||||||
|
paramMin = xmlGetProp(node, attr->name);
|
||||||
|
} else if (!xmlStrcmp(attr->name, (const xmlChar *) "max")) {
|
||||||
|
paramMax = xmlGetProp(node, attr->name);
|
||||||
|
}
|
||||||
|
attr = attr->next;
|
||||||
|
}
|
||||||
|
paramValue = xmlNodeListGetString(doc, node->xmlChildrenNode, 1);
|
||||||
|
skinSetup->SetParameter(paramType, paramName, paramDisplayText, paramMin, paramMax, paramValue);
|
||||||
|
if (paramType)
|
||||||
|
xmlFree(paramType);
|
||||||
|
if (paramName)
|
||||||
|
xmlFree(paramName);
|
||||||
|
if (paramDisplayText)
|
||||||
|
xmlFree(paramDisplayText);
|
||||||
|
if (paramMin)
|
||||||
|
xmlFree(paramMin);
|
||||||
|
if (paramMax)
|
||||||
|
xmlFree(paramMax);
|
||||||
|
if (paramValue)
|
||||||
|
xmlFree(paramValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
void cXmlParser::ParseGlobalColors(xmlNodePtr node) {
|
void cXmlParser::ParseGlobalColors(xmlNodePtr node) {
|
||||||
|
@ -31,6 +31,7 @@ private:
|
|||||||
xmlDocPtr doc;
|
xmlDocPtr doc;
|
||||||
xmlNodePtr root;
|
xmlNodePtr root;
|
||||||
string GetPath(string xmlFile);
|
string GetPath(string xmlFile);
|
||||||
|
void ParseSetupMenu(xmlNodePtr node);
|
||||||
void ParseSetupParameter(xmlNodePtr node);
|
void ParseSetupParameter(xmlNodePtr node);
|
||||||
void ParseGlobalColors(xmlNodePtr node);
|
void ParseGlobalColors(xmlNodePtr node);
|
||||||
void InsertColor(string name, string value);
|
void InsertColor(string name, string value);
|
||||||
@ -51,7 +52,7 @@ public:
|
|||||||
bool ReadView(cTemplateView *view, string xmlFile);
|
bool ReadView(cTemplateView *view, string xmlFile);
|
||||||
bool ReadPluginView(string plugName, int templateNumber, string templateName);
|
bool ReadPluginView(string plugName, int templateNumber, string templateName);
|
||||||
bool ReadGlobals(cGlobals *globals, string xmlFile, bool mandatory);
|
bool ReadGlobals(cGlobals *globals, string xmlFile, bool mandatory);
|
||||||
bool ReadSkinSetup(cSkinSetup *skinSetup, string skin, string xmlFile);
|
bool ReadSkinSetup(cSkinSetup *skinSetup, string xmlFile);
|
||||||
bool ParseView(void);
|
bool ParseView(void);
|
||||||
bool ParsePluginView(string plugName, int templateNumber);
|
bool ParsePluginView(string plugName, int templateNumber);
|
||||||
bool ParseGlobals(void);
|
bool ParseGlobals(void);
|
||||||
|
45
setup.c
45
setup.c
@ -15,6 +15,7 @@ cSkinDesignerSetup::cSkinDesignerSetup() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
cSkinDesignerSetup::~cSkinDesignerSetup() {
|
cSkinDesignerSetup::~cSkinDesignerSetup() {
|
||||||
|
config.setupCloseDoReload = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -44,7 +45,7 @@ eOSState cSkinDesignerSetup::ProcessKey(eKeys Key) {
|
|||||||
size_t hit = itemText.find(tr("Skin"));
|
size_t hit = itemText.find(tr("Skin"));
|
||||||
if (hit == 0) {
|
if (hit == 0) {
|
||||||
string skin = itemText.substr(strlen(tr("Skin"))+1);
|
string skin = itemText.substr(strlen(tr("Skin"))+1);
|
||||||
state = AddSubMenu(new cSkindesignerSkinSetup(skin));
|
state = AddSubMenu(new cSkindesignerSkinSetup(skin, ""));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
} default:
|
} default:
|
||||||
@ -67,11 +68,11 @@ void cSkinDesignerSetup::Store(void) {
|
|||||||
|
|
||||||
config.InitSetupIterator();
|
config.InitSetupIterator();
|
||||||
cSkinSetup *skinSetup = NULL;
|
cSkinSetup *skinSetup = NULL;
|
||||||
while (skinSetup = config.GetSkinSetup()) {
|
while (skinSetup = config.GetNextSkinSetup()) {
|
||||||
string skin = skinSetup->GetSkin();
|
string skin = skinSetup->GetSkin();
|
||||||
skinSetup->InitParameterIterator();
|
skinSetup->InitParameterIterator();
|
||||||
cSkinSetupParameter *param = NULL;
|
cSkinSetupParameter *param = NULL;
|
||||||
while (param = skinSetup->GetParameter()) {
|
while (param = skinSetup->GetNextParameter()) {
|
||||||
cString paramName = cString::sprintf("%s.%s", skin.c_str(), param->name.c_str());
|
cString paramName = cString::sprintf("%s.%s", skin.c_str(), param->name.c_str());
|
||||||
SetupStore(*paramName, param->value);
|
SetupStore(*paramName, param->value);
|
||||||
config.UpdateSkinSetupParameter(*paramName, param->value);
|
config.UpdateSkinSetupParameter(*paramName, param->value);
|
||||||
@ -157,10 +158,18 @@ void cSkinDesignerSetup::ImageCacheStatistics(void) {
|
|||||||
cList<cOsdItem>::Last()->SetSelectable(false);
|
cList<cOsdItem>::Last()->SetSelectable(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// --- cSkinSetupSubMenu -----------------------------------------------------------
|
||||||
|
|
||||||
|
cSkinSetupSubMenu::cSkinSetupSubMenu(string name, string displayText) : cOsdItem(displayText.c_str()) {
|
||||||
|
this->name = name;
|
||||||
|
}
|
||||||
|
|
||||||
// --- cSkindesignerSkinSetup -----------------------------------------------------------
|
// --- cSkindesignerSkinSetup -----------------------------------------------------------
|
||||||
|
|
||||||
cSkindesignerSkinSetup::cSkindesignerSkinSetup(string skin) : cOsdMenu(*cString::sprintf("%s: %s \"%s\"", trVDR("Setup"), tr("Skin"), skin.c_str()), 30) {
|
cSkindesignerSkinSetup::cSkindesignerSkinSetup(string skin, string name) :
|
||||||
|
cOsdMenu(*cString::sprintf("%s: %s \"%s\" %s", trVDR("Setup"), tr("Skin"), skin.c_str(), name.c_str()), 30) {
|
||||||
this->skin = skin;
|
this->skin = skin;
|
||||||
|
this->name = name;
|
||||||
Set();
|
Set();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -171,9 +180,16 @@ eOSState cSkindesignerSkinSetup::ProcessKey(eKeys Key) {
|
|||||||
eOSState state = cOsdMenu::ProcessKey(Key);
|
eOSState state = cOsdMenu::ProcessKey(Key);
|
||||||
if (state == osUnknown) {
|
if (state == osUnknown) {
|
||||||
switch (Key) {
|
switch (Key) {
|
||||||
case kOk:
|
case kOk: {
|
||||||
return osBack;
|
cOsdItem *current = Get(Current());
|
||||||
default:
|
cSkinSetupSubMenu *subMenuItem = dynamic_cast<cSkinSetupSubMenu*>(current);
|
||||||
|
if (subMenuItem) {
|
||||||
|
state = AddSubMenu(new cSkindesignerSkinSetup(skin, subMenuItem->GetName()));
|
||||||
|
break;
|
||||||
|
} else {
|
||||||
|
return osBack;
|
||||||
|
}
|
||||||
|
} default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -181,13 +197,13 @@ eOSState cSkindesignerSkinSetup::ProcessKey(eKeys Key) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void cSkindesignerSkinSetup::Set(void) {
|
void cSkindesignerSkinSetup::Set(void) {
|
||||||
cSkinSetup *skinSetup = config.GetSkinSetup(skin);
|
cSkinSetupMenu *menu = config.GetSkinSetupMenu(skin, name);
|
||||||
if (!skinSetup)
|
if (!menu) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
skinSetup->InitParameterIterator();
|
menu->InitParameterIterator();
|
||||||
cSkinSetupParameter *param = NULL;
|
cSkinSetupParameter *param = NULL;
|
||||||
while (param = skinSetup->GetParameter()) {
|
while (param = menu->GetNextParameter(false)) {
|
||||||
if (param->type == sptInt) {
|
if (param->type == sptInt) {
|
||||||
Add(new cMenuEditIntItem(param->displayText.c_str(), ¶m->value, param->min, param->max));
|
Add(new cMenuEditIntItem(param->displayText.c_str(), ¶m->value, param->min, param->max));
|
||||||
} else if (param->type == sptBool) {
|
} else if (param->type == sptBool) {
|
||||||
@ -195,4 +211,9 @@ void cSkindesignerSkinSetup::Set(void) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
menu->InitSubmenuIterator();
|
||||||
|
cSkinSetupMenu *subMenu = NULL;
|
||||||
|
while (subMenu = menu->GetNextSubMenu(false)) {
|
||||||
|
Add(new cSkinSetupSubMenu(subMenu->GetName(), subMenu->GetDisplayText()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
14
setup.h
14
setup.h
@ -29,16 +29,28 @@ public:
|
|||||||
virtual ~cSkinDesignerSetup();
|
virtual ~cSkinDesignerSetup();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// --- cSkinSetupSubMenu -----------------------------------------------------------
|
||||||
|
|
||||||
|
class cSkinSetupSubMenu : public cOsdItem {
|
||||||
|
private:
|
||||||
|
string name;
|
||||||
|
public:
|
||||||
|
cSkinSetupSubMenu(string name, string displayText);
|
||||||
|
virtual ~cSkinSetupSubMenu() {};
|
||||||
|
string GetName(void) { return name; };
|
||||||
|
};
|
||||||
|
|
||||||
// --- cSkindesignerSkinSetup -----------------------------------------------------------
|
// --- cSkindesignerSkinSetup -----------------------------------------------------------
|
||||||
|
|
||||||
class cSkindesignerSkinSetup : public cOsdMenu {
|
class cSkindesignerSkinSetup : public cOsdMenu {
|
||||||
private:
|
private:
|
||||||
string skin;
|
string skin;
|
||||||
|
string name;
|
||||||
protected:
|
protected:
|
||||||
virtual eOSState ProcessKey(eKeys Key);
|
virtual eOSState ProcessKey(eKeys Key);
|
||||||
void Set(void);
|
void Set(void);
|
||||||
public:
|
public:
|
||||||
cSkindesignerSkinSetup(string skin);
|
cSkindesignerSkinSetup(string skin, string menu);
|
||||||
virtual ~cSkindesignerSkinSetup();
|
virtual ~cSkindesignerSkinSetup();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
static const char *VERSION = "0.2.1";
|
static const char *VERSION = "0.2.2";
|
||||||
static const char *DESCRIPTION = trNOOP("Skin Designer");
|
static const char *DESCRIPTION = trNOOP("Skin Designer");
|
||||||
|
|
||||||
class cPluginSkinDesigner : public cPlugin {
|
class cPluginSkinDesigner : public cPlugin {
|
||||||
|
@ -2,17 +2,7 @@
|
|||||||
<!DOCTYPE setup SYSTEM "../../dtd/setup.dtd">
|
<!DOCTYPE setup SYSTEM "../../dtd/setup.dtd">
|
||||||
|
|
||||||
<setup>
|
<setup>
|
||||||
<!--
|
<menu>
|
||||||
define all your parameters here which should be configurable via
|
|
||||||
OSD and the skindesigner setup menu.
|
|
||||||
Parameters must have type "bool" or "integer". For "bool" Parameters
|
|
||||||
a choice yes/no is shown in the setup menu, a "integer" parameter
|
|
||||||
can be configured to a value between "min" and "max". If "min" is not
|
|
||||||
set, "0" is the minimum, if "max" is not set, "1000" is maximum.
|
|
||||||
"displayname" is used to display the option in the setup menu.
|
|
||||||
The configured parameter value is the default value.
|
|
||||||
-->
|
|
||||||
<parameters>
|
|
||||||
<parameter type="bool" name="showdevices" displaytext="{tr(showdevices)}">0</parameter>
|
<parameter type="bool" name="showdevices" displaytext="{tr(showdevices)}">0</parameter>
|
||||||
<parameter type="bool" name="showposter" displaytext="{tr(showpostertext)}">1</parameter>
|
<parameter type="bool" name="showposter" displaytext="{tr(showpostertext)}">1</parameter>
|
||||||
<parameter type="bool" name="showmainmenuicons" displaytext="{tr(showmainmenuicons)}">1</parameter>
|
<parameter type="bool" name="showmainmenuicons" displaytext="{tr(showmainmenuicons)}">1</parameter>
|
||||||
@ -21,11 +11,8 @@
|
|||||||
<parameter type="int" name="nummenuitems" min="6" max="30" displaytext="{tr(nummenuitems)}">10</parameter>
|
<parameter type="int" name="nummenuitems" min="6" max="30" displaytext="{tr(nummenuitems)}">10</parameter>
|
||||||
<parameter type="int" name="nummenuitemsdefault" min="6" max="30" displaytext="{tr(nummenuitemsdefault)}">16</parameter>
|
<parameter type="int" name="nummenuitemsdefault" min="6" max="30" displaytext="{tr(nummenuitemsdefault)}">16</parameter>
|
||||||
<parameter type="bool" name="showsubtitle" displaytext="{tr(showsubtitle)}">1</parameter>
|
<parameter type="bool" name="showsubtitle" displaytext="{tr(showsubtitle)}">1</parameter>
|
||||||
</parameters>
|
</menu>
|
||||||
|
|
||||||
<!--
|
|
||||||
translations of displaytexts
|
|
||||||
-->
|
|
||||||
<translations>
|
<translations>
|
||||||
<token name="tr(showdevices)">
|
<token name="tr(showdevices)">
|
||||||
<trans lang="en_EN">Show DVB device info when switching channel</trans>
|
<trans lang="en_EN">Show DVB device info when switching channel</trans>
|
||||||
@ -43,24 +30,24 @@
|
|||||||
<trans lang="fi_FI">Näytä ikonit päävalikossa</trans>
|
<trans lang="fi_FI">Näytä ikonit päävalikossa</trans>
|
||||||
</token>
|
</token>
|
||||||
<token name="tr(fadetext)">
|
<token name="tr(fadetext)">
|
||||||
<trans lang="en_EN">Fade time in ms (needs VDR restart)</trans>
|
<trans lang="en_EN">Fade time in ms</trans>
|
||||||
<trans lang="de_DE">Einblendzeit in ms (erfordert VDR Neustart)</trans>
|
<trans lang="de_DE">Einblendzeit in ms</trans>
|
||||||
<trans lang="fi_FI">Häivytyksen kesto [ms] (uud.käynnistys)</trans>
|
<trans lang="fi_FI">Häivytyksen kesto [ms]</trans>
|
||||||
</token>
|
</token>
|
||||||
<token name="tr(nummenuitemsmain)">
|
<token name="tr(nummenuitemsmain)">
|
||||||
<trans lang="en_EN">Items in main menu (needs VDR restart)</trans>
|
<trans lang="en_EN">Items in main menu</trans>
|
||||||
<trans lang="de_DE">Elemente im Hauptmenü (erfordert VDR Neustart)</trans>
|
<trans lang="de_DE">Elemente im Hauptmenü</trans>
|
||||||
<trans lang="fi_FI">Valinnat päävalikossa (uud.käynnistys)</trans>
|
<trans lang="fi_FI">Valinnat päävalikossa</trans>
|
||||||
</token>
|
</token>
|
||||||
<token name="tr(nummenuitems)">
|
<token name="tr(nummenuitems)">
|
||||||
<trans lang="en_EN">Items in schedules, timers, ... menus (needs VDR restart)</trans>
|
<trans lang="en_EN">Items in schedules, timers, ... menus</trans>
|
||||||
<trans lang="de_DE">Elemente in Programm, Timer, ... Menüs (erfordert VDR Neustart)</trans>
|
<trans lang="de_DE">Elemente in Programm, Timer, ... Menüs</trans>
|
||||||
<trans lang="fi_FI">Valinnat alivalikoissa (uud.käynnistys)</trans>
|
<trans lang="fi_FI">Valinnat alivalikoissa</trans>
|
||||||
</token>
|
</token>
|
||||||
<token name="tr(nummenuitemsdefault)">
|
<token name="tr(nummenuitemsdefault)">
|
||||||
<trans lang="en_EN">Items in default list menu (needs VDR restart)</trans>
|
<trans lang="en_EN">Items in default list menu</trans>
|
||||||
<trans lang="de_DE">Elemente im Standard ListenMenü (erfordert VDR Neustart)</trans>
|
<trans lang="de_DE">Elemente im Standard ListenMenü</trans>
|
||||||
<trans lang="fi_FI">Valinnat valikkolistoissa (uud.käynnistys)</trans>
|
<trans lang="fi_FI">Valinnat valikkolistoissa</trans>
|
||||||
</token>
|
</token>
|
||||||
<token name="tr(showsubtitle)">
|
<token name="tr(showsubtitle)">
|
||||||
<trans lang="en_EN">Show shorttexts in schedules menus</trans>
|
<trans lang="en_EN">Show shorttexts in schedules menus</trans>
|
||||||
|
@ -2,29 +2,16 @@
|
|||||||
<!DOCTYPE setup SYSTEM "../../dtd/setup.dtd">
|
<!DOCTYPE setup SYSTEM "../../dtd/setup.dtd">
|
||||||
|
|
||||||
<setup>
|
<setup>
|
||||||
<!--
|
<menu>
|
||||||
define all your parameters here which should be configurable via
|
|
||||||
OSD and the skindesigner setup menu.
|
|
||||||
Parameters must have type "bool" or "integer". For "bool" Parameters
|
|
||||||
a choice yes/no is shown in the setup menu, a "integer" parameter
|
|
||||||
can be configured to a value between "min" and "max". If "min" is not
|
|
||||||
set, "0" is the minimum, if "max" is not set, "1000" is maximum.
|
|
||||||
"displayname" is used to display the option in the setup menu.
|
|
||||||
The configured parameter value is the default value.
|
|
||||||
-->
|
|
||||||
<parameters>
|
|
||||||
<parameter type="int" name="fadetime" min="0" max="1000" displaytext="{tr(fadetext)}">0</parameter>
|
<parameter type="int" name="fadetime" min="0" max="1000" displaytext="{tr(fadetext)}">0</parameter>
|
||||||
<parameter type="bool" name="showdevices" displaytext="{tr(showdevices)}">0</parameter>
|
<parameter type="bool" name="showdevices" displaytext="{tr(showdevices)}">0</parameter>
|
||||||
</parameters>
|
</menu>
|
||||||
|
|
||||||
<!--
|
|
||||||
translations of displaytexts
|
|
||||||
-->
|
|
||||||
<translations>
|
<translations>
|
||||||
<token name="tr(fadetext)">
|
<token name="tr(fadetext)">
|
||||||
<trans lang="en_EN">Fade time in ms (needs VDR restart)</trans>
|
<trans lang="en_EN">Fade time in ms</trans>
|
||||||
<trans lang="de_DE">Einblendzeit in ms (erfordert VDR Neustart)</trans>
|
<trans lang="de_DE">Einblendzeit in ms</trans>
|
||||||
<trans lang="fi_FI">Häivytyksen kesto [ms] (uud.käynnistys)</trans>
|
<trans lang="fi_FI">Häivytyksen kesto [ms]</trans>
|
||||||
</token>
|
</token>
|
||||||
<token name="tr(showdevices)">
|
<token name="tr(showdevices)">
|
||||||
<trans lang="en_EN">Show DVB device info when switching channel</trans>
|
<trans lang="en_EN">Show DVB device info when switching channel</trans>
|
||||||
|
30
skins/nopacity/setup.xml
Normal file
30
skins/nopacity/setup.xml
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE setup SYSTEM "../../dtd/setup.dtd">
|
||||||
|
|
||||||
|
<setup>
|
||||||
|
<menu>
|
||||||
|
<parameter type="bool" name="showposter" displaytext="{tr(showpostertext)}">1</parameter>
|
||||||
|
<parameter type="bool" name="showweather" displaytext="{tr(showweather)}">1</parameter>
|
||||||
|
<parameter type="int" name="fadeTime" min="0" max="1000" displaytext="{tr(fadeText)}">300</parameter>
|
||||||
|
<parameter type="int" name="transparency" min="0" max="30" displaytext="{tr(transparency)}">20</parameter>
|
||||||
|
</menu>
|
||||||
|
|
||||||
|
<translations>
|
||||||
|
<token name="tr(showpostertext)">
|
||||||
|
<trans lang="en_EN">Show Poster when switching channel</trans>
|
||||||
|
<trans lang="de_DE">Poster beim Umschalten anzeigen</trans>
|
||||||
|
</token>
|
||||||
|
<token name="tr(showweather)">
|
||||||
|
<trans lang="en_EN">Show Weather in infobar</trans>
|
||||||
|
<trans lang="de_DE">Wetter in Infobar anzeigen</trans>
|
||||||
|
</token>
|
||||||
|
<token name="tr(fadeText)">
|
||||||
|
<trans lang="en_EN">Fade time in ms</trans>
|
||||||
|
<trans lang="de_DE">Einblendzeit in ms</trans>
|
||||||
|
</token>
|
||||||
|
<token name="tr(transparency)">
|
||||||
|
<trans lang="en_EN">Transpareny channel, replay and volume</trans>
|
||||||
|
<trans lang="de_DE">Transparenz bei Kanal,Wiedergabe und Lautstärke</trans>
|
||||||
|
</token>
|
||||||
|
</translations>
|
||||||
|
</setup>
|
@ -11,6 +11,7 @@
|
|||||||
<color name="clrTransWhite">99FFFFFF</color>
|
<color name="clrTransWhite">99FFFFFF</color>
|
||||||
<color name="clrBlack">FF000000</color>
|
<color name="clrBlack">FF000000</color>
|
||||||
<color name="clrProgressbar">FF3D0000</color>
|
<color name="clrProgressbar">FF3D0000</color>
|
||||||
|
<color name="clrScrollbar">FF3D0000</color>
|
||||||
<color name="clrBorder">FF2B0000</color>
|
<color name="clrBorder">FF2B0000</color>
|
||||||
<color name="clrGray">FF858585</color>
|
<color name="clrGray">FF858585</color>
|
||||||
<color name="clrBackground">B0000000</color>
|
<color name="clrBackground">B0000000</color>
|
||||||
@ -23,6 +24,5 @@
|
|||||||
<color name="clrTransparent">00000000</color>
|
<color name="clrTransparent">00000000</color>
|
||||||
</colors>
|
</colors>
|
||||||
<variables>
|
<variables>
|
||||||
<var type="int" name="fadeTime">300</var>
|
|
||||||
</variables>
|
</variables>
|
||||||
</globals>
|
</globals>
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
<color name="clrTransWhite">99FFFFFF</color>
|
<color name="clrTransWhite">99FFFFFF</color>
|
||||||
<color name="clrBlack">FF000000</color>
|
<color name="clrBlack">FF000000</color>
|
||||||
<color name="clrProgressbar">FF8EAB21</color>
|
<color name="clrProgressbar">FF8EAB21</color>
|
||||||
|
<color name="clrScrollbar">FF8EAB21</color>
|
||||||
<color name="clrBorder">FF4C5C11</color>
|
<color name="clrBorder">FF4C5C11</color>
|
||||||
<color name="clrGray">FF858585</color>
|
<color name="clrGray">FF858585</color>
|
||||||
<color name="clrBackground">B012273F</color>
|
<color name="clrBackground">B012273F</color>
|
||||||
@ -23,6 +24,5 @@
|
|||||||
<color name="clrTransparent">00000000</color>
|
<color name="clrTransparent">00000000</color>
|
||||||
</colors>
|
</colors>
|
||||||
<variables>
|
<variables>
|
||||||
<var type="int" name="fadeTime">300</var>
|
|
||||||
</variables>
|
</variables>
|
||||||
</globals>
|
</globals>
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<displaychannel x="0" y="0" width="100%" height="100%" fadetime="{fadeTime}">
|
<displaychannel x="0" y="0" width="100%" height="100%" fadetime="{fadeTime}">
|
||||||
|
|
||||||
<background>
|
<background>
|
||||||
<area x="1%" y="74%" width="98%" height="25%" layer="1" transparency="20">
|
<area x="1%" y="74%" width="98%" height="25%" layer="1" transparency="{transparency}">
|
||||||
<drawimage imagetype="skinpart" path="displaychannelback" x="0" y="0" width="100%" height="100%"/>
|
<drawimage imagetype="skinpart" path="displaychannelback" x="0" y="0" width="100%" height="100%"/>
|
||||||
</area>
|
</area>
|
||||||
<area x="1%" y="74%" width="98%" height="25%" layer="7">
|
<area x="1%" y="74%" width="98%" height="25%" layer="7">
|
||||||
@ -47,7 +47,7 @@
|
|||||||
</datetime>
|
</datetime>
|
||||||
|
|
||||||
<currentweather>
|
<currentweather>
|
||||||
<area x="60%" y="74%" width="18%" height="6%" layer="2">
|
<area condition="{showweather}" x="60%" y="74%" width="18%" height="6%" layer="2">
|
||||||
<drawimage name="weathericon" imagetype="icon" path="{icon}" x="{areawidth}/2 + {width(temperature)}/2 - {width(weathericon)}/2 + 5" valign="center" width="{areaheight}*0.7" height="{areaheight}*0.7"/>
|
<drawimage name="weathericon" imagetype="icon" path="{icon}" x="{areawidth}/2 + {width(temperature)}/2 - {width(weathericon)}/2 + 5" valign="center" width="{areaheight}*0.7" height="{areaheight}*0.7"/>
|
||||||
<drawtext name="temperature" x="{areawidth}/2 - {width(temperature)}/2 - {width(weathericon)}/2" valign="center" font="{vdrOsd}" fontsize="70%" color="{clrWhite}" text="{temperature}°C" />
|
<drawtext name="temperature" x="{areawidth}/2 - {width(temperature)}/2 - {width(weathericon)}/2" valign="center" font="{vdrOsd}" fontsize="70%" color="{clrWhite}" text="{temperature}°C" />
|
||||||
</area>
|
</area>
|
||||||
@ -195,10 +195,10 @@
|
|||||||
{isbanner} true if image is a banner, false if it is a poster
|
{isbanner} true if image is a banner, false if it is a poster
|
||||||
-->
|
-->
|
||||||
<scrapercontent>
|
<scrapercontent>
|
||||||
<area condition="{isbanner}" x="1%" y="1%" width="{areaheight}*0.13*{mediawidth}/{mediaheight}" height="13%" layer="2">
|
<area condition="{showposter}++{isbanner}" x="1%" y="1%" width="{areaheight}*0.13*{mediawidth}/{mediaheight}" height="13%" layer="2">
|
||||||
<drawimage imagetype="image" path="{mediapath}" align="center" valign="center" width="{areawidth}" height="{areaheight}"/>
|
<drawimage imagetype="image" path="{mediapath}" align="center" valign="center" width="{areawidth}" height="{areaheight}"/>
|
||||||
</area>
|
</area>
|
||||||
<area condition="not{isbanner}" x="1%" y="1%" width="{areaheight}*0.5*{mediawidth}/{mediaheight}" height="50%" layer="2">
|
<area condition="{showposter}++not{isbanner}" x="1%" y="1%" width="{areaheight}*0.5*{mediawidth}/{mediaheight}" height="50%" layer="2">
|
||||||
<drawimage imagetype="image" path="{mediapath}" x="5" y="5" width="{areawidth}-10" height="{areaheight}-10"/>
|
<drawimage imagetype="image" path="{mediapath}" x="5" y="5" width="{areawidth}-10" height="{areaheight}-10"/>
|
||||||
</area>
|
</area>
|
||||||
</scrapercontent>
|
</scrapercontent>
|
||||||
@ -211,14 +211,14 @@
|
|||||||
{error} true if message is a error message
|
{error} true if message is a error message
|
||||||
-->
|
-->
|
||||||
<message>
|
<message>
|
||||||
<area x="5%" y="58%" width="90%" height="15%" layer="6">
|
<area x="5%" y="88%" width="90%" height="10%" layer="6">
|
||||||
<drawimage condition="{status}" imagetype="skinpart" path="messageStatus" x="0" y="0" width="100%" height="100%" />
|
<drawimage condition="{status}" imagetype="skinpart" path="messageStatus" x="0" y="0" width="100%" height="100%" />
|
||||||
<drawimage condition="{info}" imagetype="skinpart" path="messageInfo" x="0" y="0" width="100%" height="100%" />
|
<drawimage condition="{info}" imagetype="skinpart" path="messageInfo" x="0" y="0" width="100%" height="100%" />
|
||||||
<drawimage condition="{warning}" imagetype="skinpart" path="messageWarning" x="0" y="0" width="100%" height="100%" />
|
<drawimage condition="{warning}" imagetype="skinpart" path="messageWarning" x="0" y="0" width="100%" height="100%" />
|
||||||
<drawimage condition="{error}" imagetype="skinpart" path="messageError" x="0" y="0" width="100%" height="100%" />
|
<drawimage condition="{error}" imagetype="skinpart" path="messageError" x="0" y="0" width="100%" height="100%" />
|
||||||
</area>
|
</area>
|
||||||
<area x="5%" y="58%" width="90%" height="15%" layer="7">
|
<area x="5%" y="88%" width="90%" height="10%" layer="7">
|
||||||
<drawtext align="center" valign="center" font="{light}" fontsize="40%" color="{clrWhite}" text="{text}" />
|
<drawtext align="center" valign="center" font="{light}" fontsize="50%" color="{clrWhite}" text="{text}" />
|
||||||
</area>
|
</area>
|
||||||
</message>
|
</message>
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<area x="30%" y="11%" width="2%" height="78%" layer="2">
|
<area x="30%" y="11%" width="2%" height="78%" layer="2">
|
||||||
<fill color="{clrBorder}" />
|
<fill color="{clrBorder}" />
|
||||||
<drawrectangle x="2" y="2" width="{areawidth} - 4" height="{areaheight} - 4" color="{clrTransparent}" />
|
<drawrectangle x="2" y="2" width="{areawidth} - 4" height="{areaheight} - 4" color="{clrTransparent}" />
|
||||||
<drawrectangle x="4" y="4 + {areaheight} * {offset} / 1000" width="{areawidth} - 8" height="{areaheight} * {height} / 1000 - 8" color="{clrProgressbar}" />
|
<drawrectangle x="4" y="4 + {areaheight} * {offset} / 1000" width="{areawidth} - 8" height="{areaheight} * {height} / 1000 - 8" color="{clrScrollbar}" />
|
||||||
</area>
|
</area>
|
||||||
</scrollbar>
|
</scrollbar>
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
<area x="97%" y="25%" width="2%" height="60%" layer="2">
|
<area x="97%" y="25%" width="2%" height="60%" layer="2">
|
||||||
<fill color="{clrBorder}" />
|
<fill color="{clrBorder}" />
|
||||||
<drawrectangle x="2" y="2" width="{areawidth} - 4" height="{areaheight} - 4" color="{clrTransparent}" />
|
<drawrectangle x="2" y="2" width="{areawidth} - 4" height="{areaheight} - 4" color="{clrTransparent}" />
|
||||||
<drawrectangle x="4" y="4 + {areaheight} * {offset} / 1000" width="{areawidth} - 8" height="{areaheight} * {height} / 1000 - 8" color="{clrProgressbar}" />
|
<drawrectangle x="4" y="4 + {areaheight} * {offset} / 1000" width="{areawidth} - 8" height="{areaheight} * {height} / 1000 - 8" color="{clrScrollbar}" />
|
||||||
</area>
|
</area>
|
||||||
</scrollbar>
|
</scrollbar>
|
||||||
<!-- Available Variables in detailheader elements:
|
<!-- Available Variables in detailheader elements:
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
<area x="97%" y="25%" width="2%" height="60%" layer="2">
|
<area x="97%" y="25%" width="2%" height="60%" layer="2">
|
||||||
<fill color="{clrBorder}" />
|
<fill color="{clrBorder}" />
|
||||||
<drawrectangle x="2" y="2" width="{areawidth} - 4" height="{areaheight} - 4" color="{clrTransparent}" />
|
<drawrectangle x="2" y="2" width="{areawidth} - 4" height="{areaheight} - 4" color="{clrTransparent}" />
|
||||||
<drawrectangle x="4" y="4 + {areaheight} * {offset} / 1000" width="{areawidth} - 8" height="{areaheight} * {height} / 1000 - 8" color="{clrProgressbar}" />
|
<drawrectangle x="4" y="4 + {areaheight} * {offset} / 1000" width="{areawidth} - 8" height="{areaheight} * {height} / 1000 - 8" color="{clrScrollbar}" />
|
||||||
</area>
|
</area>
|
||||||
</scrollbar>
|
</scrollbar>
|
||||||
<!-- Available Variables in detailheader elements:
|
<!-- Available Variables in detailheader elements:
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
<area x="97%" y="11%" width="2%" height="79%" layer="2">
|
<area x="97%" y="11%" width="2%" height="79%" layer="2">
|
||||||
<fill color="{clrBorder}" />
|
<fill color="{clrBorder}" />
|
||||||
<drawrectangle x="2" y="2" width="{areawidth} - 4" height="{areaheight} - 4" color="{clrTransparent}" />
|
<drawrectangle x="2" y="2" width="{areawidth} - 4" height="{areaheight} - 4" color="{clrTransparent}" />
|
||||||
<drawrectangle x="4" y="4 + {areaheight} * {offset} / 1000" width="{areawidth} - 8" height="{areaheight} * {height} / 1000 - 8" color="{clrProgressbar}" />
|
<drawrectangle x="4" y="4 + {areaheight} * {offset} / 1000" width="{areawidth} - 8" height="{areaheight} * {height} / 1000 - 8" color="{clrScrollbar}" />
|
||||||
</area>
|
</area>
|
||||||
</scrollbar>
|
</scrollbar>
|
||||||
<!-- Available Variables in tab elements:
|
<!-- Available Variables in tab elements:
|
||||||
|
@ -49,7 +49,7 @@
|
|||||||
<area x="30%" y="11%" width="2%" height="78%" layer="2">
|
<area x="30%" y="11%" width="2%" height="78%" layer="2">
|
||||||
<fill color="{clrBorder}" />
|
<fill color="{clrBorder}" />
|
||||||
<drawrectangle x="2" y="2" width="{areawidth} - 4" height="{areaheight} - 4" color="{clrTransparent}" />
|
<drawrectangle x="2" y="2" width="{areawidth} - 4" height="{areaheight} - 4" color="{clrTransparent}" />
|
||||||
<drawrectangle x="4" y="4 + {areaheight} * {offset} / 1000" width="{areawidth} - 8" height="{areaheight} * {height} / 1000 - 8" color="{clrProgressbar}" />
|
<drawrectangle x="4" y="4 + {areaheight} * {offset} / 1000" width="{areawidth} - 8" height="{areaheight} * {height} / 1000 - 8" color="{clrScrollbar}" />
|
||||||
</area>
|
</area>
|
||||||
</scrollbar>
|
</scrollbar>
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<area x="30%" y="11%" width="2%" height="78%" layer="2">
|
<area x="30%" y="11%" width="2%" height="78%" layer="2">
|
||||||
<fill color="{clrBorder}" />
|
<fill color="{clrBorder}" />
|
||||||
<drawrectangle x="2" y="2" width="{areawidth} - 4" height="{areaheight} - 4" color="{clrTransparent}" />
|
<drawrectangle x="2" y="2" width="{areawidth} - 4" height="{areaheight} - 4" color="{clrTransparent}" />
|
||||||
<drawrectangle x="4" y="4 + {areaheight} * {offset} / 1000" width="{areawidth} - 8" height="{areaheight} * {height} / 1000 - 8" color="{clrProgressbar}" />
|
<drawrectangle x="4" y="4 + {areaheight} * {offset} / 1000" width="{areawidth} - 8" height="{areaheight} * {height} / 1000 - 8" color="{clrScrollbar}" />
|
||||||
</area>
|
</area>
|
||||||
</scrollbar>
|
</scrollbar>
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
<area x="30%" y="11%" width="2%" height="78%" layer="2">
|
<area x="30%" y="11%" width="2%" height="78%" layer="2">
|
||||||
<fill color="{clrBorder}" />
|
<fill color="{clrBorder}" />
|
||||||
<drawrectangle x="2" y="2" width="{areawidth} - 4" height="{areaheight} - 4" color="{clrTransparent}" />
|
<drawrectangle x="2" y="2" width="{areawidth} - 4" height="{areaheight} - 4" color="{clrTransparent}" />
|
||||||
<drawrectangle x="4" y="4 + {areaheight} * {offset} / 1000" width="{areawidth} - 8" height="{areaheight} * {height} / 1000 - 8" color="{clrProgressbar}" />
|
<drawrectangle x="4" y="4 + {areaheight} * {offset} / 1000" width="{areawidth} - 8" height="{areaheight} * {height} / 1000 - 8" color="{clrScrollbar}" />
|
||||||
</area>
|
</area>
|
||||||
</scrollbar>
|
</scrollbar>
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<area x="30%" y="11%" width="2%" height="78%" layer="2">
|
<area x="30%" y="11%" width="2%" height="78%" layer="2">
|
||||||
<fill color="{clrBorder}" />
|
<fill color="{clrBorder}" />
|
||||||
<drawrectangle x="2" y="2" width="{areawidth} - 4" height="{areaheight} - 4" color="{clrTransparent}" />
|
<drawrectangle x="2" y="2" width="{areawidth} - 4" height="{areaheight} - 4" color="{clrTransparent}" />
|
||||||
<drawrectangle x="4" y="4 + {areaheight} * {offset} / 1000" width="{areawidth} - 8" height="{areaheight} * {height} / 1000 - 8" color="{clrProgressbar}" />
|
<drawrectangle x="4" y="4 + {areaheight} * {offset} / 1000" width="{areawidth} - 8" height="{areaheight} * {height} / 1000 - 8" color="{clrScrollbar}" />
|
||||||
</area>
|
</area>
|
||||||
</scrollbar>
|
</scrollbar>
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<area x="30%" y="11%" width="2%" height="78%" layer="2">
|
<area x="30%" y="11%" width="2%" height="78%" layer="2">
|
||||||
<fill color="{clrBorder}" />
|
<fill color="{clrBorder}" />
|
||||||
<drawrectangle x="2" y="2" width="{areawidth} - 4" height="{areaheight} - 4" color="{clrTransparent}" />
|
<drawrectangle x="2" y="2" width="{areawidth} - 4" height="{areaheight} - 4" color="{clrTransparent}" />
|
||||||
<drawrectangle x="4" y="4 + {areaheight} * {offset} / 1000" width="{areawidth} - 8" height="{areaheight} * {height} / 1000 - 8" color="{clrProgressbar}" />
|
<drawrectangle x="4" y="4 + {areaheight} * {offset} / 1000" width="{areawidth} - 8" height="{areaheight} * {height} / 1000 - 8" color="{clrScrollbar}" />
|
||||||
</area>
|
</area>
|
||||||
</scrollbar>
|
</scrollbar>
|
||||||
|
|
||||||
|
@ -14,14 +14,14 @@
|
|||||||
{error} true if message is a error message
|
{error} true if message is a error message
|
||||||
-->
|
-->
|
||||||
<message>
|
<message>
|
||||||
<area x="5%" y="80%" width="90%" height="15%" layer="6">
|
<area x="5%" y="88%" width="90%" height="10%" layer="6">
|
||||||
<drawimage condition="{status}" imagetype="skinpart" path="messageStatus" x="0" y="0" width="100%" height="100%" />
|
<drawimage condition="{status}" imagetype="skinpart" path="messageStatus" x="0" y="0" width="100%" height="100%" />
|
||||||
<drawimage condition="{info}" imagetype="skinpart" path="messageInfo" x="0" y="0" width="100%" height="100%" />
|
<drawimage condition="{info}" imagetype="skinpart" path="messageInfo" x="0" y="0" width="100%" height="100%" />
|
||||||
<drawimage condition="{warning}" imagetype="skinpart" path="messageWarning" x="0" y="0" width="100%" height="100%" />
|
<drawimage condition="{warning}" imagetype="skinpart" path="messageWarning" x="0" y="0" width="100%" height="100%" />
|
||||||
<drawimage condition="{error}" imagetype="skinpart" path="messageError" x="0" y="0" width="100%" height="100%" />
|
<drawimage condition="{error}" imagetype="skinpart" path="messageError" x="0" y="0" width="100%" height="100%" />
|
||||||
</area>
|
</area>
|
||||||
<area x="5%" y="80%" width="90%" height="15%" layer="7">
|
<area x="5%" y="88%" width="90%" height="10%" layer="7">
|
||||||
<drawtext align="center" valign="center" font="{light}" fontsize="40%" color="{clrWhite}" text="{text}" />
|
<drawtext align="center" valign="center" font="{light}" fontsize="50%" color="{clrWhite}" text="{text}" />
|
||||||
</area>
|
</area>
|
||||||
</message>
|
</message>
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<displayreplay x="0" y="0" width="100%" height="100%" fadetime="{fadeTime}">
|
<displayreplay x="0" y="0" width="100%" height="100%" fadetime="{fadeTime}">
|
||||||
|
|
||||||
<background>
|
<background>
|
||||||
<area x="1%" y="74%" width="98%" height="25%" layer="1" transparency="20">
|
<area x="1%" y="74%" width="98%" height="25%" layer="1" transparency="{transparency}">
|
||||||
<drawimage imagetype="skinpart" path="displayreplayback" x="0" y="0" width="100%" height="100%"/>
|
<drawimage imagetype="skinpart" path="displayreplayback" x="0" y="0" width="100%" height="100%"/>
|
||||||
</area>
|
</area>
|
||||||
<area x="1%" y="74%" width="98%" height="25%" layer="7">
|
<area x="1%" y="74%" width="98%" height="25%" layer="7">
|
||||||
@ -204,14 +204,14 @@
|
|||||||
{error} true if message is a error message
|
{error} true if message is a error message
|
||||||
-->
|
-->
|
||||||
<message>
|
<message>
|
||||||
<area x="5%" y="58%" width="90%" height="15%" layer="6">
|
<area x="5%" y="88%" width="90%" height="10%" layer="6">
|
||||||
<drawimage condition="{status}" imagetype="skinpart" path="messageStatus" x="0" y="0" width="100%" height="100%" />
|
<drawimage condition="{status}" imagetype="skinpart" path="messageStatus" x="0" y="0" width="100%" height="100%" />
|
||||||
<drawimage condition="{info}" imagetype="skinpart" path="messageInfo" x="0" y="0" width="100%" height="100%" />
|
<drawimage condition="{info}" imagetype="skinpart" path="messageInfo" x="0" y="0" width="100%" height="100%" />
|
||||||
<drawimage condition="{warning}" imagetype="skinpart" path="messageWarning" x="0" y="0" width="100%" height="100%" />
|
<drawimage condition="{warning}" imagetype="skinpart" path="messageWarning" x="0" y="0" width="100%" height="100%" />
|
||||||
<drawimage condition="{error}" imagetype="skinpart" path="messageError" x="0" y="0" width="100%" height="100%" />
|
<drawimage condition="{error}" imagetype="skinpart" path="messageError" x="0" y="0" width="100%" height="100%" />
|
||||||
</area>
|
</area>
|
||||||
<area x="5%" y="58%" width="90%" height="15%" layer="7">
|
<area x="5%" y="88%" width="90%" height="10%" layer="7">
|
||||||
<drawtext align="center" valign="center" font="{light}" fontsize="40%" color="{clrWhite}" text="{text}" />
|
<drawtext align="center" valign="center" font="{light}" fontsize="50%" color="{clrWhite}" text="{text}" />
|
||||||
</area>
|
</area>
|
||||||
</message>
|
</message>
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
-->
|
-->
|
||||||
<volume>
|
<volume>
|
||||||
<!-- Background -->
|
<!-- Background -->
|
||||||
<area x="0" y="0" width="100%" height="100%" layer="1" transparency="20">
|
<area x="0" y="0" width="100%" height="100%" layer="1" transparency="{transparency}">
|
||||||
<drawimage imagetype="skinpart" path="displayvolume" x="0" y="0" width="100%" height="100%"/>
|
<drawimage imagetype="skinpart" path="displayvolume" x="0" y="0" width="100%" height="100%"/>
|
||||||
</area>
|
</area>
|
||||||
<!-- Header -->
|
<!-- Header -->
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<area x="30%" y="11%" width="2%" height="78%" layer="2">
|
<area x="30%" y="11%" width="2%" height="78%" layer="2">
|
||||||
<fill color="{clrBorder}" />
|
<fill color="{clrBorder}" />
|
||||||
<drawrectangle x="2" y="2" width="{areawidth} - 4" height="{areaheight} - 4" color="{clrTransparent}" />
|
<drawrectangle x="2" y="2" width="{areawidth} - 4" height="{areaheight} - 4" color="{clrTransparent}" />
|
||||||
<drawrectangle x="4" y="4 + {areaheight} * {offset} / 1000" width="{areawidth} - 8" height="{areaheight} * {height} / 1000 - 8" color="{clrProgressbar}" />
|
<drawrectangle x="4" y="4 + {areaheight} * {offset} / 1000" width="{areawidth} - 8" height="{areaheight} * {height} / 1000 - 8" color="{clrScrollbar}" />
|
||||||
</area>
|
</area>
|
||||||
</scrollbar>
|
</scrollbar>
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
<area x="97%" y="25%" width="2%" height="60%" layer="2">
|
<area x="97%" y="25%" width="2%" height="60%" layer="2">
|
||||||
<fill color="{clrBorder}" />
|
<fill color="{clrBorder}" />
|
||||||
<drawrectangle x="2" y="2" width="{areawidth} - 4" height="{areaheight} - 4" color="{clrTransparent}" />
|
<drawrectangle x="2" y="2" width="{areawidth} - 4" height="{areaheight} - 4" color="{clrTransparent}" />
|
||||||
<drawrectangle x="4" y="4 + {areaheight} * {offset} / 1000" width="{areawidth} - 8" height="{areaheight} * {height} / 1000 - 8" color="{clrProgressbar}" />
|
<drawrectangle x="4" y="4 + {areaheight} * {offset} / 1000" width="{areawidth} - 8" height="{areaheight} * {height} / 1000 - 8" color="{clrScrollbar}" />
|
||||||
</area>
|
</area>
|
||||||
</scrollbar>
|
</scrollbar>
|
||||||
<!-- Available Variables in detailheader and tab:
|
<!-- Available Variables in detailheader and tab:
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
<area x="97%" y="25%" width="2%" height="60%" layer="2">
|
<area x="97%" y="25%" width="2%" height="60%" layer="2">
|
||||||
<fill color="{clrBorder}" />
|
<fill color="{clrBorder}" />
|
||||||
<drawrectangle x="2" y="2" width="{areawidth} - 4" height="{areaheight} - 4" color="{clrTransparent}" />
|
<drawrectangle x="2" y="2" width="{areawidth} - 4" height="{areaheight} - 4" color="{clrTransparent}" />
|
||||||
<drawrectangle x="4" y="4 + {areaheight} * {offset} / 1000" width="{areawidth} - 8" height="{areaheight} * {height} / 1000 - 8" color="{clrProgressbar}" />
|
<drawrectangle x="4" y="4 + {areaheight} * {offset} / 1000" width="{areawidth} - 8" height="{areaheight} * {height} / 1000 - 8" color="{clrScrollbar}" />
|
||||||
</area>
|
</area>
|
||||||
</scrollbar>
|
</scrollbar>
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
<area x="97%" y="25%" width="2%" height="60%" layer="2">
|
<area x="97%" y="25%" width="2%" height="60%" layer="2">
|
||||||
<fill color="{clrBorder}" />
|
<fill color="{clrBorder}" />
|
||||||
<drawrectangle x="2" y="2" width="{areawidth} - 4" height="{areaheight} - 4" color="{clrTransparent}" />
|
<drawrectangle x="2" y="2" width="{areawidth} - 4" height="{areaheight} - 4" color="{clrTransparent}" />
|
||||||
<drawrectangle x="4" y="4 + {areaheight} * {offset} / 1000" width="{areawidth} - 8" height="{areaheight} * {height} / 1000 - 8" color="{clrProgressbar}" />
|
<drawrectangle x="4" y="4 + {areaheight} * {offset} / 1000" width="{areawidth} - 8" height="{areaheight} * {height} / 1000 - 8" color="{clrScrollbar}" />
|
||||||
</area>
|
</area>
|
||||||
</scrollbar>
|
</scrollbar>
|
||||||
|
|
||||||
|
@ -5,15 +5,20 @@
|
|||||||
<!--
|
<!--
|
||||||
define all your parameters here which should be configurable via
|
define all your parameters here which should be configurable via
|
||||||
OSD and the skindesigner setup menu.
|
OSD and the skindesigner setup menu.
|
||||||
|
<submenu> and <parameter> tags are allowed, <submenu> can be nested
|
||||||
|
with arbitrary depth.
|
||||||
|
Submenus must carry the attributes "name" and "displaytext". "name"
|
||||||
|
is for internal usage, "displaytext" is used for displaying the submenu
|
||||||
|
in the menu and can be an translation token
|
||||||
Parameters must have type "bool" or "integer". For "bool" Parameters
|
Parameters must have type "bool" or "integer". For "bool" Parameters
|
||||||
a choice yes/no is shown in the setup menu, a "integer" parameter
|
a choice yes/no is shown in the setup menu, a "integer" parameter
|
||||||
can be configured to a value between "min" and "max". If "min" is not
|
can be configured to a value between "min" and "max". If "min" is not
|
||||||
set, "0" is the minimum, if "max" is not set, "1000" is maximum.
|
set, "0" is the minimum, if "max" is not set, "1000" is maximum.
|
||||||
"displayname" is used to display the option in the setup menu.
|
"displaytext" is used to display the option in the setup menu.
|
||||||
The configured parameter value is the default value.
|
The configured parameter value is the default value.
|
||||||
-->
|
-->
|
||||||
<parameters>
|
<menu>
|
||||||
</parameters>
|
</menu>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
translations of displaytexts
|
translations of displaytexts
|
||||||
|
Loading…
Reference in New Issue
Block a user