eliminades les opcions de configuracio de posicio de les notificacions

This commit is contained in:
2025-10-27 13:24:43 +01:00
parent cdb9bde6aa
commit aacb14149f
4 changed files with 22 additions and 91 deletions

View File

@@ -20,22 +20,6 @@ constexpr int convertVolume(int volume_percent) {
}
} // namespace VolumeHelpers
// Posiciones de las notificaciones
enum class NotificationPosition {
UPPER_LEFT,
UPPER_CENTER,
UPPER_RIGHT,
BOTTOM_LEFT,
BOTTOM_CENTER,
BOTTOM_RIGHT,
TOP,
BOTTOM,
LEFT,
RIGHT,
CENTER,
UNKNOWN,
};
// Tipos de control de teclado
enum class ControlScheme {
CURSOR,
@@ -52,54 +36,18 @@ namespace Options {
// Estructura para las opciones de las notificaciones
struct Notification {
NotificationPosition pos; // Ubicación de las notificaciones en pantalla
bool sound; // Indica si las notificaciones suenan
Uint8 color; // Color de las notificaciones
bool sound; // Indica si las notificaciones suenan
Uint8 color; // Color de las notificaciones
// Constructor por defecto
Notification()
: pos(GameDefaults::NOTIFICATION_POSITION),
sound(GameDefaults::NOTIFICATION_SOUND),
: sound(GameDefaults::NOTIFICATION_SOUND),
color(GameDefaults::NOTIFICATION_COLOR) {}
// Constructor
Notification(NotificationPosition p, bool s, Uint8 c)
: pos(p),
sound(s),
Notification(bool s, Uint8 c)
: sound(s),
color(c) {}
// Método que devuelve la posición horizontal
NotificationPosition getHorizontalPosition() const {
switch (pos) {
case NotificationPosition::UPPER_LEFT:
case NotificationPosition::BOTTOM_LEFT:
return NotificationPosition::LEFT;
case NotificationPosition::UPPER_CENTER:
case NotificationPosition::BOTTOM_CENTER:
return NotificationPosition::CENTER;
case NotificationPosition::UPPER_RIGHT:
case NotificationPosition::BOTTOM_RIGHT:
return NotificationPosition::RIGHT;
default:
return NotificationPosition::UNKNOWN;
}
}
// Método que devuelve la posición vertical
NotificationPosition getVerticalPosition() const {
switch (pos) {
case NotificationPosition::UPPER_LEFT:
case NotificationPosition::UPPER_CENTER:
case NotificationPosition::UPPER_RIGHT:
return NotificationPosition::TOP;
case NotificationPosition::BOTTOM_LEFT:
case NotificationPosition::BOTTOM_CENTER:
case NotificationPosition::BOTTOM_RIGHT:
return NotificationPosition::BOTTOM;
default:
return NotificationPosition::UNKNOWN;
}
}
};
// Estructura para albergar trucos
@@ -308,15 +256,15 @@ struct Game {
};
// --- Variables globales (inline C++17+) ---
inline std::string version{}; // Versión del fichero de configuración. Sirve para saber si las opciones son compatibles
inline bool console{false}; // Indica si ha de mostrar información por la consola de texto
inline Cheat cheats{}; // Contiene trucos y ventajas para el juego
inline Game game{}; // Opciones de juego
inline Video video{}; // Opciones de video
inline Stats stats{}; // Datos con las estadisticas de juego
inline Notification notifications{}; // Opciones relativas a las notificaciones;
inline Window window{}; // Opciones relativas a la ventana
inline Audio audio{}; // Opciones relativas al audio
inline std::string version{}; // Versión del fichero de configuración. Sirve para saber si las opciones son compatibles
inline bool console{false}; // Indica si ha de mostrar información por la consola de texto
inline Cheat cheats{}; // Contiene trucos y ventajas para el juego
inline Game game{}; // Opciones de juego
inline Video video{}; // Opciones de video
inline Stats stats{}; // Datos con las estadisticas de juego
inline Notification notifications{}; // Opciones relativas a las notificaciones;
inline Window window{}; // Opciones relativas a la ventana
inline Audio audio{}; // Opciones relativas al audio
inline ControlScheme keys{GameDefaults::CONTROL_SCHEME}; // Teclas usadas para jugar
// --- Funciones ---