mirror of
https://github.com/FunKey-Project/RetroFE.git
synced 2026-01-28 02:35:23 +01:00
Added onMenuScroll animation, which activates once every time the menu starts scrolling.
This commit is contained in:
parent
9e7802c72e
commit
5abfe6d205
@ -325,6 +325,19 @@ void Page::playlistChange()
|
||||
}
|
||||
|
||||
|
||||
void Page::menuScroll()
|
||||
{
|
||||
Item *item = selectedItem_;
|
||||
|
||||
if(!item) return;
|
||||
|
||||
for(std::vector<Component *>::iterator it = LayerComponents.begin(); it != LayerComponents.end(); ++it)
|
||||
{
|
||||
(*it)->triggerEvent( "menuScroll", menuDepth_ - 1 );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Page::highlightEnter()
|
||||
{
|
||||
Item *item = selectedItem_;
|
||||
@ -371,10 +384,18 @@ void Page::setScrolling(ScrollDirection direction)
|
||||
switch(direction)
|
||||
{
|
||||
case ScrollDirectionForward:
|
||||
if(!scrollActive_)
|
||||
{
|
||||
menuScroll();
|
||||
}
|
||||
menuDirection = ScrollingList::ScrollDirectionForward;
|
||||
scrollActive_ = true;
|
||||
break;
|
||||
case ScrollDirectionBack:
|
||||
if(!scrollActive_)
|
||||
{
|
||||
menuScroll();
|
||||
}
|
||||
menuDirection = ScrollingList::ScrollDirectionBack;
|
||||
scrollActive_ = true;
|
||||
break;
|
||||
|
||||
@ -86,6 +86,7 @@ public:
|
||||
std::string getCollectionName();
|
||||
void setMinShowTime(float value);
|
||||
float getMinShowTime();
|
||||
void menuScroll();
|
||||
void highlightEnter();
|
||||
void highlightExit();
|
||||
void addPlaylist();
|
||||
|
||||
@ -704,6 +704,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, "onMenuScroll", "menuScroll");
|
||||
buildTweenSet(tweens, componentXml, "onHighlightEnter", "highlightEnter");
|
||||
buildTweenSet(tweens, componentXml, "onHighlightExit", "highlightExit");
|
||||
buildTweenSet(tweens, componentXml, "onMenuEnter", "menuEnter");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user