Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

MenuHelp Class Reference

Inheritance diagram for MenuHelp:

Inheritance graph
[legend]
Collaboration diagram for MenuHelp:

Collaboration graph
[legend]

Detailed Description

Help screen.

Definition at line 12 of file MenuHelp.h.

Public Member Functions

 MenuHelp ()
virtual ~MenuHelp ()
virtual const char * getName () const
virtual bool allowBg () const
virtual void drawOn (SDL_Surface *screen)

Protected Member Functions

virtual void own_initState ()
 Display help centerd on screen.
virtual void own_updateState ()
virtual void own_pauseState ()
virtual void own_resumeState ()
 Help will be centred on screen.
virtual void own_cleanState ()


Constructor & Destructor Documentation

MenuHelp::MenuHelp  ) 
 

Definition at line 21 of file MenuHelp.cpp.

00022 {
00023     Font usedFont(Path::dataReadPath("font/font_menu.ttf"), 14);
00024     SDL_Color usedColor = {255, 255, 255, 255};
00025 
00026     Labels labels(Path::dataReadPath("script/labels.lua"));
00027     m_help = new WiPara(labels.getLabel("help"), usedFont, usedColor);
00028 
00029     takeHandler(new HelpInput(this));
00030     registerDrawable(this);
00031     registerDrawable(m_help);
00032 }

MenuHelp::~MenuHelp  )  [virtual]
 

Definition at line 34 of file MenuHelp.cpp.

00035 {
00036     delete m_help;
00037 }


Member Function Documentation

virtual bool MenuHelp::allowBg  )  const [inline, virtual]
 

Reimplemented from GameState.

Definition at line 25 of file MenuHelp.h.

00025 { return true; }

void MenuHelp::drawOn SDL_Surface *  screen  )  [virtual]
 

Implements Drawable.

Definition at line 65 of file MenuHelp.cpp.

00066 {
00067     SDL_Color gray = {0x00, 0x00, 0x00, 128};
00068     SurfaceTool::alphaFill(screen, NULL, gray);
00069 }

virtual const char* MenuHelp::getName  )  const [inline, virtual]
 

Implements INamed.

Definition at line 24 of file MenuHelp.h.

00024 { return "state_help"; };

virtual void MenuHelp::own_cleanState  )  [inline, protected, virtual]
 

Implements GameState.

Definition at line 20 of file MenuHelp.h.

00020 {}

void MenuHelp::own_initState  )  [protected, virtual]
 

Display help centerd on screen.

Implements GameState.

Definition at line 43 of file MenuHelp.cpp.

00044 {
00045     own_resumeState();
00046 }

virtual void MenuHelp::own_pauseState  )  [inline, protected, virtual]
 

Implements GameState.

Definition at line 18 of file MenuHelp.h.

00018 {}

void MenuHelp::own_resumeState  )  [protected, virtual]
 

Help will be centred on screen.

Implements GameState.

Definition at line 52 of file MenuHelp.cpp.

00053 {
00054     int contentW = m_help->getW();
00055     int contentH = m_help->getH();
00056     OptionAgent *options = OptionAgent::agent();
00057     int screenW = options->getAsInt("screen_width");
00058     int screenH = options->getAsInt("screen_height");
00059 
00060     m_help->setShift(
00061             V2((screenW - contentW) / 2, (screenH - contentH) / 2));
00062 }

virtual void MenuHelp::own_updateState  )  [inline, protected, virtual]
 

Implements GameState.

Definition at line 17 of file MenuHelp.h.

00017 {}


The documentation for this class was generated from the following files:
Generated on Wed Jun 1 09:55:52 2005 for Fish Fillets - Next Generation by  doxygen 1.4.2