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.

DarkBASIC Discussion / Slider trouble...

Author
Message
Sunflash
19
Years of Service
User Offline
Joined: 28th Jun 2005
Location: Seattle, Wa
Posted: 25th Feb 2006 09:27
Hey, I have some sliders in my program, but they don't function as I would really like them too. For one, when you want to move them, you have to click a left/right button to move it over one unit. But when you use it for something like volume, you would have to click it 100 times to turn it completly off (assuming that it started at 100 which is the default). This can get your fingers VERY tired! So, does anyone know of a way of making it so you can drag the scroll image to any value? Take TDK's scroll funtion for example. I'll attach a download. I want the sliders to work like those. Any ideas?
-Sunflash

When FPSC develops enough, lets make a Redwall game!

Attachments

Login to view attachments
Sunflash
19
Years of Service
User Offline
Joined: 28th Jun 2005
Location: Seattle, Wa
Posted: 25th Feb 2006 09:42
And here's my actual program (whats actually made) Only the Options menu, and exit button works. This will give you an idea of what needs to b done.

NOTE: Not everything on the options menu works, but it has three functional sliders, the same ones that I'd like edited.
Anyways, thanks for the help
-Sunflash

When FPSC develops enough, lets make a Redwall game!

Attachments

Login to view attachments
Pincho Paxton
22
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 25th Feb 2006 12:30
I made this quick example of how you can drag a slider. This is for menus only because it stops the program from updating.




Pincho Paxton
22
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 25th Feb 2006 13:32 Edited at: 25th Feb 2006 13:42
There is another way as well.

You are waiting for the person to release the mouse button. Something like................

Repeat
Until Mouseclick() = 0

But you could change that part, and use a wait 200 to slow down the repetition.

There are more sophisticater timer() routines like........


If T <= Timer()
` allow slider
T = Timer() + 200
Endif

This is a delay that can be used even during a game. It does not stop the program from updating.

Sunflash
19
Years of Service
User Offline
Joined: 28th Jun 2005
Location: Seattle, Wa
Posted: 26th Feb 2006 09:12
Ok, I worked on it for awhile and fixed some stuff, but there's still several bugs in the code. I NEED to go to bed BAD, so I'll post me "issues" later

*yawn*
Thanks for the help,
-Sunflash

When FPSC develops enough, lets make a Redwall game!

Login to post a reply

Server time is: 2025-05-23 08:24:55
Your offset time is: 2025-05-23 08:24:55