Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Even though user interface programming seems easy, it’s actually quite tricky, which is ironic since most game companies assign the user interface code to their greenest programmers. It’s a simple matter under almost any platform to read a keyboard, mouse, or gamepad. Most programmers take this input, like the X,Y coordinate of a mouse, and use it to directly modify the game state, such as where the player is looking in a first-person shooter. This technique works all too well until you want to do something like switch out that mouse for a USB gamepad or perhaps change how the controls are interpreted by the game. Maybe your player wants to switch the up/down or Y-axis of the camera controls from normal to inverted, like I prefer.