Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

2D All the way! / scrollbar demo

Author
Message
Phaelax
DBPro Master
20
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 21st Apr 2012 23:02 Edited at: 21st Apr 2012 23:02
Just a snippet I made for a larger program. Use it for what its worth. (edit, this was suppose to be code snippets board)



"You're not going crazy. You're going sane in a crazy world!" ~Tick
Daniel wright 2311
User Banned
Posted: 1st Jun 2012 07:24 Edited at: 1st Jun 2012 07:24
what value do I use to change anything? what is the value name?

example

if what? =10 then this happens

my signature keeps being erased by a mod So this is my new signature.
zeroSlave
14
Years of Service
User Offline
Joined: 13th Jun 2009
Location: Springfield
Posted: 2nd Jun 2012 06:11 Edited at: 2nd Jun 2012 08:56
sliders(id).value would be my guess.

Good job, Phaelax! Could be pretty slick to add a style variable in the function variables and you could have a few more options for appearance. Could also have a orientation variable in there so you could have vertical and horizontal sliders as well. Either way, great job!

Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid.
Daniel wright 2311
User Banned
Posted: 2nd Jun 2012 07:14
Quote: "sliders(id).value would be my guess."


And this is what I thought to,but it did nothing at all,this is why I came to ask,I tryed every thing in the code and nothing changed so I was real confused.

my signature keeps being erased by a mod So this is my new signature.
zeroSlave
14
Years of Service
User Offline
Joined: 13th Jun 2009
Location: Springfield
Posted: 2nd Jun 2012 08:53 Edited at: 2nd Jun 2012 08:57
sliders(id).value where 'id' is the number of your slider sent to the function: slider(id, x, y, width, height, minVal, maxVal)

Try putting this:
after the slider(1, 200,100, 200, 20, 0, 50) in the main loop.

Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid.
Daniel wright 2311
User Banned
Posted: 2nd Jun 2012 21:17
Ok, thank you,I need this.

my signature keeps being erased by a mod So this is my new signature.
Phaelax
DBPro Master
20
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 13th Jun 2012 03:43
I made up two quick functions to get and set the value. The function for setting the value takes most of the same parameters you'd use when drawing the slider. Now this snippet I just made quickly for another program and posted it just for the heck of it. So ideally, you'd probably want most of those values describing the slider stored in a UDT and simply pass that into the function instead.



"You're not going crazy. You're going sane in a crazy world!" ~Tick

Login to post a reply

Server time is: 2024-03-29 09:51:53
Your offset time is: 2024-03-29 09:51:53