I’m making the settings page of a pretty simple puzzle game. I need to be able to control the volume, SFX and Brightness levels according to the height of each bar, but I need each bar to be controlled by touch input. Has anyone done this before? I found prebuilt ones online, and read through available documentation, but I want to use my own sprites and backgrounds and don’t know how to open those files so that I can copy their actions and conditions. Naturally, each bar also has to have limitations so that they don’t extend outside of the parameters which I have written down.
Any help would be greatly appreciated.
(Note, I included a picture of the sliders below and the setup that I’m kind of trying to accomplish)
Here is the currently underwhelming appearance of the events for the settings page as well. I know I need a lot more, I just don’t know what yet. Oddly enough, it also essentially says that I am setting the height of the volume slider to the existing global sound level, as opposed to the other way around. But when I set it up, it said that was how I set up the global sound according to the height of the bar. I’m just confused at this point…
basic things you should know for craeting a working slider.
your sprite’s width and height is given in pixels. the volume is a value from 0 to 100. you can call it percent (%). GDevelop will convert pixels to value or value to pixels 1:1.
so, if your sprite’s max height is 100 px, you can use it directly to give input to the volume. but if not, you need to use math to convert your custom size sprite’s height to 0-100 range. of course not the sprite itself, the object’s dimensions isn’t change now.
and the situation is the same to backwards too. you have a 0-100 value from the volume, you need to use math to convert it to your sprite.