FYP  1.0.0
Final Year Project -- Alexander Meuer
MainMenu Class Reference

First menu shown to the user. More...

#include <MainMenu.hpp>

Inheritance diagram for MainMenu:
Inheritance graph
Collaboration diagram for MainMenu:
Collaboration graph

Public Member Functions

 MainMenu (tinyxml2::XMLElement *root)
 Constructs a menu from xml. More...
 
bool handleEvent (sf::Event &Event) override
 Checks to see if buttons are being hovered over or clicked.
 
void update (sf::Time const &elapsedTime) override
 Does nothing in this scene.
 
void draw (sf::RenderWindow &w) override
 Draws background and buttons.
 
void cleanup () override
 Stops the background music.
 

Private Attributes

gui::DialogueBox mQuitConfirmDialogue
 
sf::Sprite mBackground
 Background sprite.
 
sf::Music mMusic
 Background music that will play in this scene.
 
std::unique_ptr< gui::ButtonmStartButton
 
std::unique_ptr< gui::ButtonmCreditsButton
 
std::unique_ptr< gui::ButtonmOptionsButton
 
std::unique_ptr< gui::ButtonmQuitButton
 

Detailed Description

First menu shown to the user.

Constructor & Destructor Documentation

MainMenu::MainMenu ( tinyxml2::XMLElement *  root)

Constructs a menu from xml.

Parameters
rootXml element, <Menu>, that contains button definitions and all other menu data.

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