kick
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes
kick::Button Class Reference
Inheritance diagram for kick::Button:
kick::Sprite kick::SpriteMouseListener kick::Component2D kick::Component kick::ToggleButton

List of all members.

Public Member Functions

 Button (GameObject *gameObject, std::shared_ptr< Canvas > canvas)
std::string normalSprite () const
void setNormalSprite (std::string const &normal)
std::string hoverSprite () const
void setHoverSprite (std::string const &hover)
std::string pressedSprite () const
void setPressedSprite (std::string const &pressed)
std::string text () const
void setText (std::string const &text)
void setOnClick (std::function< void(Button *)> const &onClick)
virtual void deactivated () override
virtual void setOrder (int order) override
glm::vec4 const & normalColor () const
void setNormalColor (glm::vec4 const &normalColor)
glm::vec4 const & hoverColor () const
void setHoverColor (glm::vec4 const &hoverColor)
glm::vec4 const & pressedColor () const
void setPressedColor (glm::vec4 const &pressedColor)

Public Attributes

std::function< void(Button *)>
const 
getOnClick )() const

Protected Member Functions

virtual std::string currentSpriteName ()
virtual void updateTextureAndTxtColor ()
virtual void down (int button) override
virtual void pressed (int button) override
virtual void up (int button) override
virtual void over () override
virtual void out () override
virtual void invokeClick ()

Protected Attributes

std::string mNormalName
std::string mHoverName
std::string mPressedName
ButtonState mState = ButtonState::normal
glm::vec4 mNormalColor = glm::vec4{1,1,1,1}
glm::vec4 mHoverColor = glm::vec4{1,1,1,1}
glm::vec4 mPressedColor = glm::vec4{0,0,0,1}
std::string mText
std::function< void(Button *) onClick )
std::shared_ptr< LabelmTextComponent
std::set< int > mPressedButtons

Detailed Description

Definition at line 23 of file button.h.


The documentation for this class was generated from the following files:
 All Classes Functions Variables