You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
552 B
C++

#pragma once
#include "button.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(std::function<void(void)> callback);
void setColors(kku::Color&& idle_color, kku::Color&& pressed_color);
private:
kku::Color _color_idle;
kku::Color _color_pressed;
bool _pressed;
std::function<void(void)> _on_click_callback;
};