Hosting courtesy of Sourceforge

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

Menu::IntInputter Class Reference

#include <MenuManager.h>

Inheritance diagram for Menu::IntInputter:

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

Collaboration graph
[legend]
List of all members.

Public Methods

MenuHandleResult handleEvent (SDL_Event *e)
virtual void draw (SDL_Surface *surf, TTF_Font *font, int centerX, int centerY)

Detailed Description

Class to input an integer

Definition at line 224 of file MenuManager.h.


Constructor & Destructor Documentation

IntInputter::IntInputter const std::string &    name,
int &    i,
int    min_,
int    max_,
const SDL_Color &    s = DEFAULT_SELECTED_COL,
const SDL_Color &    u = DEFAULT_DESELECTED_COL,
const SDL_Color &    a = DEFAULT_ACTIVE_COL
 

Definition at line 268 of file MenuManager.cpp.


Member Function Documentation

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

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

Reimplemented from Menu::DefaultMenuItem.

Definition at line 316 of file MenuManager.cpp.

MenuHandleResult IntInputter::handleEvent SDL_Event *    e [virtual]
 

Become active if !isActive() when enter is pressed. Increment i when up is pressed, decrement it when down is pressed, turn i to the keypressed if it's a number of on the keypad. Using keyboard currently won't work for anything other than single digit numbers

Reimplemented from Menu::InputGetter.

Definition at line 278 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