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

#include <Slider.h>

Inheritance diagram for UI::Slider:
UI::CanvasItem

Public Member Functions

 Slider ()
 
virtual ~Slider ()
 
void Commands (nk_context *ctx) override
 
void SetMinValue (float minValue)
 
void SetMaxValue (float maxValue)
 
void SetStep (float step)
 
float GetCurValue ()
 
void SetBarNormalColor (glm::vec4 color)
 
void SetBarHoverColor (glm::vec4 color)
 
void SetBarActiveColor (glm::vec4 color)
 
void SetBarFillColor (glm::vec4 color)
 
void SetCursorNormalColor (glm::vec4 color)
 
void SetCursorHoverColor (glm::vec4 color)
 
void SetCursorActiveColor (glm::vec4 color)
 
void SetCursorSize (glm::vec2 size)
 
void SetBarHeight (float height)
 
- 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

float m_minValue
 
float m_maxValue
 
float m_curValue
 
float m_step
 
nk_color m_sliderBarNormal
 
nk_color m_sliderBarHover
 
nk_color m_sliderBarActive
 
nk_color m_sliderBarFill
 
nk_color m_sliderCursorNormal
 
nk_color m_sliderCursorHover
 
nk_color m_sliderCursorActive
 
struct nk_vec2 m_cursorSize
 
float m_barHeight
 
- 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
 

Detailed Description

A basic Slider

Constructor & Destructor Documentation

◆ Slider()

UI::Slider::Slider ( )

Constructor for a slider

◆ ~Slider()

UI::Slider::~Slider ( )
virtual

Slider destructor

Member Function Documentation

◆ Commands()

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

The draw commands for the slider

Parameters
ctx- The nuklear context to draw to

Implements UI::CanvasItem.

◆ GetCurValue()

float UI::Slider::GetCurValue ( )
inline

◆ SetBarActiveColor()

void UI::Slider::SetBarActiveColor ( glm::vec4  color)
inline

◆ SetBarFillColor()

void UI::Slider::SetBarFillColor ( glm::vec4  color)
inline

◆ SetBarHeight()

void UI::Slider::SetBarHeight ( float  height)
inline

◆ SetBarHoverColor()

void UI::Slider::SetBarHoverColor ( glm::vec4  color)
inline

◆ SetBarNormalColor()

void UI::Slider::SetBarNormalColor ( glm::vec4  color)
inline

◆ SetCursorActiveColor()

void UI::Slider::SetCursorActiveColor ( glm::vec4  color)
inline

◆ SetCursorHoverColor()

void UI::Slider::SetCursorHoverColor ( glm::vec4  color)
inline

◆ SetCursorNormalColor()

void UI::Slider::SetCursorNormalColor ( glm::vec4  color)
inline

◆ SetCursorSize()

void UI::Slider::SetCursorSize ( glm::vec2  size)
inline

◆ SetMaxValue()

void UI::Slider::SetMaxValue ( float  maxValue)
inline

◆ SetMinValue()

void UI::Slider::SetMinValue ( float  minValue)
inline

◆ SetStep()

void UI::Slider::SetStep ( float  step)
inline

Member Data Documentation

◆ m_barHeight

float UI::Slider::m_barHeight
protected

◆ m_cursorSize

struct nk_vec2 UI::Slider::m_cursorSize
protected

◆ m_curValue

float UI::Slider::m_curValue
protected

◆ m_maxValue

float UI::Slider::m_maxValue
protected

◆ m_minValue

float UI::Slider::m_minValue
protected

◆ m_sliderBarActive

nk_color UI::Slider::m_sliderBarActive
protected

◆ m_sliderBarFill

nk_color UI::Slider::m_sliderBarFill
protected

◆ m_sliderBarHover

nk_color UI::Slider::m_sliderBarHover
protected

◆ m_sliderBarNormal

nk_color UI::Slider::m_sliderBarNormal
protected

◆ m_sliderCursorActive

nk_color UI::Slider::m_sliderCursorActive
protected

◆ m_sliderCursorHover

nk_color UI::Slider::m_sliderCursorHover
protected

◆ m_sliderCursorNormal

nk_color UI::Slider::m_sliderCursorNormal
protected

◆ m_step

float UI::Slider::m_step
protected

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