ServiceMenu: el aspecte es defineix en param.h

This commit is contained in:
2025-06-26 13:50:17 +02:00
parent 231bd05f5e
commit 5e3c7eb721
10 changed files with 117 additions and 95 deletions

View File

@@ -7,6 +7,7 @@
#include "ui/service_menu.h" // Necesario para las enums y para acceder al estado del menú
#include "utils.h" // Para Color
// Forward declarations
class Text;
class MenuOption;
@@ -33,14 +34,8 @@ private:
std::shared_ptr<Text> title_text_;
// --- Variables de estado de la vista (layout y animación) ---
ServiceMenu::Aspect aspect_ = ServiceMenu::Aspect::ALPHA;
SDL_FRect rect_{};
SDL_FRect border_rect_{};
Color bg_color_ = SERV_MENU_BG_COLOR_ALPHA;
Uint8 bg_alpha_ = 240;
Color title_color_ = SERV_MENU_TITLE_COLOR;
Color text_color_ = SERV_MENU_TEXT_COLOR;
Color selected_color_ = SERV_MENU_SELECTED_COLOR;
size_t width_ = 0;
size_t height_ = 0;
size_t options_height_ = 0;
@@ -64,7 +59,6 @@ private:
int group_menu_widths_[5]{};
// --- Métodos privados de la vista ---
void init(const ServiceMenu *menu_state);
void setAnchors(const ServiceMenu *menu_state);
SDL_FRect calculateNewRect(const ServiceMenu *menu_state);
void resize(const ServiceMenu *menu_state);