Added onMenuIdle animation type, which will continuously be activated while

the menu isn't scrolling.
This commit is contained in:
Pieter Hulshoff 2017-06-21 15:52:48 +02:00
parent f6ba968925
commit 05f26e9d06
3 changed files with 33 additions and 24 deletions

View File

@ -109,7 +109,7 @@ void Component::setNewItemSelected()
bool Component::isIdle()
{
return (currentTweenComplete_ || animationType_ == "idle");
return (currentTweenComplete_ || animationType_ == "idle" || animationType_ == "menuIdle");
}
bool Component::isMenuScrolling()
@ -160,6 +160,14 @@ void Component::update(float dt)
{
animationType_ = "idle";
currentTweens_ = tweens_->getAnimation( "idle", menuIndex_ );
if ( currentTweens_ && currentTweens_->size( ) == 0 && !page.isMenuScrolling( ) )
{
currentTweens_ = tweens_->getAnimation( "menuIdle", menuIndex_ );
if ( currentTweens_ && currentTweens_->size( ) > 0 )
{
currentTweens_ = currentTweens_;
}
}
currentTweenIndex_ = 0;
elapsedTweenTime_ = 0;
storeViewInfo_ = baseViewInfo;

View File

@ -726,6 +726,7 @@ AnimationEvents *PageBuilder::createTweenInstance(xml_node<> *componentXml)
buildTweenSet(tweens, componentXml, "onEnter", "enter");
buildTweenSet(tweens, componentXml, "onExit", "exit");
buildTweenSet(tweens, componentXml, "onIdle", "idle");
buildTweenSet(tweens, componentXml, "onMenuIdle", "menuIdle");
buildTweenSet(tweens, componentXml, "onMenuScroll", "menuScroll");
buildTweenSet(tweens, componentXml, "onHighlightEnter", "highlightEnter");
buildTweenSet(tweens, componentXml, "onHighlightExit", "highlightExit");

View File

@ -21,7 +21,7 @@
std::string retrofe_version_major = "0";
std::string retrofe_version_minor = "8";
std::string retrofe_version_build = "8";
std::string retrofe_version_build = "9";
std::string Version::getString( )