Skip to main content
HP_it
Senior II
May 27, 2020
Solved

Creating a rotary button effect?

  • May 27, 2020
  • 1 reply
  • 2348 views

Hi,

I was wondering if anyone have made a 'rotary-style' button, like a rotary encoder or a volume knob that can go on-screen?

I suspect it would involve resolving a touch input and mapping it to some sort of circular motion or something like that. A rounded slider would also be of high interest!

Any inputs would be appreciated! Thanks!

This topic has been closed for replies.
Best answer by Romain DIELEMAN

Hi,

In Demo 1 you have an example of a circle progress bar that you manually increase and decrease, I suppose this is what you are looking for. Look at the CircleProgress.cpp and hpp files to have an understanding of how it was implemented.

0693W000001pcjKQAQ.jpg

/Romain

1 reply

Romain DIELEMAN
Romain DIELEMANBest answer
ST Employee
May 28, 2020

Hi,

In Demo 1 you have an example of a circle progress bar that you manually increase and decrease, I suppose this is what you are looking for. Look at the CircleProgress.cpp and hpp files to have an understanding of how it was implemented.

0693W000001pcjKQAQ.jpg

/Romain

HP_it
HP_itAuthor
Senior II
May 28, 2020

Beautiful! Thanks, I knew I had seen something like that somewhere :D I'll dive into that code now!

MYass.2
Associate
February 11, 2021

Hi,

I am interested in this demo, where I can find it?

Thank you in advance for your reply.