mirror of
https://projects.vdr-developer.org/git/vdr-plugin-skindesigner.git
synced 2023-10-19 17:58:31 +02:00
fixed bug that listelements were not drawn after scrolling
This commit is contained in:
parent
dddb273526
commit
6acc22e5c2
@ -120,7 +120,10 @@ void cScroller::Init(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void cScroller::Reactivate(void) {}
|
void cScroller::Reactivate(void) {}
|
||||||
void cScroller::SetInitial(void) {}
|
|
||||||
|
void cScroller::SetInitial(void) {
|
||||||
|
scrollable->SetScrollingStarted();
|
||||||
|
}
|
||||||
|
|
||||||
bool cScroller::Pause(void) {
|
bool cScroller::Pause(void) {
|
||||||
if (!paused)
|
if (!paused)
|
||||||
|
@ -74,6 +74,7 @@ public:
|
|||||||
virtual eScrollMode ScrollMode(void) = 0;
|
virtual eScrollMode ScrollMode(void) = 0;
|
||||||
virtual eScrollSpeed ScrollSpeed(void) = 0;
|
virtual eScrollSpeed ScrollSpeed(void) = 0;
|
||||||
virtual eOrientation ScrollOrientation(void) = 0;
|
virtual eOrientation ScrollOrientation(void) = 0;
|
||||||
|
virtual void SetScrollingStarted(void) = 0;
|
||||||
virtual void StartScrolling(void) = 0;
|
virtual void StartScrolling(void) = 0;
|
||||||
virtual void StopScrolling(void) = 0;
|
virtual void StopScrolling(void) = 0;
|
||||||
virtual void SetDrawPort(cPoint &point) = 0;
|
virtual void SetDrawPort(cPoint &point) = 0;
|
||||||
|
@ -30,6 +30,7 @@ cArea::cArea(void) {
|
|||||||
attribs = new cAreaAttribs((int)eAreaAttribs::count);
|
attribs = new cAreaAttribs((int)eAreaAttribs::count);
|
||||||
scrolling = false;
|
scrolling = false;
|
||||||
isScrolling = false;
|
isScrolling = false;
|
||||||
|
scrollingStarted = false;
|
||||||
scrollFunc = NULL;
|
scrollFunc = NULL;
|
||||||
blinking = false;
|
blinking = false;
|
||||||
areaContainer = NULL;
|
areaContainer = NULL;
|
||||||
@ -45,6 +46,7 @@ cArea::cArea(const cArea &other) {
|
|||||||
attribs = new cAreaAttribs(*other.attribs);
|
attribs = new cAreaAttribs(*other.attribs);
|
||||||
//area container is set from outside during cloning of areacontainer
|
//area container is set from outside during cloning of areacontainer
|
||||||
areaContainer = NULL;
|
areaContainer = NULL;
|
||||||
|
scrollingStarted = false;
|
||||||
//scrolling is set from outside by ScrollFunc(), see below
|
//scrolling is set from outside by ScrollFunc(), see below
|
||||||
scrolling = other.scrolling;
|
scrolling = other.scrolling;
|
||||||
isScrolling = false;
|
isScrolling = false;
|
||||||
@ -244,6 +246,7 @@ void cArea::Close(void) {
|
|||||||
pix = NULL;
|
pix = NULL;
|
||||||
}
|
}
|
||||||
init = true;
|
init = true;
|
||||||
|
scrollingStarted = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void cArea::Clear(bool forceClearBackground) {
|
void cArea::Clear(bool forceClearBackground) {
|
||||||
@ -255,6 +258,7 @@ void cArea::Clear(bool forceClearBackground) {
|
|||||||
pix->SetDrawPortPoint(cPoint(0,0));
|
pix->SetDrawPortPoint(cPoint(0,0));
|
||||||
pix->Fill(clrTransparent);
|
pix->Fill(clrTransparent);
|
||||||
}
|
}
|
||||||
|
scrollingStarted = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void cArea::ClearWithoutIndicators(void) {
|
void cArea::ClearWithoutIndicators(void) {
|
||||||
@ -265,6 +269,7 @@ void cArea::ClearWithoutIndicators(void) {
|
|||||||
if (pix) {
|
if (pix) {
|
||||||
pix->Fill(clrTransparent);
|
pix->Fill(clrTransparent);
|
||||||
}
|
}
|
||||||
|
scrollingStarted = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void cArea::Hide(void) {
|
void cArea::Hide(void) {
|
||||||
|
@ -58,6 +58,7 @@ public:
|
|||||||
virtual void SetIndicatorPosition(cPoint &pos) {};
|
virtual void SetIndicatorPosition(cPoint &pos) {};
|
||||||
virtual cRect CoveringArea(void) { return cRect::Null; };
|
virtual cRect CoveringArea(void) { return cRect::Null; };
|
||||||
virtual bool Scrolling(void) { return false; };
|
virtual bool Scrolling(void) { return false; };
|
||||||
|
virtual bool ScrollingStarted(void) { return false; };
|
||||||
virtual cArea *ScrollingArea(void) { return NULL; };
|
virtual cArea *ScrollingArea(void) { return NULL; };
|
||||||
virtual cFunction *GetFunction(const char *name) { return NULL; };
|
virtual cFunction *GetFunction(const char *name) { return NULL; };
|
||||||
virtual const char *Name(void) { return NULL; };
|
virtual const char *Name(void) { return NULL; };
|
||||||
@ -80,6 +81,7 @@ private:
|
|||||||
cList<cFunction> functions;
|
cList<cFunction> functions;
|
||||||
bool scrolling;
|
bool scrolling;
|
||||||
bool isScrolling;
|
bool isScrolling;
|
||||||
|
bool scrollingStarted;
|
||||||
cFunction *scrollFunc;
|
cFunction *scrollFunc;
|
||||||
list<cBlinker*> blinkers;
|
list<cBlinker*> blinkers;
|
||||||
bool blinking;
|
bool blinking;
|
||||||
@ -121,6 +123,8 @@ public:
|
|||||||
cRect CoveringArea(void);
|
cRect CoveringArea(void);
|
||||||
//Scrollable
|
//Scrollable
|
||||||
bool Scrolling(void);
|
bool Scrolling(void);
|
||||||
|
void SetScrollingStarted(void) { scrollingStarted = true; };
|
||||||
|
bool ScrollingStarted(void) { return scrollingStarted; };
|
||||||
int ScrollWidth(void);
|
int ScrollWidth(void);
|
||||||
int ScrollHeight(void);
|
int ScrollHeight(void);
|
||||||
int ScrollDelay(void);
|
int ScrollDelay(void);
|
||||||
|
@ -70,16 +70,12 @@ void cListElement::Render(void) {
|
|||||||
if (attribs->DoDebug())
|
if (attribs->DoDebug())
|
||||||
Debug();
|
Debug();
|
||||||
bool animated = Fading() || Shifting();
|
bool animated = Fading() || Shifting();
|
||||||
|
|
||||||
for (cAreaNode *node = areaNodes.First(); node; node = areaNodes.Next(node)) {
|
for (cAreaNode *node = areaNodes.First(); node; node = areaNodes.Next(node)) {
|
||||||
//Check redraw of already scrolling list element
|
//Check redraw of already scrolling list element
|
||||||
if (drawn && scrollingStarted && node->Scrolling()) {
|
if (drawn && node->Scrolling() && node->ScrollingStarted()) {
|
||||||
if (DoScroll()) {
|
if (DoScroll()) {
|
||||||
//current list element
|
//current list element
|
||||||
continue;
|
continue;
|
||||||
} else {
|
|
||||||
//not current list element anymore
|
|
||||||
scrollingStarted = false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//don't clear animated list element if it was current
|
//don't clear animated list element if it was current
|
||||||
@ -97,10 +93,9 @@ void cListElement::Render(void) {
|
|||||||
node->Render();
|
node->Render();
|
||||||
sdOsd->Unlock();
|
sdOsd->Unlock();
|
||||||
|
|
||||||
if (DoScroll() && node->Scrolling()) {
|
if (DoScroll() && node->Scrolling() && !node->ScrollingStarted()) {
|
||||||
cArea *scrollArea = node->ScrollingArea();
|
cArea *scrollArea = node->ScrollingArea();
|
||||||
if (scrollArea) {
|
if (scrollArea) {
|
||||||
scrollingStarted = true;
|
|
||||||
cScroller *scroller = new cScroller(scrollArea);
|
cScroller *scroller = new cScroller(scrollArea);
|
||||||
scrollers.push_back(scroller);
|
scrollers.push_back(scroller);
|
||||||
cView::AddAnimation(scroller);
|
cView::AddAnimation(scroller);
|
||||||
|
@ -176,7 +176,6 @@
|
|||||||
</area>
|
</area>
|
||||||
</scrapercontent>
|
</scrapercontent>
|
||||||
|
|
||||||
|
|
||||||
<channelhints>
|
<channelhints>
|
||||||
<area background="true" x="0" y="{areaheight}*0.75 - {numhints}*{areaheight}*{zapchannelhintsheight}/1000 + 1" width="{zapchannelhintswidth}*{areawidth}/100" height="{numhints}*{areaheight}*{zapchannelhintsheight}/1000" layer="1">
|
<area background="true" x="0" y="{areaheight}*0.75 - {numhints}*{areaheight}*{zapchannelhintsheight}/1000 + 1" width="{zapchannelhintswidth}*{areawidth}/100" height="{numhints}*{areaheight}*{zapchannelhintsheight}/1000" layer="1">
|
||||||
<fill color="{menuback}" />
|
<fill color="{menuback}" />
|
||||||
|
Loading…
Reference in New Issue
Block a user