FYP  1.0.0
Final Year Project -- Alexander Meuer
gui::AbilityButton Class Reference

Button with an Ability and cooldown visualization. More...

#include <AbilityButton.hpp>

Inheritance diagram for gui::AbilityButton:
Inheritance graph
Collaboration diagram for gui::AbilityButton:
Collaboration graph

Public Member Functions

 AbilityButton (int x, int y, const tinyxml2::XMLElement *xmlButtonDefinition, std::shared_ptr< Ability const > const &ability)
 
void updateCooldownVisuals (sf::Time const &elapsedTime)
 
- Public Member Functions inherited from gui::Button
 Button (int x, int y, const tinyxml2::XMLElement *xmlButtonDefinition)
 
virtual void update (sf::Vector2i const &mousePos)
 
bool checkClick () const
 
void enable ()
 
void disable ()
 
bool containsMouse () const
 
std::string const & getName () const
 
void setPosition (sf::Vector2f const &position)
 
sf::Vector2f const & getPosition () const
 
sf::Vector2f const & getSize () const
 
sf::Vector2f const & getScale () const
 

Protected Member Functions

void draw (sf::RenderTarget &target, sf::RenderStates states) const override
 
- Protected Member Functions inherited from gui::Button
void draw (sf::RenderTarget &target, sf::RenderStates states) const override
 
void setState (State newState)
 

Private Attributes

sf::RectangleShape mCooldownVisual
 
thor::Animator< sf::RectangleShape, std::string > mCooldownAnimator
 
std::weak_ptr< Ability const > mAbility
 
sf::Text mHotkeyText
 

Additional Inherited Members

- Protected Types inherited from gui::Button
enum  State { NORMAL, HOVER, DISABLED }
 
- Protected Attributes inherited from gui::Button
enum gui::Button::State mState
 

Detailed Description

Button with an Ability and cooldown visualization.


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