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.

Code Snippets / [DBP] Crosshairs and Area Selection

Author
Message
enderleit
17
Years of Service
User Offline
Joined: 30th May 2007
Location: Denmark
Posted: 26th Jun 2010 13:15 Edited at: 5th Oct 2010 14:55
Just a little snippet I played around with when I was bored.
Thought it might be useful to someone, so here it is...

Basically you get some crosshairs controlled by the mouse, and you can select an area of the screen using the left mouse button.
You can de-select the area using the right mouse button, or by selecting a new area...



- enderleit
Madscientist
15
Years of Service
User Offline
Joined: 23rd Aug 2009
Location: Between a rock and a hard place
Posted: 29th Jun 2010 21:10
Thats pretty cool. It would be great if it could be made into a 2d level editor.

If it hasn't exploded yet, I haven't touched it.
Aralox
17
Years of Service
User Offline
Joined: 16th Jan 2007
Location: Melbourne
Posted: 4th Jul 2010 10:46
in my editor // isnt rem, is there a way to change that?
but anyways when i find and replace all //s with rems (or '`'s), it gives a type error : "command out of place at line 11"

enderleit
17
Years of Service
User Offline
Joined: 30th May 2007
Location: Denmark
Posted: 20th Jul 2010 10:54
Looks correct to me... maybe try removing the comments alltogether, and see if that works.

I'm not at home right now, so can't check it out, but I'll have a look when I get home. And maybe put up a version with REM's instead of //'s.

- enderleit
enderleit
17
Years of Service
User Offline
Joined: 30th May 2007
Location: Denmark
Posted: 23rd Jul 2010 10:48 Edited at: 5th Oct 2010 14:57
Here's the same code with REM's as promised... hopes this works for you.



- enderleit
Aralox
17
Years of Service
User Offline
Joined: 16th Jan 2007
Location: Melbourne
Posted: 23rd Jul 2010 11:31
hey thats a pretty nice program, thanks for the Remmed version

enderleit
17
Years of Service
User Offline
Joined: 30th May 2007
Location: Denmark
Posted: 23rd Jul 2010 13:42
You're welcome... =)

- enderleit

Login to post a reply

Server time is: 2024-11-21 21:05:52
Your offset time is: 2024-11-21 21:05:52