Eliminat el alpha de les notificacions

This commit is contained in:
2025-02-28 13:13:36 +01:00
parent 4efbb61fbc
commit 3167251eae

View File

@@ -84,8 +84,9 @@ void Notifier::update()
// Comprueba los estados // Comprueba los estados
if (notifications_[i].state == NotificationStatus::RISING) if (notifications_[i].state == NotificationStatus::RISING)
{ {
const float step = ((float)notifications_[i].counter / notifications_[i].travel_dist); //const float step = ((float)notifications_[i].counter / notifications_[i].travel_dist);
const int alpha = 255 * step; //const int alpha = 255 * step;
constexpr int ALPHA = 255;
if (options.notifications.getVerticalPosition() == NotificationPosition::TOP) if (options.notifications.getVerticalPosition() == NotificationPosition::TOP)
{ {
@@ -95,7 +96,7 @@ void Notifier::update()
{ {
notifications_[i].rect.y--; notifications_[i].rect.y--;
} }
notifications_[i].texture->setAlpha(alpha); notifications_[i].texture->setAlpha(ALPHA);
if (notifications_[i].rect.y == notifications_[i].y) if (notifications_[i].rect.y == notifications_[i].y)
{ {
@@ -185,7 +186,6 @@ void Notifier::show(std::vector<std::string> texts, NotificationText text_is, in
const auto padding_in_v = text_->getCharacterSize() / 2; const auto padding_in_v = text_->getCharacterSize() / 2;
const int icon_space = icon >= 0 ? ICON_SIZE_ + padding_in_h : 0; const int icon_space = icon >= 0 ? ICON_SIZE_ + padding_in_h : 0;
text_is = icon_space > 0 ? NotificationText::LEFT : text_is; 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 width = options.game.width - (PADDING_OUT_ * 2);
const int height = (text_->getCharacterSize() * texts.size()) + (padding_in_v * 2); const int height = (text_->getCharacterSize() * texts.size()) + (padding_in_v * 2);
const auto shape = NotificationShape::SQUARED; const auto shape = NotificationShape::SQUARED;