Original Post
I am trying to make a class to handle user input (right now just keyboard and mouse). I''m thinking of using void pointers to handler functions for each registered class. During each update, if a class is listening for a certain input, its handler function will be called. I have a few questions about the implementation though. First, should I be using a pointer array of each class''s handler functions? Second, I''m encoding the keyboard info in a bool array but how do I encode the mouse information? I''ll use a point for the position but what about each button and scroll feature? Finally, I want this to be as platform independent as possible so is this the right way to be doing this? Should I just use DirectX or are there better alternatives?
Thanks for any feedback.