ServiceMenu: animació per al missatge de reiniciar

This commit is contained in:
2025-06-15 18:19:09 +02:00
parent dc9a675667
commit ee634cf350
2 changed files with 89 additions and 3 deletions

View File

@@ -217,6 +217,17 @@ private:
int resize_anim_steps_ = 8; // Total de pasos de la animación
bool resizing_ = false; // Si está animando el resize
// --- Variables para el mensaje de reinicio ---
float restart_msg_y_ = 0.0f;
float restart_msg_target_y_ = 0.0f;
float restart_msg_start_y_ = 0.0f;
int restart_msg_anim_step_ = 0;
static constexpr int restart_msg_anim_steps_ = 6; // 8 pasos
bool restart_msg_animating_ = false;
bool restart_msg_visible_ = false;
float restart_msg_base_offset_ = 0.0f;
int group_menu_widths_[5];
// --- Métodos internos: Anclaje y aspecto ---
@@ -250,6 +261,9 @@ private:
void precalculateMenuWidths();
int getMenuWidthForGroup(SettingsGroup group) const;
void showRestartMessage(float y);
void hideRestartMessage(float y);
// --- Patrón Singleton ---
ServiceMenu(); // Constructor privado
~ServiceMenu() = default; // Destructor privado
@@ -261,4 +275,6 @@ private:
// --- Método para reproducir el sonido del menú ---
void playMenuSound(); // Reproduce el sonido del menú
bool last_pending_changes_ = false; // Último estado conocido de pending_changes
};