#pragma once #include #include #include #include #include namespace Game::Object { class UIButton : public Entity { public: UIButton(const std::string& name, std::shared_ptr texture, const Transform& transform, void* clickFunction = nullptr, float x = 0.f, float y = 0.f); ~UIButton() override = default; void start() override; void update(float deltaTime) override; void setText(const std::string& text); std::string getText() const; void setPosition(float x, float y) { mX = x; mY = y; } std::pair getPosition() const { return {mX, mY}; } private: void* mClickFunction = nullptr; float mX, mY; std::string mText; }; }