Hosting courtesy of Sourceforge

SourceForge Logo
Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

Menu::KeyInputter Class Reference

#include <MenuManager.h>

Inheritance diagram for Menu::KeyInputter:

Inheritance graph
[legend]
Collaboration diagram for Menu::KeyInputter:

Collaboration graph
[legend]
List of all members.

Public Methods

 KeyInputter (const std::string &name, SDLKey &key, const SDL_Color &selected=DEFAULT_SELECTED_COL, const SDL_Color &unselected=DEFAULT_DESELECTED_COL, const SDL_Color &active=DEFAULT_ACTIVE_COL)
MenuHandleResult handleEvent (SDL_Event *e)
virtual void draw (SDL_Surface *surf, TTF_Font *font, int centerX, int centerY)

Detailed Description

Class to input an SDLKey

Definition at line 206 of file MenuManager.h.


Constructor & Destructor Documentation

KeyInputter::KeyInputter const std::string &    title,
SDLKey &    k,
const SDL_Color &    sel = DEFAULT_SELECTED_COL,
const SDL_Color &    unsel = DEFAULT_DESELECTED_COL,
const SDL_Color &    act = DEFAULT_ACTIVE_COL
 

Parameters:
key  SDLKey that is modified by this class, depending on user input

Definition at line 222 of file MenuManager.cpp.


Member Function Documentation

void KeyInputter::draw SDL_Surface *    surf,
TTF_Font *    font,
int    centerX,
int    centerY
[virtual]
 

render name centered at (centerX, centerY), render key name at (centerX + INPUT_HORIZ_SPACE, centerY)

Reimplemented from Menu::DefaultMenuItem.

Definition at line 228 of file MenuManager.cpp.

MenuHandleResult KeyInputter::handleEvent SDL_Event *    e [virtual]
 

if isActive() and escape not pressed, change key to the currently pressed key, else if key is enter, become active, if key not enter, pass the event

Reimplemented from Menu::InputGetter.

Definition at line 250 of file MenuManager.cpp.


The documentation for this class was generated from the following files:
Generated on Tue May 21 07:26:56 2002 for BomberLAN by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001