Refactor in a good state
This commit is contained in:
parent
4b6e7da994
commit
164359f6aa
21 changed files with 606 additions and 105 deletions
|
|
@ -30,6 +30,12 @@ void ButtonWidget::setAction(const std::function<void()>& action) {
|
|||
mAction = action;
|
||||
}
|
||||
|
||||
void ButtonWidget::setColor(const RGBA& in) {
|
||||
mColor = in;
|
||||
mColorAnimated.setTargetColor(mColor);
|
||||
triggerWidgetUpdate();
|
||||
}
|
||||
|
||||
void ButtonWidget::process(const EventHandler& eventHandler) {
|
||||
if (getArea().isInside(eventHandler.getPointer())) {
|
||||
if (eventHandler.isPressed(InputID::MOUSE1)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue