• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

GML gui scale using a slider

geky

Member
I wanted to give a nice user experience by having a slider for setting the GUI scale.
I thought it would be a problem with that because of the difference in scale values every step.

Does anyone know of a solution to this?

Here is a quick trimmed-down version in gmlive for demonstration -> [link]

Thanks!
 
S

Seknight

Guest
you could put the slider in the normal draw event instead of the GUI, or you could scale the slider to the GUI scale to keep it the same size
 

geky

Member
One solution was to let the sliders anchor point be at the center of the GUI layer. -> [gmlive example]. Still not perfect, but at least it's useable. I would imagine it could be anywhere on the Y-axis of the screen, so long as its X point is centered.
 
Or you could make the x and y scale of the slider act inversely towards the scaling of the GUI layer and only when you release the button does it reset to x and y scale of 1.
 
Top