31 lines
No EOL
600 B
C++
31 lines
No EOL
600 B
C++
#pragma once
|
|
|
|
#include "LabelWidget.hpp"
|
|
|
|
#include <functional>
|
|
|
|
namespace tp {
|
|
|
|
class ButtonWidget : public Widget {
|
|
public:
|
|
ButtonWidget();
|
|
ButtonWidget(const std::string& label, const tp::RectF& aArea);
|
|
bool isFired();
|
|
void eventProcess(const Events&) override;
|
|
void eventDraw(Canvas& canvas) override;
|
|
void setLabel(const std::string& string);
|
|
|
|
public:
|
|
void eventUpdateConfiguration(WidgetManager& wm) override;
|
|
|
|
public:
|
|
LabelWidget mLabel;
|
|
|
|
RGBA pressedColor;
|
|
RGBA hoveredColor;
|
|
RGBA accentColor;
|
|
halnf rounding = 0;
|
|
|
|
std::function<void()> mCallback = [](){};
|
|
};
|
|
} |