Skip to main content
RKühn.1
Visitor II
March 16, 2020
Question

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

  • March 16, 2020
  • 1 reply
  • 716 views

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

This topic has been closed for replies.

1 reply

Tuoman
Senior II
March 18, 2020

Hi,

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

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