Hi. I'm writing a game in C++, and I'm trying to get it to recognize keyboard and mouse events. Google tells me that boost.signal is suitable for event handling, but none of the code samples or tutorials I've found tell me how to associate a keypress or mouseclick with a function. Can anyone shed any light on this?
+3
A:
I think taking a look at SDL and it's SDL input subsystem might give you some hints. It all depends on what is the source of your keyboard and mouse events. Is it SDL? DirectX? If neither, then you're probably doing it wrong :).
Kornel Kisielewicz
2010-05-24 19:27:59
Somehow I missed this while googling. This looks like what I need. Thanks.
Max
2010-05-24 19:31:59
+1
A:
The events that you receive will depend on the operating system you're using, and any frameworks that stand between you and the OS. Qt is a popular cross-platform framework, for example.
Mark Ransom
2010-05-24 19:29:03
A:
If you're not using a GUI library or other type of engine that already provide you input informations, a good library to just get inputs is OIS : http://sourceforge.net/projects/wgois/
Klaim
2010-05-24 20:18:45