CarSelectScene.h

Go to the documentation of this file.
00001 
00005 /* Copyright © 2010 James Legg.
00006     This program is free software: you can redistribute it and/or modify
00007     it under the terms of the GNU General Public License as published by
00008     the Free Software Foundation, either version 3 of the License, or
00009     (at your option) any later version.
00010 */
00011 
00012 #ifndef UI_CAR_SELECT_SCENE_H
00013 #define UI_CAR_SELECT_SCENE_H
00014 
00015 #include "../Engine/Scene.h"
00016 #include "../Engine/InputHandler.h"
00017 #include <libtrack/Texture.h>
00018 #include <vector>
00019 #include <utility>
00020 #include <map>
00021 
00022 #include <LinearMath/btVector3.h>
00023 
00024 namespace UI
00025 {
00026 
00033 class CarSelectScene
00034     :   public Engine::Scene
00035 {
00036     public:
00037         CarSelectScene();
00038         bool get_canceled() const;
00039         std::vector<std::pair<Engine::InputHandler::iterator, unsigned int> > get_choice() const;
00040         virtual void take_input(Engine::InputReport &report);
00041         virtual void update_logic(unsigned int milliseconds_elapsed);
00042         virtual void draw();
00043         virtual void do_sound();
00044     protected:
00046         bool m_canceled;
00048         Track::Texture * m_car_select_texture;
00050         Track::Texture * m_car_border_texture;
00052         Track::Texture * m_unused_background_texture;
00054         Track::Texture * m_car_preview_texture[2];
00055         
00060         std::vector<std::set<Engine::InputHandler::iterator> > m_selection;
00062         std::map<Engine::InputHandler::iterator, btVector3> m_device_colours;
00063         
00067         void draw_selections(std::size_t choice);
00070         void remove_device(Engine::InputHandler::iterator device);
00071 };
00072 
00073 } // namespace UI
00074 
00075 #endif // UI_CAR_SELECT_SCENE_H

Get Racer at SourceForge.net. Fast, secure and Free Open Source software downloads

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