mirror of
https://github.com/FunKey-Project/RetroFE.git
synced 2026-04-30 09:59:26 +02:00
Added onMenuScroll animation, which activates once every time the menu starts scrolling.
This commit is contained in:
@@ -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()
|
void Page::highlightEnter()
|
||||||
{
|
{
|
||||||
Item *item = selectedItem_;
|
Item *item = selectedItem_;
|
||||||
@@ -371,10 +384,18 @@ void Page::setScrolling(ScrollDirection direction)
|
|||||||
switch(direction)
|
switch(direction)
|
||||||
{
|
{
|
||||||
case ScrollDirectionForward:
|
case ScrollDirectionForward:
|
||||||
|
if(!scrollActive_)
|
||||||
|
{
|
||||||
|
menuScroll();
|
||||||
|
}
|
||||||
menuDirection = ScrollingList::ScrollDirectionForward;
|
menuDirection = ScrollingList::ScrollDirectionForward;
|
||||||
scrollActive_ = true;
|
scrollActive_ = true;
|
||||||
break;
|
break;
|
||||||
case ScrollDirectionBack:
|
case ScrollDirectionBack:
|
||||||
|
if(!scrollActive_)
|
||||||
|
{
|
||||||
|
menuScroll();
|
||||||
|
}
|
||||||
menuDirection = ScrollingList::ScrollDirectionBack;
|
menuDirection = ScrollingList::ScrollDirectionBack;
|
||||||
scrollActive_ = true;
|
scrollActive_ = true;
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -86,6 +86,7 @@ public:
|
|||||||
std::string getCollectionName();
|
std::string getCollectionName();
|
||||||
void setMinShowTime(float value);
|
void setMinShowTime(float value);
|
||||||
float getMinShowTime();
|
float getMinShowTime();
|
||||||
|
void menuScroll();
|
||||||
void highlightEnter();
|
void highlightEnter();
|
||||||
void highlightExit();
|
void highlightExit();
|
||||||
void addPlaylist();
|
void addPlaylist();
|
||||||
|
|||||||
@@ -704,6 +704,7 @@ AnimationEvents *PageBuilder::createTweenInstance(xml_node<> *componentXml)
|
|||||||
buildTweenSet(tweens, componentXml, "onEnter", "enter");
|
buildTweenSet(tweens, componentXml, "onEnter", "enter");
|
||||||
buildTweenSet(tweens, componentXml, "onExit", "exit");
|
buildTweenSet(tweens, componentXml, "onExit", "exit");
|
||||||
buildTweenSet(tweens, componentXml, "onIdle", "idle");
|
buildTweenSet(tweens, componentXml, "onIdle", "idle");
|
||||||
|
buildTweenSet(tweens, componentXml, "onMenuScroll", "menuScroll");
|
||||||
buildTweenSet(tweens, componentXml, "onHighlightEnter", "highlightEnter");
|
buildTweenSet(tweens, componentXml, "onHighlightEnter", "highlightEnter");
|
||||||
buildTweenSet(tweens, componentXml, "onHighlightExit", "highlightExit");
|
buildTweenSet(tweens, componentXml, "onHighlightExit", "highlightExit");
|
||||||
buildTweenSet(tweens, componentXml, "onMenuEnter", "menuEnter");
|
buildTweenSet(tweens, componentXml, "onMenuEnter", "menuEnter");
|
||||||
|
|||||||
Reference in New Issue
Block a user