mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 15:32:59 +02:00
CImageInfo: enable fade for image info window
This commit is contained in:
@@ -105,7 +105,8 @@ int CImageInfo::exec(CMenuTarget* parent, const std::string &)
|
|||||||
|
|
||||||
//init window object, add cc-items and paint all
|
//init window object, add cc-items and paint all
|
||||||
ShowWindow();
|
ShowWindow();
|
||||||
|
bool fadeout = false;
|
||||||
|
neutrino_msg_t postmsg = 0;
|
||||||
neutrino_msg_t msg;
|
neutrino_msg_t msg;
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
@@ -113,9 +114,23 @@ int CImageInfo::exec(CMenuTarget* parent, const std::string &)
|
|||||||
uint64_t timeoutEnd = CRCInput::calcTimeoutEnd_MS(100);
|
uint64_t timeoutEnd = CRCInput::calcTimeoutEnd_MS(100);
|
||||||
g_RCInput->getMsgAbsoluteTimeout( &msg, &data, &timeoutEnd );
|
g_RCInput->getMsgAbsoluteTimeout( &msg, &data, &timeoutEnd );
|
||||||
|
|
||||||
|
if ((msg == NeutrinoMessages::EVT_TIMER) && (data ==cc_win->GetFadeTimer())){
|
||||||
|
if (cc_win->FadeDone())
|
||||||
|
break;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (fadeout && msg == CRCInput::RC_timeout){
|
||||||
|
if (cc_win->StartFadeOut()){
|
||||||
|
msg = menu_return::RETURN_EXIT_ALL;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if(msg == CRCInput::RC_setup) {
|
if(msg == CRCInput::RC_setup) {
|
||||||
res = menu_return::RETURN_EXIT_ALL;
|
res = menu_return::RETURN_EXIT_ALL;
|
||||||
break;
|
fadeout = true;
|
||||||
}
|
}
|
||||||
else if (msg == CRCInput::RC_red){
|
else if (msg == CRCInput::RC_red){
|
||||||
// init temporarly vars
|
// init temporarly vars
|
||||||
@@ -152,9 +167,9 @@ int CImageInfo::exec(CMenuTarget* parent, const std::string &)
|
|||||||
btn_red->paint(false);
|
btn_red->paint(false);
|
||||||
}
|
}
|
||||||
else if (CNeutrinoApp::getInstance()->listModeKey(msg)) {
|
else if (CNeutrinoApp::getInstance()->listModeKey(msg)) {
|
||||||
g_RCInput->postMsg (msg, 0);
|
postmsg = msg;
|
||||||
res = menu_return::RETURN_EXIT_ALL;
|
res = menu_return::RETURN_EXIT_ALL;
|
||||||
break;
|
fadeout = true;
|
||||||
}
|
}
|
||||||
else if ((msg == CRCInput::RC_up) || (msg == CRCInput::RC_page_up)) {
|
else if ((msg == CRCInput::RC_up) || (msg == CRCInput::RC_page_up)) {
|
||||||
ScrollLic(false);
|
ScrollLic(false);
|
||||||
@@ -163,7 +178,7 @@ int CImageInfo::exec(CMenuTarget* parent, const std::string &)
|
|||||||
ScrollLic(true);
|
ScrollLic(true);
|
||||||
}
|
}
|
||||||
else if (msg <= CRCInput::RC_MaxRC){
|
else if (msg <= CRCInput::RC_MaxRC){
|
||||||
break;
|
fadeout = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( msg > CRCInput::RC_MaxRC && msg != CRCInput::RC_timeout){
|
if ( msg > CRCInput::RC_MaxRC && msg != CRCInput::RC_timeout){
|
||||||
@@ -172,8 +187,10 @@ int CImageInfo::exec(CMenuTarget* parent, const std::string &)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
hide();
|
if (postmsg)
|
||||||
|
g_RCInput->postMsg(postmsg, 0);
|
||||||
|
|
||||||
|
hide();
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -206,6 +223,7 @@ void CImageInfo::ShowWindow()
|
|||||||
InitInfoText(getLicenseText());
|
InitInfoText(getLicenseText());
|
||||||
|
|
||||||
//paint window
|
//paint window
|
||||||
|
cc_win->StartFadeIn();
|
||||||
cc_win->paint(CC_SAVE_SCREEN_NO);
|
cc_win->paint(CC_SAVE_SCREEN_NO);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -408,6 +426,7 @@ void CImageInfo::hide()
|
|||||||
printf("[CImageInfo] [%s - %d] hide...\n", __FUNCTION__, __LINE__);
|
printf("[CImageInfo] [%s - %d] hide...\n", __FUNCTION__, __LINE__);
|
||||||
if (cc_win){
|
if (cc_win){
|
||||||
cc_win->kill();
|
cc_win->kill();
|
||||||
|
cc_win->StopFade();
|
||||||
Clean();
|
Clean();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user