Falcon
Public Member Functions | Protected Attributes | List of all members
UI::Button Class Reference

#include <Button.h>

Inheritance diagram for UI::Button:
UI::CanvasItem

Public Member Functions

 Button ()
 
virtual ~Button ()
 
void Commands (nk_context *ctx) override
 
void SetText (std::string txt)
 
void SetCallback (boost::function< void(void)> callback)
 
void SetNormalTextColor (glm::vec4 color)
 
void SetHoverTextColor (glm::vec4 color)
 
void SetActiveTextColor (glm::vec4 color)
 
void SetNormalButtonColor (glm::vec4 color)
 
void SetHoverButtonColor (glm::vec4 color)
 
void SetActiveButtonColor (glm::vec4 color)
 
void SetBorderColor (glm::vec4 color)
 
- Public Member Functions inherited from UI::CanvasItem
 CanvasItem ()
 
virtual ~CanvasItem ()
 
void AddChild (CanvasItem *child)
 
void SetBounds (glm::vec4 bounds)
 
void UpdateBounds ()
 
virtual void Draw (nk_context *ctx)
 
void SetColor (glm::vec4 color)
 
void SetFlags (int32_t flags)
 
void SetActive (bool active)
 
void SetStatus (ItemStatus status)
 

Protected Attributes

bool m_wrap
 
std::string m_text
 
nk_color m_buttonNormal
 
nk_color m_buttonHover
 
nk_color m_buttonActive
 
nk_color m_textNormal
 
nk_color m_textHover
 
nk_color m_textActive
 
nk_color m_borderColor
 
Fontm_font
 
boost::function< void(void)> m_callback
 
- Protected Attributes inherited from UI::CanvasItem
struct nk_rect m_bounds
 
nk_color m_color
 
i32 m_flags
 
boost::container::vector< CanvasItem * > m_children
 
CanvasItemparent = nullptr
 
bool m_active = true
 
ItemStatus m_status
 
std::string m_title
 

Constructor & Destructor Documentation

◆ Button()

UI::Button::Button ( )

Constructor for a label

◆ ~Button()

UI::Button::~Button ( )
virtual

Button destructor

Member Function Documentation

◆ Commands()

void UI::Button::Commands ( nk_context *  ctx)
overridevirtual

The draw commands for the label

Parameters
ctx- The nuklear context to draw to

Implements UI::CanvasItem.

◆ SetActiveButtonColor()

void UI::Button::SetActiveButtonColor ( glm::vec4  color)
inline

◆ SetActiveTextColor()

void UI::Button::SetActiveTextColor ( glm::vec4  color)
inline

◆ SetBorderColor()

void UI::Button::SetBorderColor ( glm::vec4  color)
inline

◆ SetCallback()

void UI::Button::SetCallback ( boost::function< void(void)>  callback)
inline

◆ SetHoverButtonColor()

void UI::Button::SetHoverButtonColor ( glm::vec4  color)
inline

◆ SetHoverTextColor()

void UI::Button::SetHoverTextColor ( glm::vec4  color)
inline

◆ SetNormalButtonColor()

void UI::Button::SetNormalButtonColor ( glm::vec4  color)
inline

◆ SetNormalTextColor()

void UI::Button::SetNormalTextColor ( glm::vec4  color)
inline

◆ SetText()

void UI::Button::SetText ( std::string  txt)
inline

Member Data Documentation

◆ m_borderColor

nk_color UI::Button::m_borderColor
protected

◆ m_buttonActive

nk_color UI::Button::m_buttonActive
protected

◆ m_buttonHover

nk_color UI::Button::m_buttonHover
protected

◆ m_buttonNormal

nk_color UI::Button::m_buttonNormal
protected

◆ m_callback

boost::function<void(void)> UI::Button::m_callback
protected

◆ m_font

Font* UI::Button::m_font
protected

◆ m_text

std::string UI::Button::m_text
protected

◆ m_textActive

nk_color UI::Button::m_textActive
protected

◆ m_textHover

nk_color UI::Button::m_textHover
protected

◆ m_textNormal

nk_color UI::Button::m_textNormal
protected

◆ m_wrap

bool UI::Button::m_wrap
protected

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