TazGraph Project v0.1.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
ButtonComponent Class Reference
Inheritance diagram for ButtonComponent:
Inheritance graph
[legend]
Collaboration diagram for ButtonComponent:
Collaboration graph
[legend]

Public Types

enum class  ButtonState { NORMAL , HOVERED , PRESSED }
 

Public Member Functions

 ButtonComponent (std::function< void()> onClick)
 
 ButtonComponent (std::function< void()> onClick, std::string button_label, glm::vec2 b_dimensions, Color b_background)
 
void init () override
 
void setOnClick (std::function< void()> newOnClick)
 
void setState (ButtonState state)
 
void update (float deltaTime) override
 
std::string GetComponentName () override
 
- Public Member Functions inherited from BaseComponent
virtual void draw (size_t e_index, PlaneModelRenderer &batch, TazGraphEngine::Window &window)
 
virtual void draw (size_t e_index, LineRenderer &batch, TazGraphEngine::Window &window)
 
virtual void draw (size_t e_index, PlaneColorRenderer &batch, TazGraphEngine::Window &window)
 
virtual void draw (size_t e_index, LightRenderer &batch, TazGraphEngine::Window &window)
 
virtual void showGUI ()
 

Additional Inherited Members

- Public Attributes inherited from Component
Entityentity = nullptr
 
- Public Attributes inherited from BaseComponent
ComponentID id = 0u
 

Member Function Documentation

◆ GetComponentName()

std::string ButtonComponent::GetComponentName ( )
inlineoverridevirtual

Reimplemented from BaseComponent.

◆ init()

void ButtonComponent::init ( )
inlineoverridevirtual

Reimplemented from BaseComponent.

◆ update()

void ButtonComponent::update ( float  deltaTime)
inlineoverridevirtual

Reimplemented from BaseComponent.


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