- canvi en el ordre dels overlays
- les notificacions ja segueixen al resto de elements (no tenen una posició fixa)
This commit is contained in:
@@ -277,9 +277,32 @@ void Notifier::clearNotifications() {
|
||||
clearFinishedNotifications();
|
||||
}
|
||||
|
||||
// Ajusta el offset vertical base
|
||||
void Notifier::addYOffset(int px) { y_offset_ += px; }
|
||||
void Notifier::removeYOffset(int px) { y_offset_ -= px; }
|
||||
// Ajusta el offset vertical base y desplaza las notificaciones existentes
|
||||
void Notifier::addYOffset(int px) {
|
||||
y_offset_ += px;
|
||||
for (auto& n : notifications_) {
|
||||
n.y += px;
|
||||
n.rect.y += static_cast<float>(px);
|
||||
}
|
||||
}
|
||||
void Notifier::removeYOffset(int px) {
|
||||
y_offset_ -= px;
|
||||
for (auto& n : notifications_) {
|
||||
n.y -= px;
|
||||
n.rect.y -= static_cast<float>(px);
|
||||
}
|
||||
}
|
||||
|
||||
// Altura visible ocupada por las notificaciones activas (relativa al offset base)
|
||||
auto Notifier::getVisibleHeight() const -> int {
|
||||
int bottom = 0;
|
||||
for (const auto& n : notifications_) {
|
||||
if (n.state == Status::FINISHED) { continue; }
|
||||
int n_bottom = static_cast<int>(n.rect.y + n.rect.h) - y_offset_;
|
||||
if (n_bottom > bottom) { bottom = n_bottom; }
|
||||
}
|
||||
return bottom;
|
||||
}
|
||||
|
||||
// Obtiene los códigos de las notificaciones
|
||||
auto Notifier::getCodes() -> std::vector<std::string> {
|
||||
|
||||
Reference in New Issue
Block a user