UIMessage: creada

This commit is contained in:
2025-06-15 19:20:01 +02:00
parent ee634cf350
commit ab948d3f17
4 changed files with 140 additions and 72 deletions

View File

@@ -8,6 +8,7 @@
#include "utils.h"
#include "lang.h"
#include "options.h"
#include "UIMessage.h"
class Text;
@@ -217,16 +218,8 @@ 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;
std::unique_ptr<UIMessage> restart_message_ui_;
bool last_pending_changes_ = false;
int group_menu_widths_[5];
@@ -261,9 +254,6 @@ 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
@@ -275,6 +265,4 @@ 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
};