#include <CarSelectScene.h>
Inheritance diagram for UI::CarSelectScene:
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::Texture * | m_car_select_texture |
Texture for arrow that indicates selected car. | |
Track::Texture * | m_car_border_texture |
Texture for border for a car. | |
Track::Texture * | m_unused_background_texture |
Texture for the background of the unused devices section. | |
Track::Texture * | m_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 |
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.
UI::CarSelectScene::CarSelectScene | ( | ) |
Definition at line 57 of file CarSelectScene.cpp.
void UI::CarSelectScene::do_sound | ( | ) | [virtual] |
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.
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.
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.
milliseconds_elapsed | time in milliseconds since last update_logic. |
Implements Engine::Scene.
Definition at line 156 of file CarSelectScene.cpp.
bool UI::CarSelectScene::m_canceled [protected] |
Track::Texture* UI::CarSelectScene::m_car_border_texture [protected] |
Track::Texture* UI::CarSelectScene::m_car_preview_texture[2] [protected] |
Track::Texture* UI::CarSelectScene::m_car_select_texture [protected] |
std::map<Engine::InputHandler::iterator, btVector3> UI::CarSelectScene::m_device_colours [protected] |
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.
Texture for the background of the unused devices section.
Definition at line 52 of file CarSelectScene.h.
Generated at Mon Sep 6 00:41:19 2010 by Doxygen version 1.4.7 for Racer version svn335.