mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-27 15:32:52 +02:00
neutrino: fix OSD limits setup
the transparent PNGs used now showed a flaw in OSD screen setup code
fix this by drawing background color before drawing edge markers
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@269 e54a6e83-5905-42d5-8d5c-058d10e6a962
Origin commit data
------------------
Branch: ni/coolstream
Commit: 16d51c3521
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2010-02-06 (Sat, 06 Feb 2010)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -51,6 +51,11 @@ int y=15*25;
|
|||||||
int BoxHeight=15*4;
|
int BoxHeight=15*4;
|
||||||
int BoxWidth=15*23;
|
int BoxWidth=15*23;
|
||||||
|
|
||||||
|
inline unsigned int make16color(__u32 rgb)
|
||||||
|
{
|
||||||
|
return 0xFF000000 | rgb;
|
||||||
|
}
|
||||||
|
|
||||||
CScreenSetup::CScreenSetup()
|
CScreenSetup::CScreenSetup()
|
||||||
{
|
{
|
||||||
frameBuffer = CFrameBuffer::getInstance();
|
frameBuffer = CFrameBuffer::getInstance();
|
||||||
@@ -131,49 +136,55 @@ int CScreenSetup::exec(CMenuTarget* parent, const std::string &)
|
|||||||
}
|
}
|
||||||
case CRCInput::RC_up:
|
case CRCInput::RC_up:
|
||||||
{
|
{
|
||||||
y_coord[selected]--;
|
|
||||||
|
|
||||||
int min = ( selected == 0 ) ? 0 : 400;
|
int min = (selected == 0) ? 0 : 400;
|
||||||
if ( y_coord[selected] < min )
|
if (y_coord[selected] <= min)
|
||||||
y_coord[selected] = min ;
|
y_coord[selected] = min;
|
||||||
else
|
else
|
||||||
paintBorder( selected );
|
{
|
||||||
|
unpaintBorder(selected);
|
||||||
|
y_coord[selected]--;
|
||||||
|
paintBorder(selected);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case CRCInput::RC_down:
|
case CRCInput::RC_down:
|
||||||
{
|
{
|
||||||
y_coord[selected]++;
|
int max = (selected == 0 )? 200 : frameBuffer->getScreenHeight(true) - 1;
|
||||||
|
if (y_coord[selected] >= max)
|
||||||
//int max = ( selected == 0 ) ? 200 : 575;
|
y_coord[selected] = max;
|
||||||
int max = ( selected == 0 ) ? 200 : frameBuffer->getScreenHeight(true)-1;
|
|
||||||
printf("selected %d y %d max %d\n", selected, y_coord[selected], max);
|
|
||||||
if ( y_coord[selected] > max )
|
|
||||||
y_coord[selected] = max ;
|
|
||||||
else
|
else
|
||||||
paintBorder( selected );
|
{
|
||||||
|
unpaintBorder(selected);
|
||||||
|
y_coord[selected]++;
|
||||||
|
paintBorder(selected);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case CRCInput::RC_left:
|
case CRCInput::RC_left:
|
||||||
{
|
{
|
||||||
x_coord[selected]--;
|
int min = (selected == 0) ? 0 : 400;
|
||||||
|
if (x_coord[selected] <= min)
|
||||||
int min = ( selected == 0 ) ? 0 : 400;
|
x_coord[selected] = min;
|
||||||
if ( x_coord[selected] < min )
|
|
||||||
x_coord[selected] = min ;
|
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
unpaintBorder(selected);
|
||||||
|
x_coord[selected]--;
|
||||||
paintBorder( selected );
|
paintBorder( selected );
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case CRCInput::RC_right:
|
case CRCInput::RC_right:
|
||||||
{
|
{
|
||||||
x_coord[selected]++;
|
int max = (selected == 0) ? 200 : frameBuffer->getScreenWidth(true) - 1;
|
||||||
|
if (y_coord[selected] >= max)
|
||||||
//int max = ( selected == 0 ) ? 200 : 719;
|
y_coord[selected] = max;
|
||||||
int max = ( selected == 0 ) ? 200 : frameBuffer->getScreenWidth(true)-1;
|
|
||||||
if ( y_coord[selected] > max )
|
|
||||||
y_coord[selected] = max ;
|
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
unpaintBorder(selected);
|
||||||
|
x_coord[selected]++;
|
||||||
paintBorder( selected );
|
paintBorder( selected );
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case CRCInput::RC_favorites:
|
case CRCInput::RC_favorites:
|
||||||
@@ -211,6 +222,13 @@ void CScreenSetup::paintBorder( int pselected )
|
|||||||
paintCoords();
|
paintCoords();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CScreenSetup::unpaintBorder(int pselected)
|
||||||
|
{
|
||||||
|
int x = x_coord[pselected] - 96 * pselected;
|
||||||
|
int y = y_coord[pselected] - 96 * pselected;
|
||||||
|
frameBuffer->paintBoxRel(x, y, 96, 96, make16color(0xA0A0A0));
|
||||||
|
}
|
||||||
|
|
||||||
void CScreenSetup::paintIcons()
|
void CScreenSetup::paintIcons()
|
||||||
{
|
{
|
||||||
frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_RED, x+6, y+8);
|
frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_RED, x+6, y+8);
|
||||||
@@ -255,11 +273,6 @@ void CScreenSetup::paintCoords()
|
|||||||
g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x1+10,y1+90, 200, yepos, COL_MENUCONTENT);
|
g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x1+10,y1+90, 200, yepos, COL_MENUCONTENT);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline unsigned int make16color(__u32 rgb)
|
|
||||||
{
|
|
||||||
return 0xFF000000 | rgb;
|
|
||||||
}
|
|
||||||
|
|
||||||
void CScreenSetup::paint()
|
void CScreenSetup::paint()
|
||||||
{
|
{
|
||||||
if (!frameBuffer->getActive())
|
if (!frameBuffer->getActive())
|
||||||
|
@@ -53,6 +53,7 @@ class CScreenSetup : public CMenuTarget
|
|||||||
void paintBorderLR();
|
void paintBorderLR();
|
||||||
void paintCoords();
|
void paintCoords();
|
||||||
void paintBorder(int selected);
|
void paintBorder(int selected);
|
||||||
|
void unpaintBorder(int selected);
|
||||||
void paintIcons();
|
void paintIcons();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
Reference in New Issue
Block a user