Add Alot
This commit is contained in:
@@ -6,27 +6,31 @@
|
||||
#include "Texture.h"
|
||||
#include "../TextureManager.h"
|
||||
|
||||
class GuiButton : public GuiElement
|
||||
{
|
||||
class GuiButton : public GuiElement {
|
||||
public:
|
||||
GuiButton() = default;
|
||||
GuiButton(const std::string& filePath, Vector2f pos, Vector2f size, TextureManager* manager);
|
||||
~GuiButton() override;
|
||||
GuiButton(const std::string& filePath, const Vector2f& pos, const Vector2f& size, bool shouldHideDefault, TextureManager* manager);
|
||||
~GuiButton() override = default;
|
||||
virtual void Draw() const override;
|
||||
virtual void Update(float elapsedSec) override;
|
||||
|
||||
void SetOnClick(std::function<void(void)> onClick) {
|
||||
m_OnClick = onClick;
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
Texture* m_Texture{ nullptr };
|
||||
Texture* m_Texture { nullptr };
|
||||
Vector2f m_Position;
|
||||
Vector2f m_Size;
|
||||
|
||||
bool m_IsHovered{ false };
|
||||
bool m_IsPressed{ false };
|
||||
bool m_IsPrimed{ false };
|
||||
bool m_IsHovered { false };
|
||||
bool m_IsPressed { false };
|
||||
bool m_IsPrimed { false };
|
||||
|
||||
std::function<void(void)> m_OnClick{ []() { std::cout << "Button not implemented" << std::endl; } };
|
||||
bool m_shouldHide { true };
|
||||
|
||||
std::function<void(void)> m_OnClick { []()
|
||||
{
|
||||
std::cout << "Button not implemented" << std::endl;
|
||||
} };
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user