improved menu icon display

This commit is contained in:
louis
2014-10-26 08:26:44 +01:00
parent 1e20f0c893
commit 52d9280c66
10 changed files with 67 additions and 8 deletions

View File

@@ -199,7 +199,46 @@ cImage *cImageCache::GetIcon(eImageType type, string name, int width, int height
return NULL;
}
string cImageCache::GetIconName(string label) {
string cImageCache::GetIconName(string label, eMenuCategory cat) {
//if cat is set, use standard menu entries
switch (cat) {
case mcSchedule:
case mcScheduleNow:
case mcScheduleNext:
case mcEvent:
return "standardicons/Schedule";
case mcChannel:
case mcChannelEdit:
return "standardicons/Channels";
case mcTimer:
case mcTimerEdit:
return "standardicons/Timers";
case mcRecording:
case mcRecordingInfo:
case mcSetupRecord:
case mcSetupReplay:
return "standardicons/Recordings";
case mcPlugin:
case mcPluginSetup:
case mcSetupPlugins:
return "standardicons/Plugins";
case mcSetup:
return "standardicons/Setup";
case mcSetupOsd:
return "standardicons/OSD";
case mcSetupEpg:
return "standardicons/EPG";
case mcSetupDvb:
return "standardicons/DVB";
case mcSetupLnb:
return "standardicons/LNB";
case mcSetupCam:
return "standardicons/CAM";
case mcSetupMisc:
return "standardicons/Miscellaneous";
case mcCommand:
return "standardicons/Commands";
}
//check for standard menu entries
for (int i=0; i<16; i++) {
string s = trVDR(items[i].c_str());

View File

@@ -28,7 +28,7 @@ public:
//icons
void CacheIcon(eImageType type, string path, int width, int height);
cImage *GetIcon(eImageType type, string name, int width, int height);
string GetIconName(string label);
string GetIconName(string label, eMenuCategory cat = mcUndefined);
//skinparts
void CacheSkinpart(string path, int width, int height);
cImage *GetSkinpart(string name, int width, int height);