mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-26 15:02:50 +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 BoxWidth=15*23;
|
||||
|
||||
inline unsigned int make16color(__u32 rgb)
|
||||
{
|
||||
return 0xFF000000 | rgb;
|
||||
}
|
||||
|
||||
CScreenSetup::CScreenSetup()
|
||||
{
|
||||
frameBuffer = CFrameBuffer::getInstance();
|
||||
@@ -130,52 +135,58 @@ int CScreenSetup::exec(CMenuTarget* parent, const std::string &)
|
||||
break;
|
||||
}
|
||||
case CRCInput::RC_up:
|
||||
{
|
||||
|
||||
int min = (selected == 0) ? 0 : 400;
|
||||
if (y_coord[selected] <= min)
|
||||
y_coord[selected] = min;
|
||||
else
|
||||
{
|
||||
unpaintBorder(selected);
|
||||
y_coord[selected]--;
|
||||
|
||||
int min = ( selected == 0 ) ? 0 : 400;
|
||||
if ( y_coord[selected] < min )
|
||||
y_coord[selected] = min ;
|
||||
else
|
||||
paintBorder( selected );
|
||||
break;
|
||||
paintBorder(selected);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case CRCInput::RC_down:
|
||||
{
|
||||
int max = (selected == 0 )? 200 : frameBuffer->getScreenHeight(true) - 1;
|
||||
if (y_coord[selected] >= max)
|
||||
y_coord[selected] = max;
|
||||
else
|
||||
{
|
||||
unpaintBorder(selected);
|
||||
y_coord[selected]++;
|
||||
|
||||
//int max = ( selected == 0 ) ? 200 : 575;
|
||||
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
|
||||
paintBorder( selected );
|
||||
break;
|
||||
paintBorder(selected);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case CRCInput::RC_left:
|
||||
{
|
||||
int min = (selected == 0) ? 0 : 400;
|
||||
if (x_coord[selected] <= min)
|
||||
x_coord[selected] = min;
|
||||
else
|
||||
{
|
||||
unpaintBorder(selected);
|
||||
x_coord[selected]--;
|
||||
|
||||
int min = ( selected == 0 ) ? 0 : 400;
|
||||
if ( x_coord[selected] < min )
|
||||
x_coord[selected] = min ;
|
||||
else
|
||||
paintBorder( selected );
|
||||
break;
|
||||
paintBorder( selected );
|
||||
}
|
||||
break;
|
||||
}
|
||||
case CRCInput::RC_right:
|
||||
{
|
||||
int max = (selected == 0) ? 200 : frameBuffer->getScreenWidth(true) - 1;
|
||||
if (y_coord[selected] >= max)
|
||||
y_coord[selected] = max;
|
||||
else
|
||||
{
|
||||
unpaintBorder(selected);
|
||||
x_coord[selected]++;
|
||||
|
||||
//int max = ( selected == 0 ) ? 200 : 719;
|
||||
int max = ( selected == 0 ) ? 200 : frameBuffer->getScreenWidth(true)-1;
|
||||
if ( y_coord[selected] > max )
|
||||
y_coord[selected] = max ;
|
||||
else
|
||||
paintBorder( selected );
|
||||
break;
|
||||
paintBorder( selected );
|
||||
}
|
||||
break;
|
||||
}
|
||||
case CRCInput::RC_favorites:
|
||||
case CRCInput::RC_sat:
|
||||
break;
|
||||
@@ -211,6 +222,13 @@ void CScreenSetup::paintBorder( int pselected )
|
||||
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()
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
inline unsigned int make16color(__u32 rgb)
|
||||
{
|
||||
return 0xFF000000 | rgb;
|
||||
}
|
||||
|
||||
void CScreenSetup::paint()
|
||||
{
|
||||
if (!frameBuffer->getActive())
|
||||
|
@@ -53,6 +53,7 @@ class CScreenSetup : public CMenuTarget
|
||||
void paintBorderLR();
|
||||
void paintCoords();
|
||||
void paintBorder(int selected);
|
||||
void unpaintBorder(int selected);
|
||||
void paintIcons();
|
||||
|
||||
public:
|
||||
|
Reference in New Issue
Block a user