Added symbols for overlay of busy information. Added busy animation when

loading session in transition view.
This commit is contained in:
brunoherbelin
2020-07-20 00:42:44 +02:00
parent 31dcb13f5b
commit 91dd7e5cc8
7 changed files with 62 additions and 20 deletions

View File

@@ -65,3 +65,23 @@ void BounceScaleCallback::update(Node *n, float dt)
finished_ = true;
}
}
InfiniteGlowCallback::InfiniteGlowCallback(float amplitude) : UpdateCallback(),
amplitude_(amplitude), time_(0.f), initialized_(false)
{
}
void InfiniteGlowCallback::update(Node *n, float dt)
{
// set start scale on first run
if (!initialized_){
initial_scale_ = n->scale_;
initialized_ = true;
}
time_ += dt / 1000.f;
n->scale_.x = initial_scale_.x + amplitude_ * sin(M_PI * time_);
n->scale_.y = initial_scale_.y + amplitude_ * sin(M_PI * time_);
}