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

Public Types

enum  Result { YES, NO, CANCEL }
 

Public Member Functions

 DialogueBox (sf::Vector2f const &centre, sf::Vector2f const &size, std::string const &title, std::string const &message, std::string const &yesText="Yes", std::string const &noText="No", unsigned int titleCharSize=40u, unsigned int msgCharSize=20u)
 
void open ()
 
bool isOpen () const
 
bool resultProcessed () const
 
bool handleEvent (sf::Event const &theEvent)
 
Result getResult ()
 

Private Member Functions

void draw (sf::RenderTarget &target, sf::RenderStates states) const override
 
void updateButtons (sf::Vector2i const &mousePosition)
 
void updateResult ()
 

Private Attributes

Result mResult
 
sf::Text mTitle
 
sf::Text mMessage
 
std::map< Result, std::unique_ptr< Button > > mButtonMap
 
bool mIsOpen
 
sf::RectangleShape mBoxGraphic
 
bool mResultProcessed
 

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