From 3167251eae205f23f0c721bc5b73ea3d59e77ea3 Mon Sep 17 00:00:00 2001 From: Sergio Valor Date: Fri, 28 Feb 2025 13:13:36 +0100 Subject: [PATCH] Eliminat el alpha de les notificacions --- source/notifier.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/notifier.cpp b/source/notifier.cpp index 4794f85..3500ce1 100644 --- a/source/notifier.cpp +++ b/source/notifier.cpp @@ -84,8 +84,9 @@ void Notifier::update() // Comprueba los estados if (notifications_[i].state == NotificationStatus::RISING) { - const float step = ((float)notifications_[i].counter / notifications_[i].travel_dist); - const int alpha = 255 * step; + //const float step = ((float)notifications_[i].counter / notifications_[i].travel_dist); + //const int alpha = 255 * step; + constexpr int ALPHA = 255; if (options.notifications.getVerticalPosition() == NotificationPosition::TOP) { @@ -95,7 +96,7 @@ void Notifier::update() { notifications_[i].rect.y--; } - notifications_[i].texture->setAlpha(alpha); + notifications_[i].texture->setAlpha(ALPHA); if (notifications_[i].rect.y == notifications_[i].y) { @@ -185,7 +186,6 @@ void Notifier::show(std::vector texts, NotificationText text_is, in const auto padding_in_v = text_->getCharacterSize() / 2; const int icon_space = icon >= 0 ? ICON_SIZE_ + padding_in_h : 0; text_is = icon_space > 0 ? NotificationText::LEFT : text_is; - // const int width = text_->lenght(longest) + (padding_in_h * 2) + icon_space; const int width = options.game.width - (PADDING_OUT_ * 2); const int height = (text_->getCharacterSize() * texts.size()) + (padding_in_v * 2); const auto shape = NotificationShape::SQUARED;