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 / Toggling Buttons?

Author
Message
Blazer
22
Years of Service
User Offline
Joined: 22nd Oct 2002
Location: United States
Posted: 2nd Feb 2003 20:23
I wan't to make it so when you click a button something appers, if you click it again it dissaperes. I can do this but if you hold the button down for more than 0.1 seconds it flashes on and off.

Is there a way to set it so it will wait about 0.5 a second before it will turn off? (wait dosn't work, it makes the whole thing stop for 0.5 seconds)

Plese help!
As I walk through the vally of the shadow of death, I will fear no evil.
- Psalms 23:4
Blazer
22
Years of Service
User Offline
Joined: 22nd Oct 2002
Location: United States
Posted: 2nd Feb 2003 22:40
Nm I figured it out:

Wait#=0

do
if returnkey()=1 then Dowhatever : Inc Wait#
if returnkey()=1 and It'sdonewhatever and Wait# > 10 then Do more stuff
loop

As I walk through the vally of the shadow of death, I will fear no evil.
- Psalms 23:4
Hamish McHaggis
22
Years of Service
User Offline
Joined: 13th Dec 2002
Location: Modgnik Detinu
Posted: 3rd Feb 2003 19:21
Or you could make a code that does it obly does it once per button press...



That should do it!

Yum! Yum! Yum! Yum!

Login to post a reply

Server time is: 2025-08-08 11:44:54
Your offset time is: 2025-08-08 11:44:54