Replace Old Widgets
This commit is contained in:
parent
cce8f0e1bc
commit
fcd5eb2d2a
81 changed files with 388 additions and 278 deletions
35
.back/WidBack/public/ButtonWidget.hpp
Normal file
35
.back/WidBack/public/ButtonWidget.hpp
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
#pragma once
|
||||
|
||||
#include "LabelWidget.hpp"
|
||||
|
||||
#include <functional>
|
||||
|
||||
namespace tp {
|
||||
|
||||
class ButtonWidget : public Widget {
|
||||
public:
|
||||
// enum State { NONE, ANTICIPATION, ACTIVATED, CONFIRMED };
|
||||
|
||||
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;
|
||||
// State mStat = NONE;
|
||||
|
||||
RGBA pressedColor;
|
||||
RGBA hoveredColor;
|
||||
RGBA accentColor;
|
||||
halnf rounding = 0;
|
||||
|
||||
std::function<void()> mCallback = [](){};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue