Game Development Reference
In-Depth Information
Figure 10.2 A debug mode shows the hot zones of the main menu buttons in
Chapter 14 's game.
It's also possible to allow the user to seamlessly switch between mouse and key-
board navigation of the menus. One common way to accomplish this is to hide the
mouse cursor (and ignore the mouse position) when the user presses a keyboard
navigation button. Then, as soon as the mouse is moved again, mouse selection is
activated once more. This type of system is further extended by games that sup-
port a keyboard/mouse as well as a controller. In these cases, it might also be de-
signed so that the menu navigation tips change based on whether the controller or
the keyboard/mouse is active.
Typing
A typical usage case for a computer game is to allow the player to type in one or
more words while in a menu. This might be for the purposes of a high score list,
or maybe so the player can type in a filename to save/load. When a traditional pro-
gram supports typing in words, it's usually done via standard input, but as previ-
ously covered in Chapter 5 , Input ,” standard input typically is not available for a
game.
Search WWH ::




Custom Search