mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 07:23:09 +02:00
epgplus: use footer global at heap
For global use.
This commit is contained in:
@@ -564,13 +564,15 @@ EpgPlus::Footer::Footer(CFrameBuffer *pframeBuffer, int px, int py, int pwidth,
|
|||||||
this->x = px;
|
this->x = px;
|
||||||
this->y = py;
|
this->y = py;
|
||||||
this->width = pwidth;
|
this->width = pwidth;
|
||||||
|
this->foot = NULL;
|
||||||
this->buttonHeight = pbuttonHeight;
|
this->buttonHeight = pbuttonHeight;
|
||||||
this->buttonY = this->y - OFFSET_INTER - OFFSET_SHADOW - this->buttonHeight;
|
this->buttonY = this->y - OFFSET_INTER - OFFSET_SHADOW - this->buttonHeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
EpgPlus::Footer::~Footer()
|
EpgPlus::Footer::~Footer()
|
||||||
{
|
{
|
||||||
|
delete foot;
|
||||||
|
foot = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void EpgPlus::Footer::init()
|
void EpgPlus::Footer::init()
|
||||||
@@ -626,9 +628,11 @@ struct button_label buttonLabels[] =
|
|||||||
void EpgPlus::Footer::paintButtons(button_label *pbuttonLabels, int numberOfButtons)
|
void EpgPlus::Footer::paintButtons(button_label *pbuttonLabels, int numberOfButtons)
|
||||||
{
|
{
|
||||||
int buttonWidth = (this->width);
|
int buttonWidth = (this->width);
|
||||||
CComponentsFooter foot;
|
if (!foot)
|
||||||
foot.enableShadow(CC_SHADOW_ON, -1, true);
|
foot = new CComponentsFooter();
|
||||||
foot.paintButtons(this->x, this->buttonY, buttonWidth, buttonHeight, numberOfButtons, pbuttonLabels, buttonWidth / numberOfButtons);
|
foot->enableShadow(CC_SHADOW_ON, -1, true);
|
||||||
|
if (!foot->isPainted())
|
||||||
|
foot->paintButtons(this->x, this->buttonY, buttonWidth, buttonHeight, numberOfButtons, pbuttonLabels, buttonWidth / numberOfButtons);
|
||||||
}
|
}
|
||||||
|
|
||||||
EpgPlus::EpgPlus()
|
EpgPlus::EpgPlus()
|
||||||
@@ -1417,6 +1421,13 @@ void EpgPlus::hide()
|
|||||||
this->selectedChannelEntry->detailsLine = NULL;
|
this->selectedChannelEntry->detailsLine = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this->footer->foot)
|
||||||
|
{
|
||||||
|
this->footer->foot->kill();
|
||||||
|
delete this->footer->foot;
|
||||||
|
this->footer->foot = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
this->frameBuffer->paintBackgroundBoxRel(this->usableScreenX, this->usableScreenY, this->usableScreenWidth + OFFSET_SHADOW, this->usableScreenHeight + OFFSET_SHADOW);
|
this->frameBuffer->paintBackgroundBoxRel(this->usableScreenX, this->usableScreenY, this->usableScreenWidth + OFFSET_SHADOW, this->usableScreenHeight + OFFSET_SHADOW);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -264,6 +264,7 @@ class EpgPlus
|
|||||||
// attributes
|
// attributes
|
||||||
public:
|
public:
|
||||||
CFrameBuffer *frameBuffer;
|
CFrameBuffer *frameBuffer;
|
||||||
|
CComponentsFooter *foot;
|
||||||
|
|
||||||
int x;
|
int x;
|
||||||
int y;
|
int y;
|
||||||
|
Reference in New Issue
Block a user