ServiceMenu: text justificat o centrat segons el submenu
ServiceMenu: alt de la finestra en funció del submenu amb mes items
This commit is contained in:
@@ -35,7 +35,8 @@ public:
|
||||
private:
|
||||
using OptionPairs = std::vector<std::pair<std::string, std::string>>;
|
||||
|
||||
static constexpr const char* MENU_SOUND_ = "clock.wav";
|
||||
static constexpr const char *MENU_SOUND_ = "clock.wav";
|
||||
static constexpr int OPTIONS_HORIZONTAL_PADDING_ = 20;
|
||||
|
||||
enum class Aspect
|
||||
{
|
||||
@@ -66,6 +67,12 @@ private:
|
||||
NONE
|
||||
};
|
||||
|
||||
enum class GroupAlignment
|
||||
{
|
||||
CENTERED,
|
||||
LEFT
|
||||
};
|
||||
|
||||
struct OptionEntry
|
||||
{
|
||||
std::string caption; // Texto visible en el menú
|
||||
@@ -164,6 +171,9 @@ private:
|
||||
void applySettings(SettingsGroup group);
|
||||
void updateMenu(SettingsGroup group);
|
||||
void reset();
|
||||
int calculateMenuHeight();
|
||||
int findLargestGroupSize();
|
||||
GroupAlignment getGroupAlignment(SettingsGroup group);
|
||||
|
||||
// --- Patrón Singleton ---
|
||||
ServiceMenu(); // Constructor privado
|
||||
|
||||
Reference in New Issue
Block a user