UI::CarSelectScene Class Reference

Scene for choosing controllers and cars. More...

#include <CarSelectScene.h>

Inheritance diagram for UI::CarSelectScene:

Engine::Scene List of all members.

Public Member Functions

 CarSelectScene ()
bool get_canceled () const
std::vector< std::pair< Engine::InputHandler::iterator,
unsigned int > > 
get_choice () const
virtual void take_input (Engine::InputReport &report)
 Take input from an input device.
virtual void update_logic (unsigned int milliseconds_elapsed)
 Process any status changes that occur due to elapsed time.
virtual void draw ()
 Draw the scene using OpenGL commands.
virtual void do_sound ()
 Update the audio.

Protected Member Functions

void draw_selections (std::size_t choice)
 Draw the selection arrows for a given car.
void remove_device (Engine::InputHandler::iterator device)
 Removes a device from all cars and the unused slot in m_selection.

Protected Attributes

bool m_canceled
 True if the scene was canceled.
Track::Texturem_car_select_texture
 Texture for arrow that indicates selected car.
Track::Texturem_car_border_texture
 Texture for border for a car.
Track::Texturem_unused_background_texture
 Texture for the background of the unused devices section.
Track::Texturem_car_preview_texture [2]
 The textures for the car previews.
std::vector< std::set< Engine::InputHandler::iterator > > m_selection
 Which InputDevices each car has.
std::map< Engine::InputHandler::iterator,
btVector3 > 
m_device_colours
 colours for each device

Detailed Description

Scene for choosing controllers and cars.

Each InputDevice avaliable is either assigned a car model or left unused. When at least one InputDevice is not unused, the game can be started with a RT_MENU_SELECT event from a used InputDevice. RT_MENU_BACK from any InputDevice goes back without starting a game.

Definition at line 33 of file CarSelectScene.h.


Constructor & Destructor Documentation

UI::CarSelectScene::CarSelectScene (  ) 

Definition at line 57 of file CarSelectScene.cpp.


Member Function Documentation

void UI::CarSelectScene::do_sound (  )  [virtual]

Update the audio.

Implements Engine::Scene.

Definition at line 306 of file CarSelectScene.cpp.

void UI::CarSelectScene::draw (  )  [virtual]

Draw the scene using OpenGL commands.

Must go from any state to ready for a buffer swap.

Implements Engine::Scene.

Definition at line 160 of file CarSelectScene.cpp.

void UI::CarSelectScene::draw_selections ( std::size_t  choice  )  [protected]

Draw the selection arrows for a given car.

Parameters:
choice 0 for unused cars, otherwise car number + 1.

Definition at line 262 of file CarSelectScene.cpp.

bool UI::CarSelectScene::get_canceled (  )  const

Definition at line 99 of file CarSelectScene.cpp.

std::vector< std::pair< Engine::InputHandler::iterator, unsigned int > > UI::CarSelectScene::get_choice (  )  const

Definition at line 105 of file CarSelectScene.cpp.

void UI::CarSelectScene::remove_device ( Engine::InputHandler::iterator  device  )  [protected]

Removes a device from all cars and the unused slot in m_selection.

Definition at line 296 of file CarSelectScene.cpp.

void UI::CarSelectScene::take_input ( Engine::InputReport report  )  [virtual]

Take input from an input device.

Parameters:
report An input report, which may be freed immediately after the call returns.

Implements Engine::Scene.

Definition at line 121 of file CarSelectScene.cpp.

void UI::CarSelectScene::update_logic ( unsigned int  milliseconds_elapsed  )  [virtual]

Process any status changes that occur due to elapsed time.

Parameters:
milliseconds_elapsed time in milliseconds since last update_logic.

Implements Engine::Scene.

Definition at line 156 of file CarSelectScene.cpp.


Member Data Documentation

bool UI::CarSelectScene::m_canceled [protected]

True if the scene was canceled.

Definition at line 46 of file CarSelectScene.h.

Track::Texture* UI::CarSelectScene::m_car_border_texture [protected]

Texture for border for a car.

Definition at line 50 of file CarSelectScene.h.

Track::Texture* UI::CarSelectScene::m_car_preview_texture[2] [protected]

The textures for the car previews.

Definition at line 54 of file CarSelectScene.h.

Track::Texture* UI::CarSelectScene::m_car_select_texture [protected]

Texture for arrow that indicates selected car.

Definition at line 48 of file CarSelectScene.h.

std::map<Engine::InputHandler::iterator, btVector3> UI::CarSelectScene::m_device_colours [protected]

colours for each device

Definition at line 62 of file CarSelectScene.h.

std::vector<std::set<Engine::InputHandler::iterator> > UI::CarSelectScene::m_selection [protected]

Which InputDevices each car has.

m_selection[0] is the unused option, m_selection[1] is the first car, m_selection[2] is the second car.

Definition at line 60 of file CarSelectScene.h.

Track::Texture* UI::CarSelectScene::m_unused_background_texture [protected]

Texture for the background of the unused devices section.

Definition at line 52 of file CarSelectScene.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.