mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 08:51:04 +02:00
stringinput: save/restore screen and add shadow
Origin commit data
------------------
Commit: d69502e5b8
Author: vanhofen <vanhofen@gmx.de>
Date: 2013-05-14 (Tue, 14 May 2013)
Origin message was:
------------------
- stringinput: save/restore screen and add shadow
This commit is contained in:
@@ -389,6 +389,11 @@ int CStringInput::exec( CMenuTarget* parent, const std::string & )
|
|||||||
strcat(value, " ");
|
strcat(value, " ");
|
||||||
strncpy(oldval, value, size);
|
strncpy(oldval, value, size);
|
||||||
|
|
||||||
|
fb_pixel_t * pixbuf = new fb_pixel_t[(width + SHADOW_OFFSET) * (hheight + bheight + SHADOW_OFFSET)];
|
||||||
|
|
||||||
|
if (pixbuf != NULL)
|
||||||
|
frameBuffer->SaveScreen(x, y, width + SHADOW_OFFSET, hheight + bheight + SHADOW_OFFSET, pixbuf);
|
||||||
|
|
||||||
paint();
|
paint();
|
||||||
|
|
||||||
uint64_t timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings::TIMING_MENU]);
|
uint64_t timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings::TIMING_MENU]);
|
||||||
@@ -500,6 +505,12 @@ int CStringInput::exec( CMenuTarget* parent, const std::string & )
|
|||||||
|
|
||||||
hide();
|
hide();
|
||||||
|
|
||||||
|
if (pixbuf != NULL)
|
||||||
|
{
|
||||||
|
frameBuffer->RestoreScreen(x, y, width + SHADOW_OFFSET, hheight + bheight + SHADOW_OFFSET, pixbuf);
|
||||||
|
delete[] pixbuf;//Mismatching allocation and deallocation: pixbuf
|
||||||
|
}
|
||||||
|
|
||||||
for(int count=size-1;count>=0;count--)
|
for(int count=size-1;count>=0;count--)
|
||||||
{
|
{
|
||||||
if((value[count]==' ') || (value[count]==0))
|
if((value[count]==' ') || (value[count]==0))
|
||||||
@@ -532,11 +543,12 @@ int CStringInput::handleOthers(const neutrino_msg_t /*msg*/, const neutrino_msg_
|
|||||||
|
|
||||||
void CStringInput::hide()
|
void CStringInput::hide()
|
||||||
{
|
{
|
||||||
frameBuffer->paintBackgroundBoxRel(x, y, width, height);
|
frameBuffer->paintBackgroundBoxRel(x, y, width + SHADOW_OFFSET, height + SHADOW_OFFSET);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CStringInput::paint(bool sms)
|
void CStringInput::paint(bool sms)
|
||||||
{
|
{
|
||||||
|
frameBuffer->paintBoxRel(x + SHADOW_OFFSET, y + SHADOW_OFFSET, width, hheight + bheight, COL_MENUCONTENTDARK_PLUS_0, RADIUS_LARGE, CORNER_ALL); //round
|
||||||
frameBuffer->paintBoxRel(x, y, width, hheight, COL_MENUHEAD_PLUS_0, RADIUS_LARGE, CORNER_TOP); //round
|
frameBuffer->paintBoxRel(x, y, width, hheight, COL_MENUHEAD_PLUS_0, RADIUS_LARGE, CORNER_TOP); //round
|
||||||
frameBuffer->paintBoxRel(x, y + hheight, width, bheight, COL_MENUCONTENT_PLUS_0, sms ? 0 : RADIUS_LARGE, CORNER_BOTTOM);
|
frameBuffer->paintBoxRel(x, y + hheight, width, bheight, COL_MENUCONTENT_PLUS_0, sms ? 0 : RADIUS_LARGE, CORNER_BOTTOM);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user