UI::GameStartMenuItem Class Reference

A Menu item that starts a game when activated. More...

#include <GameStartMenuItem.h>

Inheritance diagram for UI::GameStartMenuItem:

UI::MenuItem UI::ReplayStartMenuItem List of all members.

Public Member Functions

 GameStartMenuItem (std::wstring label, std::string filename)
 Create with specified label to start specified track.
virtual ~GameStartMenuItem ()
virtual void activate ()
 Start the game.
void set_main_loop (MainLoop &main_loop)
 Set the main loop to use to start the game going.

Protected Attributes

std::string filename
MainLoopmain_loop

Detailed Description

A Menu item that starts a game when activated.

Definition at line 26 of file GameStartMenuItem.h.


Constructor & Destructor Documentation

UI::GameStartMenuItem::GameStartMenuItem ( std::wstring  label,
std::string  filename 
)

Create with specified label to start specified track.

Parameters:
label The caption displayed on the menu item.
filename The filename of the track to load.

Definition at line 26 of file GameStartMenuItem.cpp.

UI::GameStartMenuItem::~GameStartMenuItem (  )  [virtual]

Definition at line 34 of file GameStartMenuItem.cpp.


Member Function Documentation

void UI::GameStartMenuItem::activate (  )  [virtual]

Start the game.

This is called when this menu item is selected from the menu. set_main_loop() must have been called before activate().

Reimplemented from UI::MenuItem.

Reimplemented in UI::ReplayStartMenuItem.

Definition at line 38 of file GameStartMenuItem.cpp.

void UI::GameStartMenuItem::set_main_loop ( MainLoop main_loop  ) 

Set the main loop to use to start the game going.

Parameters:
main_loop The MainLoop to switch the scene of when activated.

Definition at line 59 of file GameStartMenuItem.cpp.


Member Data Documentation

std::string UI::GameStartMenuItem::filename [protected]

Definition at line 48 of file GameStartMenuItem.h.

MainLoop* UI::GameStartMenuItem::main_loop [protected]

Definition at line 49 of file GameStartMenuItem.h.


The documentation for this class was generated from the following files:
Get Racer at SourceForge.net. Fast, secure and Free Open Source software downloads

Generated at Mon Sep 6 00:41:19 2010 by Doxygen version 1.4.7 for Racer version svn335.