#pragma once

#include "button.h"
#include "core/functional.h"

class PushButton : public Button
{
public:
    explicit PushButton(const std::string& text, const std::shared_ptr<kku::CoreFactory>& factory, unsigned int font_size = 12);
    virtual void input(const kku::SystemEvent& event) override final;

    void setCallback(kku::lambda callback);
    void setColors(kku::Color&& idle_color, kku::Color&& pressed_color);

private:
    kku::Color _color_idle;
    kku::Color _color_pressed;

    bool _pressed;
    kku::lambda _on_click_callback;
};

