#pragma once #include #include #include "Texture.h" #include "../TextureManager.h" class Button { public: Button() = default; Button(const std::string& filePath, Point2f pos, Point2f size, TextureManager* manager); ~Button(); void Draw() const; void Update(float elapsedSec); void SetOnClick(std::function onClick) { m_OnClick = onClick; } private: Texture* m_Texture{ nullptr }; Point2f m_Position; Point2f m_Size; bool m_IsHovered{ false }; bool m_IsPressed{ false }; bool m_IsPrimed{ false }; std::function m_OnClick{ []() { std::cout << "Button not implemented" << std::endl; } }; };