cancel
Showing results for 
Search instead for 
Did you mean: 

How can a ScrollableContainer be scrolled using easing equation without a touchscreen?

RKühn.1
Associate

My application does NOT include a touchsreen. User input is via external hw buttons.

I have a ScollableContainer I wish to scroll via buttons.

So far I have been scrolling the containers contents with the method ScrollableContainer::moveChildrenRelative(int16_t deltaX, int16_t deltaY) , but this does not allow for animations/ easing.

Can the containers children be moved with:

startMoveAnimation(int16_t endX, int16_t endY, uint16_t duration, EasingEquation xProgressionEquation = &EasingEquations::linearEaseNone, EasingEquation yProgressionEquation = &EasingEquations::linearEaseNone)

If so then how?

Thanx for any assistance

1 REPLY 1
Tuoman
Senior II

Hi,

There is animateToItem() function, I use that. Something like this:

    if (selectedMenuitem > scrollpos)
    {
        scrollList1.animateToItem(selectedMenuitem, 10);
        scrollpos += 1;
    }