Windows fade emulation. Some main windows at the moment only. New drivers needed.

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@644 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
focus
2010-06-27 13:06:12 +00:00
parent 3aaa5533cf
commit 253324226e
15 changed files with 670 additions and 204 deletions

View File

@@ -443,11 +443,21 @@ int CTimerList::show()
int res = menu_return::RETURN_REPAINT;
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]);
bool loop=true;
bool update=true;
bool fadeIn = g_settings.widget_fade;
bool fadeOut = false;
int fadeValue = g_settings.menu_Content_alpha;
uint32_t fadeTimer = 0;
if ( fadeIn ) {
fadeValue = 100;
frameBuffer->setBlendLevel(fadeValue, fadeValue);
fadeTimer = g_RCInput->addTimer( FADE_TIME, false );
}
while (loop)
{
if (update)
@@ -461,12 +471,45 @@ int CTimerList::show()
if ( msg <= CRCInput::RC_MaxRC )
timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings
::TIMING_MENU]);
::TIMING_MENU]);
if ( ( msg == CRCInput::RC_timeout ) ||
if((msg == NeutrinoMessages::EVT_TIMER) && (data == fadeTimer)) {
if (fadeOut) { // disappear
fadeValue += FADE_STEP;
if (fadeValue >= 100) {
fadeValue = g_settings.menu_Content_alpha;
g_RCInput->killTimer (fadeTimer);
fadeTimer = 0;
loop = false;
} else
frameBuffer->setBlendLevel(fadeValue, fadeValue);
} else { // appears
fadeValue -= FADE_STEP;
if (fadeValue <= g_settings.menu_Content_alpha) {
fadeValue = g_settings.menu_Content_alpha;
g_RCInput->killTimer (fadeTimer);
fadeTimer = 0;
fadeIn = false;
frameBuffer->setBlendLevel(FADE_RESET, g_settings.gtx_alpha2);
} else
frameBuffer->setBlendLevel(fadeValue, fadeValue);
}
}
else if ( ( msg == CRCInput::RC_timeout ) ||
( msg == CRCInput::RC_home) )
{ //Exit after timeout or cancel key
loop=false;
if ( fadeIn ) {
g_RCInput->killTimer(fadeTimer);
fadeTimer = 0;
fadeIn = false;
}
if ((!fadeOut) && g_settings.widget_fade) {
fadeOut = true;
fadeTimer = g_RCInput->addTimer( FADE_TIME, false );
timeoutEnd = CRCInput::calcTimeoutEnd( 1 );
msg = 0;
} else
loop=false;
}
else if ((msg == CRCInput::RC_up) && !(timerlist.empty()))
{
@@ -578,6 +621,11 @@ int CTimerList::show()
}
}
}
if ( fadeIn || fadeOut ) {
g_RCInput->killTimer(fadeTimer);
fadeTimer = 0;
frameBuffer->setBlendLevel(FADE_RESET, g_settings.gtx_alpha2);
}
hide();
return(res);