How to make a rectangle selection tool?

Hello!
I'm working with a game editor program, where the player can create their own maps. Right know I'm working with collisions, and since it's unpredictable where the player place the objects like trees, houses and cars...etc have I an idea with making a rectangle selection tool. Where the player can drag a collision box around the object, so the sprite stops when it hits the box. The problem is that I dont know how to make a tool like that. so my question is how do I create a tool like that (see picture under for more information)? any ideas or tips would be very appreciated :D

btw I'm using the SDL framework

here is a picture that illustrate the tool I want to create:
http://tinypic.com/r/2s6vbsl/8

thanks for answers!
Last edited on
You should explain more about what you need help with.
@zoran404
I have edited the problem description now :D

btw my question is how I could make a selection tool. Like the tool you could see on the picture that I uploaded. Instead of using the selection tool to copy and paste thing (like in the program paint), I will use the selection tool to create a collision box around sprites. So the player sprites know where it should stop.

Let the user select the area (get the position of the cursor where they press the left mouse button and where they release it) and make an array of those areas.
When something moves just check if it may move there.
@zoran404
Thanks, It works perfectly :D
Topic archived. No new replies allowed.