mirror of
https://projects.vdr-developer.org/git/vdr-plugin-skindesigner.git
synced 2023-10-19 17:58:31 +02:00
changed display of menu lists, do flush first after complete rendering
This commit is contained in:
parent
effc63e810
commit
04340d11c9
3
HISTORY
3
HISTORY
@ -17,4 +17,5 @@ Version 0.0.2
|
||||
- added discusage icons to menu header view element so that it discusage can be displayed in every menu view
|
||||
- added numeric day, month and year tokens in different view elements
|
||||
- support for global variables type "double"
|
||||
- added setup options to configure rerun display behaviour
|
||||
- added setup options to configure rerun display behaviour
|
||||
- changed display of menu lists, do flush first after complete rendering
|
||||
|
@ -76,6 +76,7 @@ bool cSDDisplayMenu::SetItemEvent(const cEvent *Event, int Index, bool Current,
|
||||
return true;
|
||||
if (!rootView->SubViewAvailable())
|
||||
return false;
|
||||
rootView->LockFlush();
|
||||
if (Current) {
|
||||
if (Channel) {
|
||||
rootView->SetChannel(Channel);
|
||||
@ -97,6 +98,7 @@ bool cSDDisplayMenu::SetItemTimer(const cTimer *Timer, int Index, bool Current,
|
||||
return true;
|
||||
if (!rootView->SubViewAvailable())
|
||||
return false;
|
||||
rootView->LockFlush();
|
||||
cDisplayMenuListView *list = rootView->GetListView();
|
||||
if (!list)
|
||||
return false;
|
||||
@ -111,6 +113,7 @@ bool cSDDisplayMenu::SetItemChannel(const cChannel *Channel, int Index, bool Cur
|
||||
return true;
|
||||
if (!rootView->SubViewAvailable())
|
||||
return false;
|
||||
rootView->LockFlush();
|
||||
cDisplayMenuListView *list = rootView->GetListView();
|
||||
if (!list)
|
||||
return false;
|
||||
@ -125,6 +128,7 @@ bool cSDDisplayMenu::SetItemRecording(const cRecording *Recording, int Index, bo
|
||||
return true;
|
||||
if (!rootView->SubViewAvailable())
|
||||
return false;
|
||||
rootView->LockFlush();
|
||||
cDisplayMenuListView *list = rootView->GetListView();
|
||||
if (!list)
|
||||
return false;
|
||||
@ -141,6 +145,7 @@ void cSDDisplayMenu::SetItem(const char *Text, int Index, bool Current, bool Sel
|
||||
if (!list) {
|
||||
return;
|
||||
}
|
||||
rootView->LockFlush();
|
||||
eMenuCategory cat = MenuCategory();
|
||||
if (cat == mcMain) {
|
||||
list->AddMainMenuItem(Index, Text, Current, Selectable);
|
||||
@ -208,26 +213,32 @@ void cSDDisplayMenu::SetText(const char *Text, bool FixedFont) {
|
||||
void cSDDisplayMenu::Flush(void) {
|
||||
if (!doOutput)
|
||||
return;
|
||||
bool doFlush = false;
|
||||
if (state == vsInit) {
|
||||
rootView->Start();
|
||||
rootView->RenderMenuItems();
|
||||
rootView->DoFlush();
|
||||
doFlush = true;
|
||||
} else if (state == vsMenuInit) {
|
||||
rootView->Render();
|
||||
rootView->DoFlush();
|
||||
rootView->RenderMenuItems();
|
||||
rootView->DoFlush();
|
||||
doFlush = true;
|
||||
} else if (state == vsMenuUpdate) {
|
||||
rootView->RenderMenuItems();
|
||||
rootView->DoFlush();
|
||||
doFlush = true;
|
||||
} else if (state == vsMenuDetail) {
|
||||
rootView->OpenFlush();
|
||||
rootView->Render();
|
||||
rootView->DoFlush();
|
||||
rootView->RenderDetailView();
|
||||
rootView->DoFlush();
|
||||
} else {
|
||||
if (rootView->RenderDynamicElements())
|
||||
rootView->DoFlush();
|
||||
if (rootView->RenderDynamicElements()) {
|
||||
doFlush = true;
|
||||
}
|
||||
}
|
||||
if (doFlush) {
|
||||
rootView->OpenFlush();
|
||||
rootView->DoFlush();
|
||||
}
|
||||
state = vsIdle;
|
||||
}
|
||||
|
@ -27,8 +27,6 @@ protected:
|
||||
void SetInitFinished(void) { pixContainerInit = false; };
|
||||
bool CreateOsd(int Left, int Top, int Width, int Height);
|
||||
void DeleteOsdOnExit(void) { deleteOsdOnExit = true; };
|
||||
void LockFlush(void);
|
||||
void OpenFlush(void);
|
||||
//Wrappers for access to pixmaps
|
||||
bool PixmapExists(int num);
|
||||
int NumPixmaps(void) { return numPixmaps; };
|
||||
@ -66,6 +64,8 @@ protected:
|
||||
public:
|
||||
cPixmapContainer(int numPixmaps);
|
||||
virtual ~cPixmapContainer(void);
|
||||
void LockFlush(void);
|
||||
void OpenFlush(void);
|
||||
void DoFlush(void);
|
||||
virtual void Action(void) {};
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user