cancel
Showing results for 
Search instead for 
Did you mean: 

Creating a rotary button effect?

HP
Senior III

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!

1 ACCEPTED SOLUTION

Accepted Solutions
Romain DIELEMAN
ST Employee

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

View solution in original post

6 REPLIES 6
Romain DIELEMAN
ST Employee

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

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

MYass.2
Associate II

Hi,

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

Thank you in advance for your reply.

Hi,

This demo is available when you create a project in TouchGFX Designer under the "UI template" section.

0693W000008Fx8VQAS.png/Romain

MYass.2
Associate II

It's the perfect example I'm looking for, thank you Romain.

perfect then 😉

/Romain