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
1
HISTORY
1
HISTORY
@ -18,3 +18,4 @@ Version 0.0.2
|
|||||||
- added numeric day, month and year tokens in different view elements
|
- added numeric day, month and year tokens in different view elements
|
||||||
- support for global variables type "double"
|
- 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;
|
return true;
|
||||||
if (!rootView->SubViewAvailable())
|
if (!rootView->SubViewAvailable())
|
||||||
return false;
|
return false;
|
||||||
|
rootView->LockFlush();
|
||||||
if (Current) {
|
if (Current) {
|
||||||
if (Channel) {
|
if (Channel) {
|
||||||
rootView->SetChannel(Channel);
|
rootView->SetChannel(Channel);
|
||||||
@ -97,6 +98,7 @@ bool cSDDisplayMenu::SetItemTimer(const cTimer *Timer, int Index, bool Current,
|
|||||||
return true;
|
return true;
|
||||||
if (!rootView->SubViewAvailable())
|
if (!rootView->SubViewAvailable())
|
||||||
return false;
|
return false;
|
||||||
|
rootView->LockFlush();
|
||||||
cDisplayMenuListView *list = rootView->GetListView();
|
cDisplayMenuListView *list = rootView->GetListView();
|
||||||
if (!list)
|
if (!list)
|
||||||
return false;
|
return false;
|
||||||
@ -111,6 +113,7 @@ bool cSDDisplayMenu::SetItemChannel(const cChannel *Channel, int Index, bool Cur
|
|||||||
return true;
|
return true;
|
||||||
if (!rootView->SubViewAvailable())
|
if (!rootView->SubViewAvailable())
|
||||||
return false;
|
return false;
|
||||||
|
rootView->LockFlush();
|
||||||
cDisplayMenuListView *list = rootView->GetListView();
|
cDisplayMenuListView *list = rootView->GetListView();
|
||||||
if (!list)
|
if (!list)
|
||||||
return false;
|
return false;
|
||||||
@ -125,6 +128,7 @@ bool cSDDisplayMenu::SetItemRecording(const cRecording *Recording, int Index, bo
|
|||||||
return true;
|
return true;
|
||||||
if (!rootView->SubViewAvailable())
|
if (!rootView->SubViewAvailable())
|
||||||
return false;
|
return false;
|
||||||
|
rootView->LockFlush();
|
||||||
cDisplayMenuListView *list = rootView->GetListView();
|
cDisplayMenuListView *list = rootView->GetListView();
|
||||||
if (!list)
|
if (!list)
|
||||||
return false;
|
return false;
|
||||||
@ -141,6 +145,7 @@ void cSDDisplayMenu::SetItem(const char *Text, int Index, bool Current, bool Sel
|
|||||||
if (!list) {
|
if (!list) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
rootView->LockFlush();
|
||||||
eMenuCategory cat = MenuCategory();
|
eMenuCategory cat = MenuCategory();
|
||||||
if (cat == mcMain) {
|
if (cat == mcMain) {
|
||||||
list->AddMainMenuItem(Index, Text, Current, Selectable);
|
list->AddMainMenuItem(Index, Text, Current, Selectable);
|
||||||
@ -208,25 +213,31 @@ void cSDDisplayMenu::SetText(const char *Text, bool FixedFont) {
|
|||||||
void cSDDisplayMenu::Flush(void) {
|
void cSDDisplayMenu::Flush(void) {
|
||||||
if (!doOutput)
|
if (!doOutput)
|
||||||
return;
|
return;
|
||||||
|
bool doFlush = false;
|
||||||
if (state == vsInit) {
|
if (state == vsInit) {
|
||||||
rootView->Start();
|
rootView->Start();
|
||||||
rootView->RenderMenuItems();
|
rootView->RenderMenuItems();
|
||||||
rootView->DoFlush();
|
doFlush = true;
|
||||||
} else if (state == vsMenuInit) {
|
} else if (state == vsMenuInit) {
|
||||||
rootView->Render();
|
rootView->Render();
|
||||||
rootView->DoFlush();
|
|
||||||
rootView->RenderMenuItems();
|
rootView->RenderMenuItems();
|
||||||
rootView->DoFlush();
|
doFlush = true;
|
||||||
} else if (state == vsMenuUpdate) {
|
} else if (state == vsMenuUpdate) {
|
||||||
rootView->RenderMenuItems();
|
rootView->RenderMenuItems();
|
||||||
rootView->DoFlush();
|
doFlush = true;
|
||||||
} else if (state == vsMenuDetail) {
|
} else if (state == vsMenuDetail) {
|
||||||
|
rootView->OpenFlush();
|
||||||
rootView->Render();
|
rootView->Render();
|
||||||
rootView->DoFlush();
|
rootView->DoFlush();
|
||||||
rootView->RenderDetailView();
|
rootView->RenderDetailView();
|
||||||
rootView->DoFlush();
|
rootView->DoFlush();
|
||||||
} else {
|
} else {
|
||||||
if (rootView->RenderDynamicElements())
|
if (rootView->RenderDynamicElements()) {
|
||||||
|
doFlush = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (doFlush) {
|
||||||
|
rootView->OpenFlush();
|
||||||
rootView->DoFlush();
|
rootView->DoFlush();
|
||||||
}
|
}
|
||||||
state = vsIdle;
|
state = vsIdle;
|
||||||
|
@ -27,8 +27,6 @@ protected:
|
|||||||
void SetInitFinished(void) { pixContainerInit = false; };
|
void SetInitFinished(void) { pixContainerInit = false; };
|
||||||
bool CreateOsd(int Left, int Top, int Width, int Height);
|
bool CreateOsd(int Left, int Top, int Width, int Height);
|
||||||
void DeleteOsdOnExit(void) { deleteOsdOnExit = true; };
|
void DeleteOsdOnExit(void) { deleteOsdOnExit = true; };
|
||||||
void LockFlush(void);
|
|
||||||
void OpenFlush(void);
|
|
||||||
//Wrappers for access to pixmaps
|
//Wrappers for access to pixmaps
|
||||||
bool PixmapExists(int num);
|
bool PixmapExists(int num);
|
||||||
int NumPixmaps(void) { return numPixmaps; };
|
int NumPixmaps(void) { return numPixmaps; };
|
||||||
@ -66,6 +64,8 @@ protected:
|
|||||||
public:
|
public:
|
||||||
cPixmapContainer(int numPixmaps);
|
cPixmapContainer(int numPixmaps);
|
||||||
virtual ~cPixmapContainer(void);
|
virtual ~cPixmapContainer(void);
|
||||||
|
void LockFlush(void);
|
||||||
|
void OpenFlush(void);
|
||||||
void DoFlush(void);
|
void DoFlush(void);
|
||||||
virtual void Action(void) {};
|
virtual void Action(void) {};
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user