linter
This commit is contained in:
@@ -69,7 +69,7 @@ void Notifier::processNotification(int index, float delta_time) {
|
||||
|
||||
void Notifier::playNotificationSoundIfNeeded(const Notification& notification) {
|
||||
// Hace sonar la notificación al inicio
|
||||
if (notification.timer <= 0.016f &&
|
||||
if (notification.timer <= 0.016F &&
|
||||
param.notification.sound &&
|
||||
notification.state == State::RISING) {
|
||||
Audio::get()->playSound("notify.wav", Audio::Group::INTERFACE);
|
||||
@@ -99,7 +99,7 @@ void Notifier::handleRisingState(int index, float delta_time) {
|
||||
|
||||
const float PIXELS_TO_MOVE = ANIMATION_SPEED_PX_PER_S * delta_time;
|
||||
const float PROGRESS = notification.timer * ANIMATION_SPEED_PX_PER_S / notification.travel_dist;
|
||||
const int ALPHA = static_cast<int>(255 * std::min(PROGRESS, 1.0f));
|
||||
const int ALPHA = static_cast<int>(255 * std::min(PROGRESS, 1.0F));
|
||||
|
||||
moveNotificationVertically(notification, param.notification.pos_v == Position::TOP ? PIXELS_TO_MOVE : -PIXELS_TO_MOVE);
|
||||
notification.texture->setAlpha(ALPHA);
|
||||
@@ -115,7 +115,7 @@ void Notifier::handleStayState(int index) {
|
||||
|
||||
if (notification.timer >= STAY_DURATION_S) {
|
||||
notification.state = State::VANISHING;
|
||||
notification.timer = 0.0f;
|
||||
notification.timer = 0.0F;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -124,12 +124,12 @@ void Notifier::handleVanishingState(int index, float delta_time) {
|
||||
|
||||
const float PIXELS_TO_MOVE = ANIMATION_SPEED_PX_PER_S * delta_time;
|
||||
const float PROGRESS = notification.timer * ANIMATION_SPEED_PX_PER_S / notification.travel_dist;
|
||||
const int ALPHA = static_cast<int>(255 * (1 - std::min(PROGRESS, 1.0f)));
|
||||
const int ALPHA = static_cast<int>(255 * (1 - std::min(PROGRESS, 1.0F)));
|
||||
|
||||
moveNotificationVertically(notification, param.notification.pos_v == Position::TOP ? -PIXELS_TO_MOVE : PIXELS_TO_MOVE);
|
||||
notification.texture->setAlpha(ALPHA);
|
||||
|
||||
if (PROGRESS >= 1.0f) {
|
||||
if (PROGRESS >= 1.0F) {
|
||||
notification.state = State::FINISHED;
|
||||
}
|
||||
}
|
||||
@@ -143,7 +143,7 @@ void Notifier::transitionToStayState(int index) {
|
||||
notification.state = State::STAY;
|
||||
notification.texture->setAlpha(255);
|
||||
notification.rect.y = static_cast<float>(notification.y); // Asegurar posición exacta
|
||||
notification.timer = 0.0f;
|
||||
notification.timer = 0.0F;
|
||||
}
|
||||
|
||||
// Elimina las notificaciones finalizadas
|
||||
|
||||
Reference in New Issue
Block a user