Fix sizing issues and others

This commit is contained in:
IlyaShurupov 2024-10-11 01:48:21 +03:00
parent b2c393d23a
commit e9a4801d9e
12 changed files with 325 additions and 142 deletions

View file

@ -33,7 +33,7 @@ void ButtonWidget::setAction(const std::function<void()>& action) {
void ButtonWidget::setColor(const RGBA& in) {
mColor = in;
mColorAnimated.setTargetColor(mColor);
triggerWidgetUpdate();
triggerWidgetUpdate("color changed");
}
void ButtonWidget::process(const EventHandler& eventHandler) {
@ -68,12 +68,14 @@ void ButtonWidget::mouseEnter() {
mColorAnimated.endAnimation();
mColorAnimated.setTargetColor(mColorHovered);
mColorAnimated.updateCurrentRect();
triggerWidgetUpdate();
// mColorAnimated.updateCurrentRect();
triggerWidgetUpdate("button hovered");
}
void ButtonWidget::mouseLeave() {
mColorAnimated.setTargetColor(mColor);
mColorAnimated.updateCurrentRect();
triggerWidgetUpdate();
//mColorAnimated.updateCurrentRect();
triggerWidgetUpdate("button out of focus");
}