CMoviePlayerGui: Bind enable/disable FileTime to enableInfoClock()

This commit is contained in:
M. Liebmann
2017-01-30 07:11:19 +01:00
parent 891bc71f9d
commit dc4ce280ed
8 changed files with 87 additions and 55 deletions

View File

@@ -32,9 +32,11 @@
#include <global.h>
#include <neutrino.h>
#include <gui/volumebar.h>
#include <gui/movieplayer.h>
#include <gui/infoclock.h>
#include <gui/timeosd.h>
extern CTimeOSD *FileTimeOSD;
CInfoClock::CInfoClock():CComponentsFrmClock( 1, 1, NULL, "%H:%M:%S", NULL, false, 1, NULL, CC_SHADOW_ON)
{
@@ -122,6 +124,23 @@ bool CInfoClock::enableInfoClock(bool enable)
ret = StopInfoClock();
}
}
if (enable) {
if (FileTimeOSD->getRestore()) {
FileTimeOSD->setMode(FileTimeOSD->getTmpMode());
FileTimeOSD->update(CMoviePlayerGui::getInstance().GetPosition(),
CMoviePlayerGui::getInstance().GetDuration());
}
}
else {
if (FileTimeOSD->getMode() != CTimeOSD::MODE_HIDE) {
FileTimeOSD->setTmpMode();
FileTimeOSD->setRestore();
if (FileTimeOSD->getRestore())
FileTimeOSD->kill();
}
}
return ret;
}