- cycle alpha channel on please wait text for video loading

This commit is contained in:
Mark Vejvoda 2012-05-24 07:37:43 +00:00
parent 599cae0235
commit 827f4fb89d

View File

@ -8631,10 +8631,9 @@ void Renderer::renderVideoLoading(int progressPercent) {
string textToRender = lang.get("PleaseWait"); string textToRender = lang.get("PleaseWait");
const Metrics &metrics= Metrics::getInstance(); const Metrics &metrics= Metrics::getInstance();
float anim= GraphicComponent::getAnim(); static Chrono cycle(true);
if(anim < 0.5f) { static float anim = 0.0f;
anim = 1.f - anim; static bool animCycleUp = true;
}
if(CoreData::getInstance().getMenuFontBig3D() != NULL) { if(CoreData::getInstance().getMenuFontBig3D() != NULL) {
@ -8659,6 +8658,25 @@ void Renderer::renderVideoLoading(int progressPercent) {
(metrics.getScreenH() / 2), true); (metrics.getScreenH() / 2), true);
} }
swapBuffers(); swapBuffers();
if(cycle.getCurMillis() % 50 == 0) {
if(animCycleUp == true) {
anim += 0.1;
if(anim > 1.f) {
anim= 1.f;
cycle.reset();
animCycleUp = false;
}
}
else {
anim -= 0.1;
if(anim < 0.f) {
anim= 0.f;
cycle.reset();
animCycleUp = true;
}
}
}
} }
}}//end namespace }}//end namespace