reestructuració
This commit is contained in:
35
source/core/locale/lang.h
Normal file
35
source/core/locale/lang.h
Normal file
@@ -0,0 +1,35 @@
|
||||
#pragma once
|
||||
|
||||
#include <SDL3/SDL.h>
|
||||
|
||||
#include <string> // for string, basic_string
|
||||
class Asset;
|
||||
|
||||
// Códigos de idioma
|
||||
constexpr int es_ES = 0;
|
||||
constexpr int ba_BA = 1;
|
||||
constexpr int en_UK = 2;
|
||||
constexpr int MAX_LANGUAGES = 3;
|
||||
|
||||
// Textos
|
||||
constexpr int MAX_TEXT_STRINGS = 100;
|
||||
|
||||
// Clase Lang
|
||||
class Lang {
|
||||
private:
|
||||
Asset *mAsset; // Objeto que gestiona todos los ficheros de recursos
|
||||
std::string mTextStrings[MAX_TEXT_STRINGS]; // Vector con los textos
|
||||
|
||||
public:
|
||||
// Constructor
|
||||
Lang(Asset *mAsset);
|
||||
|
||||
// Destructor
|
||||
~Lang();
|
||||
|
||||
// Inicializa los textos del juego en el idioma seleccionado
|
||||
bool setLang(Uint8 lang);
|
||||
|
||||
// Obtiene la cadena de texto del indice
|
||||
std::string getText(int index);
|
||||
};
|
||||
Reference in New Issue
Block a user