Page 1 of 2

Slider

PostPosted: Tue Aug 16, 2005 10:19 am
by Joshua Worth
I am trying to make a click and drag slider exept I'm failing with the code :roll:
I can't add a picture, but something like this:

+ ===|====== -

PostPosted: Tue Aug 16, 2005 12:21 pm
by jazz_e_bob
Interesting...

I'll see if I can come up with something.

PostPosted: Tue Aug 16, 2005 1:21 pm
by Game A Gogo
I know how to create one whitout click'n'drag, but whit button

PostPosted: Tue Aug 16, 2005 2:47 pm
by ondy1985
After seconds and seconds of thinking I came up with a quick easy-to-use solution. You can download the source .ged here.

Hope it helps.

PostPosted: Tue Aug 16, 2005 11:07 pm
by jazz_e_bob

PostPosted: Wed Aug 17, 2005 12:30 am
by Game A Gogo
wow :shock:
you know a lot about script

PostPosted: Wed Aug 17, 2005 6:56 pm
by ondy1985


Yes, the one of yours is much better. But I only did the one of mine in about 5 minutes, just to demonstrate the basic idea. I noticed that you had the same problem while adding 'Mouse Button Down' event to the "slider-knob" actor as you can't use empty script. But instead of your "x=x;" I used a comment "//no script" :)

Maybe Makslane could add a "draggable" actor property. If checked (or set to TRUE in script), the actor would be draggable. If unchecked (or set to FALSE), it wouldn't be draggable. Then maybe som new events, like "Drag" and "Drop". That would be neat.

PostPosted: Wed Aug 17, 2005 9:50 pm
by jazz_e_bob
Hi ondy1985.

Yeah. I like the idea of programming re-usable "modules".

On create sliderBacking you set the faders minimum value, maximum value and value. The rest takes care of itself.

To read the value simply use sliderTextValue.value.

Have a great day mate. :)

PostPosted: Sat Aug 20, 2005 9:02 am
by Joshua Worth
can I steal your code, jazz_e_bob

PostPosted: Sat Aug 20, 2005 10:07 am
by jazz_e_bob
Help yourself mate.

8)

PostPosted: Sat Aug 20, 2005 10:04 pm
by Joshua Worth
kewl :wink:

PostPosted: Fri Sep 02, 2005 11:20 pm
by Joshua Worth
jazz_e_bob: How do you locate it anywhere on the screen?

PostPosted: Sat Sep 03, 2005 4:03 am
by jazz_e_bob
Unlock the parts and move the backing to where you want the slider to be.

( right-mouse click unlock )

PostPosted: Thu Sep 15, 2005 9:33 am
by Joshua Worth
My brother does a lot of programing in C++. He made a simpler slider program: http://bubble.worth.id.au/~joshua/Game%20Editor/Jslider.zip

PostPosted: Thu Sep 15, 2005 10:32 am
by willg101
Nice! 8)