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 / Make a circle that you could change the diameter until you click again

Author
Message
dab
20
Years of Service
User Offline
Joined: 22nd Sep 2004
Location: Your Temp Folder!
Posted: 18th Sep 2005 23:06
How would I make it where when you click, you add a circle. Then you move the mouse left/right to adjust the diameter of the circle then you click the mouse again to stop adjusting and the circle fills itself in with the color. How would I do this. Here is what I had so far:



------------------------
Visit my website of games
http://www.dabip.co.nr!
Underworld 1020
21
Years of Service
User Offline
Joined: 2nd Mar 2004
Location: NY, USA
Posted: 19th Sep 2005 00:32 Edited at: 19th Sep 2005 00:56
It's not the greatest, but it works. The FillCircle() function works ok, but it leaves some blank spots.

Controls:


The Code:


kenmo2
20
Years of Service
User Offline
Joined: 15th Apr 2005
Location:
Posted: 19th Sep 2005 00:48 Edited at: 27th Jun 2012 06:36


Something like that?
dab
20
Years of Service
User Offline
Joined: 22nd Sep 2004
Location: Your Temp Folder!
Posted: 19th Sep 2005 02:28 Edited at: 19th Sep 2005 03:20
THAT WORKS PERFECTLY! Only problem is that when I try to change the color (I've put it in my own code I had), it changes all the colors of circles. How would I make it to where the circles would have their own color?

------------------------
Visit my website of games
http://www.dabip.co.nr!
kenmo2
20
Years of Service
User Offline
Joined: 15th Apr 2005
Location:
Posted: 19th Sep 2005 05:30 Edited at: 27th Jun 2012 06:36
Well each circle should have its own color. (You are replying to me, right?) Each circle's color is stored in CircleC(#) where # is 0 to MaxCircles. If you want you could post your code and I could probably find the problem.
dab
20
Years of Service
User Offline
Joined: 22nd Sep 2004
Location: Your Temp Folder!
Posted: 19th Sep 2005 16:39
Actually at about 10 minutes after posting, I solved it and got it working perfectly! I even added when you hit control z it takes one away! How would I keep it from getting bigger than a certain size?

------------------------
Visit my website of games
http://www.dabip.co.nr!
Ooska
20
Years of Service
User Offline
Joined: 29th Aug 2004
Location:
Posted: 22nd Sep 2005 05:03
maybe something like this


if circlediameter>(maximum) then circlediameter=(maximum)

Read Ender's Game. And all its sequals.
dab
20
Years of Service
User Offline
Joined: 22nd Sep 2004
Location: Your Temp Folder!
Posted: 22nd Sep 2005 17:14
Wow, thats exactly what I put after I posted the problem. Thanks everyone for your help!

------------------------
Visit my website of games
http://www.dabip.co.nr!

Login to post a reply

Server time is: 2025-05-22 17:20:14
Your offset time is: 2025-05-22 17:20:14