mirror of
https://github.com/FunKey-Project/RetroFE.git
synced 2025-12-12 17:58:53 +01:00
add xml events onMenuFastScrollPrev onMenuFastScrollNext onMenuScrollPrev onMenuScrollNext
Signed-off-by: Vincent-FK <vincent.buso@funkey-project.com>
This commit is contained in:
parent
bcac9e6f4d
commit
71d439c3f7
@ -893,6 +893,8 @@ void ScrollingList::scroll( bool forward )
|
||||
|
||||
resetTweens( c, tweenPoints_->at( nextI ), scrollPoints_->at( i ), scrollPoints_->at( nextI ), scrollPeriod_ );
|
||||
c->baseViewInfo.font = scrollPoints_->at( nextI )->font; // Use the font settings of the next index
|
||||
c->triggerEvent( forward?"menuScrollNext":"menuScrollPrev" );
|
||||
c->update(0);
|
||||
c->triggerEvent( "menuScroll" );
|
||||
}
|
||||
|
||||
|
||||
@ -444,6 +444,8 @@ void Page::menuScroll()
|
||||
|
||||
for(std::vector<Component *>::iterator it = LayerComponents.begin(); it != LayerComponents.end(); ++it)
|
||||
{
|
||||
(*it)->triggerEvent( scrollDirectionForward_?"menuScrollNext":"menuScrollPrev", menuDepth_ - 1 );
|
||||
(*it)->update(0);
|
||||
(*it)->triggerEvent( "menuScroll", menuDepth_ - 1 );
|
||||
}
|
||||
}
|
||||
@ -457,6 +459,8 @@ void Page::menuFastScroll()
|
||||
|
||||
for(std::vector<Component *>::iterator it = LayerComponents.begin(); it != LayerComponents.end(); ++it)
|
||||
{
|
||||
(*it)->triggerEvent( scrollDirectionForward_?"menuFastScrollNext":"menuFastScrollPrev", menuDepth_ - 1 );
|
||||
(*it)->update(0);
|
||||
(*it)->triggerEvent( "menuFastScroll", menuDepth_ - 1 );
|
||||
}
|
||||
}
|
||||
@ -671,6 +675,7 @@ void Page::setScrolling(ScrollDirection direction)
|
||||
switch(direction)
|
||||
{
|
||||
case ScrollDirectionForward:
|
||||
scrollDirectionForward_=true;
|
||||
if(!scrollActive_)
|
||||
{
|
||||
menuScroll();
|
||||
@ -679,9 +684,9 @@ void Page::setScrolling(ScrollDirection direction)
|
||||
menuFastScroll();
|
||||
}
|
||||
scrollActive_ = true;
|
||||
scrollDirectionForward_=true;
|
||||
break;
|
||||
case ScrollDirectionBack:
|
||||
scrollDirectionForward_=false;
|
||||
if(!scrollActive_)
|
||||
{
|
||||
menuScroll();
|
||||
@ -690,7 +695,6 @@ void Page::setScrolling(ScrollDirection direction)
|
||||
menuFastScroll();
|
||||
}
|
||||
scrollActive_ = true;
|
||||
scrollDirectionForward_=false;
|
||||
break;
|
||||
case ScrollDirectionIdle:
|
||||
default:
|
||||
|
||||
@ -936,7 +936,11 @@ AnimationEvents *PageBuilder::createTweenInstance(xml_node<> *componentXml)
|
||||
buildTweenSet(tweens, componentXml, "onIdle", "idle");
|
||||
buildTweenSet(tweens, componentXml, "onMenuIdle", "menuIdle");
|
||||
buildTweenSet(tweens, componentXml, "onMenuScroll", "menuScroll");
|
||||
buildTweenSet(tweens, componentXml, "onMenuScrollPrev", "menuScrollPrev");
|
||||
buildTweenSet(tweens, componentXml, "onMenuScrollNext", "menuScrollNext");
|
||||
buildTweenSet(tweens, componentXml, "onMenuFastScroll", "menuFastScroll");
|
||||
buildTweenSet(tweens, componentXml, "onMenuFastScrollPrev", "menuFastScrollPrev");
|
||||
buildTweenSet(tweens, componentXml, "onMenuFastScrollNext", "menuFastScrollNext");
|
||||
buildTweenSet(tweens, componentXml, "onHighlightEnter", "highlightEnter");
|
||||
buildTweenSet(tweens, componentXml, "onHighlightExit", "highlightExit");
|
||||
buildTweenSet(tweens, componentXml, "onMenuEnter", "menuEnter");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user