Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 06 Dec 2011
Offline Last Active Dec 25 2011 05:51 PM

Posts I've Made

In Topic: Mouse Events for a Board Game in SDL

23 December 2011 - 04:31 PM

You can just take a look at this tutorial http://lazyfoo.net/S...on09/index.php. The first half of it just describes the class he used to describe each of the screen parts(which i guess would be useful as u'd have to do the same with ur game board) and the second talks about the SDL mouse events. It's not a very difficult concept, if u were able to do the rest this shouldn't be any trouble.
So what you'd do is initialize a SDL_Rect (which contains a top left described by x, y and then width and lenght to give the bottom right) and u'd just use the mouse events to see if it's inside that rectangle and know which 1 to activate.

In Topic: Computer Science

07 December 2011 - 11:12 AM

Thank everyone for answering my questions.