Page 1 of 1

Slide meter?

PostPosted: Wed Jun 08, 2011 10:32 pm
by SuperSonic
I want to make a slide meter in my game to control certain variables. Can anyone help me? :P

Re: Slide meter?

PostPosted: Wed Jun 08, 2011 10:45 pm
by skydereign
I'm in class right now, so I can't make a more dynamic example, but maybe this one will help.
http://game-editor.com/forum/viewtopic.php?f=2&t=6788&p=48575&hilit=slide+bar#p48554

Re: Slide meter?

PostPosted: Fri Jun 10, 2011 1:26 am
by SuperSonic
This is a lot like what I want. The only problem is that it's a little glitchy. Know what I mean? :)

Re: Slide meter?

PostPosted: Fri Jun 10, 2011 1:46 am
by skydereign
Yeah I know, was just something to point you in the right direction. Here is a more cleaned up example. It doesn't keep the variable between 0 and 1, but the display does, by dividing the variable by the width of the bar.
Code: Select all
textNumber=(float)slide_var/bar.width;


It uses the same data folder as the other file I pointed you to.

-Edit
Attached one that you can specify the max of the variable.

Re: Slide meter?

PostPosted: Sat Jun 18, 2011 8:30 pm
by SuperSonic
Sorry, it took me a while to get back on and check this :D

Thanks for the code and examples. This should work :P