Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualKhatharr

Posted 24 October 2012 - 10:05 PM

You can take a look at something I posted a while back. The Input namespace is implemented using DirectInput. It's a bit of a mess since it does some stuff like key-mapping and abstraction, but you should be able to just look over the "initialize" and "update" functions and the mouse related functions and see how to set it up and read mouse input.

Here's a link to the project:

http://www.gamedev.n...attach_id=10098

Please note that I wrote this a while back and I've learned a lot of important stuff since then, so don't think that this is actually good code. It's not horrible, but it's not designed at a professional level either. It's just an example of the basic underlying procedure. The files you want in the archive are "Bricks/Bricks/ns_Input.h" and "Bricks/Bricks/ns_Input.cpp".

Hope that helps. Posted Image

#1Khatharr

Posted 24 October 2012 - 10:02 PM

You can take a look at something I posted a while back. The Input namespace is implemented using DirectInput. It's a bit of a mess since it does some stuff like key-mapping and abstraction, but you should be able to just look over the initialize function and the mouse related stuff and see how to set it up and read mouse input.

Here's a link to the project:

http://www.gamedev.net/index.php?app=core&module=attach&section=attach&attach_id=10098

Please note that I wrote this a while back and I've learned a lot of important stuff since then, so don't think that this is actually good code. It's not horrible, but it's not designed at a professional level either. It's just an example of the basic underlying procedure. The files you want in the archive are "Bricks/Bricks/ns_Input.h" and "Bricks/Bricks/ns_Input.cpp".

Hope that helps. :)

PARTNERS