Refactor in a good state

This commit is contained in:
IlyaShurupov 2024-10-09 14:31:23 +03:00 committed by Ilya Shurupov
parent 4b6e7da994
commit 164359f6aa
21 changed files with 606 additions and 105 deletions

View file

@ -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)) {