How would I go on and create a slider? Without using any libraries?

I’m making a game, which also includes a settings tab where the end-user can adjust settings to their preference, the problem is however that I have no idea how to make a slider without making use of a library, the slider I’ve made uses a lot of double code, which I’d like to avoid. I was thinking of making a for-loop but I have no idea where to start, I would love it if someone could help me out!
Sample code: https://i.imgur.com/DoAITVt.png

1 Like

-a- if you have made already a functioning slider
cut it out to a little ( running ) test project
and post it here, possibly can work on it…

( please use the </> code tag from editor menu to paste here )

-b- also for adjustments like that i did 2 very different approaches
Use Key and [+] [-] as color sliders? ,
key plus plus and mousewheel plus plus
what are mostly 2 lines per ( invisible ) slider
and could also be used while the game / not only from a setup page.

( i come up with that ideas while adjusting colors … for painter type sketches )

-c- but what’s your problem with professional slider like from G4P
( besides i love you want to learn it )

1 Like

see also here, in the examples section

https://www.processing.org/examples/scrollbar.html

4 Likes