mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 08:51:04 +02:00
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
Origin commit data
------------------
Commit: 253324226e
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2010-06-27 (Sun, 27 Jun 2010)
This commit is contained in:
@@ -500,6 +500,16 @@ int CChannelList::show()
|
||||
y = frameBuffer->getScreenY() + (frameBuffer->getScreenHeight() - (height+ info_height)) / 2;
|
||||
displayNext = false;
|
||||
|
||||
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 );
|
||||
}
|
||||
|
||||
paintHead();
|
||||
updateEvents();
|
||||
paint();
|
||||
@@ -520,11 +530,44 @@ int CChannelList::show()
|
||||
if ( msg <= CRCInput::RC_MaxRC )
|
||||
timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_CHANLIST]);
|
||||
|
||||
if ( ( msg == CRCInput::RC_timeout ) || ( msg == (neutrino_msg_t)g_settings.key_channelList_cancel) ) {
|
||||
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 == (neutrino_msg_t)g_settings.key_channelList_cancel) ) {
|
||||
if(!actzap)
|
||||
selected = oldselected;
|
||||
loop=false;
|
||||
res = -1;
|
||||
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_red) || (msg == CRCInput::RC_epg)) {
|
||||
hide();
|
||||
@@ -786,6 +829,11 @@ int CChannelList::show()
|
||||
}
|
||||
}
|
||||
hide();
|
||||
if ( fadeIn || fadeOut ) {
|
||||
g_RCInput->killTimer(fadeTimer);
|
||||
fadeTimer = 0;
|
||||
frameBuffer->setBlendLevel(FADE_RESET, g_settings.gtx_alpha2);
|
||||
}
|
||||
if (bShowBouquetList) {
|
||||
res = bouquetList->exec(true);
|
||||
printf("CChannelList:: bouquetList->exec res %d\n", res);
|
||||
|
Reference in New Issue
Block a user