FYP  1.0.0
Final Year Project -- Alexander Meuer
LevelSelect Class Reference
Inheritance diagram for LevelSelect:
Inheritance graph
Collaboration diagram for LevelSelect:
Collaboration graph

Public Member Functions

 LevelSelect (tinyxml2::XMLElement *xml)
 
bool handleEvent (sf::Event &evnt) override
 
void update (sf::Time const &elapsedTime) override
 
void draw (sf::RenderWindow &w) override
 
void cleanup () override
 

Private Member Functions

void disableLockedLevels ()
 Disables buttons whos corresponding level has not been unlocked by the current player's profile.
 

Private Attributes

sf::Sprite mBackground
 Graphical map upon which the level buttons will be displayed.
 
sf::Music mMusic
 Background music for this scene.
 
std::list< std::pair< std::unique_ptr< gui::Button >, std::string > > mLevelButtons
 List of buttons and their associated level's xml files.
 
std::unique_ptr< gui::ButtonmBackButton
 

Member Function Documentation

void LevelSelect::draw ( sf::RenderWindow &  w)
overridevirtual

Should draw the scene to the renderwindow

Parameters
wThe RenderWindow that the scene should be drawn to.

Implements I_Scene.

bool LevelSelect::handleEvent ( sf::Event &  Event)
overridevirtual
Parameters
EventThe event to be handled.
Returns
True if the event has been processed, false if the event is not processed or required.

Implements I_Scene.

void LevelSelect::update ( sf::Time const &  elapsedTime)
overridevirtual
Parameters
elapsedTimeThe amount of time that has past since the last time update was called.

Implements I_Scene.


The documentation for this class was generated from the following file: