Afegits nous textos als json
This commit is contained in:
@@ -77,15 +77,21 @@
|
||||
"[SERVICE_MENU] SFX_VOLUME": "Volumen dels sons",
|
||||
"[SERVICE_MENU] AUTOFIRE": "Dispar automatic",
|
||||
"[SERVICE_MENU] LANGUAGE": "Idioma",
|
||||
"[SERVICE_MENU] LANG ES": "Castella",
|
||||
"[SERVICE_MENU] LANG EN": "Angles",
|
||||
"[SERVICE_MENU] LANG BA": "Balooncia",
|
||||
"[SERVICE_MENU] LANG_ES": "Castella",
|
||||
"[SERVICE_MENU] LANG_EN": "Angles",
|
||||
"[SERVICE_MENU] LANG_BA": "Balooncia",
|
||||
"[SERVICE_MENU] VIDEO": "Video",
|
||||
"[SERVICE_MENU] AUDIO": "Audio",
|
||||
"[SERVICE_MENU] GAME": "Joc",
|
||||
"[SERVICE_MENU] SETTINGS": "Configuracio",
|
||||
"[SERVICE_MENU] SYSTEM": "Sistema",
|
||||
"[SERVICE_MENU] ON": "Activat",
|
||||
"[SERVICE_MENU] OFF": "Desactivat",
|
||||
"[SERVICE_MENU] DIFFICULTY": "Dificultat",
|
||||
"[SERVICE_MENU] EASY": "Facil",
|
||||
"[SERVICE_MENU] NORMAL": "Normal",
|
||||
"[SERVICE_MENU] HARD": "Dificil",
|
||||
"[SERVICE_MENU] NEED_RESTART_MESSAGE": "Reiniciar per aplicar canvis",
|
||||
"[SERVICE_MENU] ENABLE_SHUTDOWN": "Permetre apagar el sistema",
|
||||
|
||||
"[SCOREBOARD] 1": "Jugador 1",
|
||||
"[SCOREBOARD] 2": "Jugador 2",
|
||||
|
||||
@@ -77,15 +77,21 @@
|
||||
"[SERVICE_MENU] SFX_VOLUME": "Sound Volume",
|
||||
"[SERVICE_MENU] AUTOFIRE": "Autofire",
|
||||
"[SERVICE_MENU] LANGUAGE": "Language",
|
||||
"[SERVICE_MENU] LANG ES": "Spanish",
|
||||
"[SERVICE_MENU] LANG EN": "English",
|
||||
"[SERVICE_MENU] LANG BA": "Balooncia",
|
||||
"[SERVICE_MENU] LANG_ES": "Spanish",
|
||||
"[SERVICE_MENU] LANG_EN": "English",
|
||||
"[SERVICE_MENU] LANG_BA": "Balooncia",
|
||||
"[SERVICE_MENU] VIDEO": "Video",
|
||||
"[SERVICE_MENU] AUDIO": "Audio",
|
||||
"[SERVICE_MENU] GAME": "Game",
|
||||
"[SERVICE_MENU] SETTINGS": "Settings",
|
||||
"[SERVICE_MENU] SYSTEM": "System",
|
||||
"[SERVICE_MENU] ON": "On",
|
||||
"[SERVICE_MENU] OFF": "Off",
|
||||
"[SERVICE_MENU] DIFFICULTY": "Difficulty",
|
||||
"[SERVICE_MENU] EASY": "Easy",
|
||||
"[SERVICE_MENU] NORMAL": "Normal",
|
||||
"[SERVICE_MENU] HARD": "Hard",
|
||||
"[SERVICE_MENU] NEED_RESTART_MESSAGE": "Restart to apply changes",
|
||||
"[SERVICE_MENU] ENABLE_SHUTDOWN": "Enable shutdown",
|
||||
|
||||
"[SCOREBOARD] 1": "Player 1",
|
||||
"[SCOREBOARD] 2": "Player 2",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"[CREDITS] PROGRAMMED_AND_DESIGNED_BY": "PROGRAMADO Y DISEÑADO POR",
|
||||
"[CREDITS] PIXELART_DRAWN_BY": "GRÁFICOS DIBUJADOS POR",
|
||||
"[CREDITS] MUSIC_COMPOSED_BY": "MÚSICA COMPUESTA POR",
|
||||
"[CREDITS] PROGRAMMED_AND_DESIGNED_BY": "PROGRAMADO Y DISENADO POR",
|
||||
"[CREDITS] PIXELART_DRAWN_BY": "GRAFICOS DIBUJADOS POR",
|
||||
"[CREDITS] MUSIC_COMPOSED_BY": "MUSICA COMPUESTA POR",
|
||||
"[CREDITS] SOUND_EFFECTS": "EFECTOS DE SONIDO",
|
||||
|
||||
"[DEFINE_BUTTONS] FIRE_LEFT": "Disparar a la izquierda",
|
||||
@@ -13,8 +13,8 @@
|
||||
"[DEFINE_BUTTONS] KEYBOARD": "Teclado",
|
||||
|
||||
"[GAME_TEXT] 1": "Felicidades!!",
|
||||
"[GAME_TEXT] 2": " fases más!",
|
||||
"[GAME_TEXT] 3": "Última fase!",
|
||||
"[GAME_TEXT] 2": " fases mas!",
|
||||
"[GAME_TEXT] 3": "Ultima fase!",
|
||||
"[GAME_TEXT] 4": "Potenciador",
|
||||
"[GAME_TEXT] 5": "+1 Golpe",
|
||||
"[GAME_TEXT] 6": "Tiempo!",
|
||||
@@ -35,14 +35,14 @@
|
||||
"[INSTRUCTIONS] 10": "DETIENE EL TIEMPO",
|
||||
"[INSTRUCTIONS] 11": "VIDA EXTRA",
|
||||
|
||||
"[INTRO] 1": "Un día cualquiera del año 2000",
|
||||
"[INTRO] 2": "Todo está tranquilo en la UPV",
|
||||
"[INTRO] 1": "Un dia cualquiera del ano 2000",
|
||||
"[INTRO] 2": "Todo esta tranquilo en la UPV",
|
||||
"[INTRO] 3": "Hasta que un desaprensivo...",
|
||||
"[INTRO] 4": "HEY! VOY A SACARME UN TALLADET...",
|
||||
"[INTRO] 5": "UAAAAAAAAAAAAA!!!",
|
||||
"[INTRO] 6": "Espera un momento...",
|
||||
"[INTRO] 7": "Si no llevo suelto encima!",
|
||||
"[INTRO] 8": "MIERDA DE MÁQUINA!",
|
||||
"[INTRO] 8": "MIERDA DE MAQUINA!",
|
||||
"[INTRO] 9": "Blop... blop... blop...",
|
||||
|
||||
"[NOTIFICATIONS] 01": "Pulsa otra vez para salir",
|
||||
@@ -52,7 +52,7 @@
|
||||
"[NOTIFICATIONS] 05": "Idioma cambiado a",
|
||||
"[NOTIFICATIONS] 06": "activado",
|
||||
"[NOTIFICATIONS] 07": "desactivado",
|
||||
"[NOTIFICATIONS] 08": "Disparo automático",
|
||||
"[NOTIFICATIONS] 08": "Disparo automatico",
|
||||
"[NOTIFICATIONS] 09": "Zoom de ventana",
|
||||
"[NOTIFICATIONS] 10": "Modo ventana",
|
||||
"[NOTIFICATIONS] 11": "Modo pantalla completa",
|
||||
@@ -77,22 +77,28 @@
|
||||
"[SERVICE_MENU] SFX_VOLUME": "Volumen de los efectos",
|
||||
"[SERVICE_MENU] AUTOFIRE": "Disparo automatico",
|
||||
"[SERVICE_MENU] LANGUAGE": "Idioma",
|
||||
"[SERVICE_MENU] LANG ES": "Castellano",
|
||||
"[SERVICE_MENU] LANG EN": "Ingles",
|
||||
"[SERVICE_MENU] LANG BA": "Balooncia",
|
||||
"[SERVICE_MENU] LANG_ES": "Castellano",
|
||||
"[SERVICE_MENU] LANG_EN": "Ingles",
|
||||
"[SERVICE_MENU] LANG_BA": "Balooncia",
|
||||
"[SERVICE_MENU] VIDEO": "Video",
|
||||
"[SERVICE_MENU] AUDIO": "Audio",
|
||||
"[SERVICE_MENU] GAME": "Juego",
|
||||
"[SERVICE_MENU] SETTINGS": "Configuracion",
|
||||
"[SERVICE_MENU] SYSTEM": "Sistema",
|
||||
"[SERVICE_MENU] ON": "Activado",
|
||||
"[SERVICE_MENU] OFF": "Desactivado",
|
||||
"[SERVICE_MENU] DIFFICULTY": "Dificultad",
|
||||
"[SERVICE_MENU] EASY": "Facil",
|
||||
"[SERVICE_MENU] NORMAL": "Normal",
|
||||
"[SERVICE_MENU] HARD": "Dificil",
|
||||
"[SERVICE_MENU] NEED_RESTART_MESSAGE": "Reiniciar para aplicar cambios",
|
||||
"[SERVICE_MENU] ENABLE_SHUTDOWN": "Permitir apagar el sistema",
|
||||
|
||||
"[SCOREBOARD] 1": "Jugador 1",
|
||||
"[SCOREBOARD] 2": "Jugador 2",
|
||||
"[SCOREBOARD] 3": "Multiplicador",
|
||||
"[SCOREBOARD] 4": "Max. puntuación",
|
||||
"[SCOREBOARD] 4": "Max. puntuacion",
|
||||
"[SCOREBOARD] 5": "Fase",
|
||||
"[SCOREBOARD] 6": "Modo demostración",
|
||||
"[SCOREBOARD] 6": "Modo demostracion",
|
||||
"[SCOREBOARD] 7": "Game Over",
|
||||
"[SCOREBOARD] 8": "Pulsa START",
|
||||
"[SCOREBOARD] 9": "para jugar",
|
||||
@@ -100,7 +106,7 @@
|
||||
"[SCOREBOARD] 11": "Pon tu nombre",
|
||||
"[SCOREBOARD] 12": "Por favor",
|
||||
"[SCOREBOARD] 13": "espere",
|
||||
"[SCOREBOARD] 14": "Puntuación",
|
||||
"[SCOREBOARD] 14": "Puntuacion",
|
||||
|
||||
"[TITLE] PRESS_BUTTON_TO_PLAY": "PULSA UN BOTÓN PARA JUGAR"
|
||||
"[TITLE] PRESS_BUTTON_TO_PLAY": "PULSA UN BOTON PARA JUGAR"
|
||||
}
|
||||
@@ -101,13 +101,13 @@ namespace lang
|
||||
switch (lang.code)
|
||||
{
|
||||
case Code::SPANISH:
|
||||
lang.name = lang::getText("[SERVICE_MENU] LANG ES");
|
||||
lang.name = lang::getText("[SERVICE_MENU] LANG_ES");
|
||||
break;
|
||||
case Code::VALENCIAN:
|
||||
lang.name = lang::getText("[SERVICE_MENU] LANG BA");
|
||||
lang.name = lang::getText("[SERVICE_MENU] LANG_BA");
|
||||
break;
|
||||
case Code::ENGLISH:
|
||||
lang.name = lang::getText("[SERVICE_MENU] LANG EN");
|
||||
lang.name = lang::getText("[SERVICE_MENU] LANG_EN");
|
||||
break;
|
||||
default:
|
||||
lang.name = "Unknown";
|
||||
|
||||
@@ -104,7 +104,8 @@ void ServiceMenu::render()
|
||||
// Actualiza el estado del menú de servicio (colores, animaciones, etc.)
|
||||
void ServiceMenu::update()
|
||||
{
|
||||
if (resizing_) {
|
||||
if (resizing_)
|
||||
{
|
||||
updateResizeAnimation();
|
||||
// No actualizar colores ni animaciones mientras se redimensiona
|
||||
return;
|
||||
@@ -154,7 +155,6 @@ void ServiceMenu::setOptionsPosition()
|
||||
static_cast<float>(width_),
|
||||
static_cast<float>(height_)};
|
||||
options_y_ = new_rect.y + upper_height_ + lower_padding_;
|
||||
|
||||
}
|
||||
|
||||
// Cambia el tamaño de la ventana de menu
|
||||
@@ -172,12 +172,15 @@ void ServiceMenu::resize()
|
||||
static_cast<float>(height_)};
|
||||
|
||||
// Si el rect actual es diferente al nuevo, inicia animación
|
||||
if (rect_.x != new_rect.x || rect_.y != new_rect.y || rect_.w != new_rect.w || rect_.h != new_rect.h) {
|
||||
if (rect_.x != new_rect.x || rect_.y != new_rect.y || rect_.w != new_rect.w || rect_.h != new_rect.h)
|
||||
{
|
||||
rect_anim_from_ = rect_;
|
||||
rect_anim_to_ = new_rect;
|
||||
resize_anim_step_ = 0;
|
||||
resizing_ = true;
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
rect_ = new_rect;
|
||||
resizing_ = false;
|
||||
}
|
||||
@@ -185,10 +188,12 @@ void ServiceMenu::resize()
|
||||
|
||||
void ServiceMenu::updateResizeAnimation()
|
||||
{
|
||||
if (!resizing_) return;
|
||||
if (!resizing_)
|
||||
return;
|
||||
++resize_anim_step_;
|
||||
float t = static_cast<float>(resize_anim_step_) / resize_anim_steps_;
|
||||
if (t >= 1.0f) {
|
||||
if (t >= 1.0f)
|
||||
{
|
||||
rect_ = rect_anim_to_;
|
||||
resizing_ = false;
|
||||
return;
|
||||
@@ -366,9 +371,9 @@ void ServiceMenu::initializeOptions()
|
||||
OptionBehavior::ADJUST,
|
||||
&options.pending_changes.new_language,
|
||||
std::vector<std::string>{
|
||||
lang::getText("[SERVICE_MENU] LANG ES"),
|
||||
lang::getText("[SERVICE_MENU] LANG BA"),
|
||||
lang::getText("[SERVICE_MENU] LANG EN")});
|
||||
lang::getText("[SERVICE_MENU] LANG_ES"),
|
||||
lang::getText("[SERVICE_MENU] LANG_BA"),
|
||||
lang::getText("[SERVICE_MENU] LANG_EN")});
|
||||
|
||||
// System
|
||||
options_.emplace_back(lang::getText("[SERVICE_MENU] RESET"), SettingsGroup::SYSTEM, OptionBehavior::SELECT, nullptr, ValueType::NONE);
|
||||
@@ -379,7 +384,7 @@ void ServiceMenu::initializeOptions()
|
||||
// Menu principal
|
||||
options_.emplace_back(lang::getText("[SERVICE_MENU] VIDEO"), SettingsGroup::MAIN, OptionBehavior::SELECT, SettingsGroup::VIDEO);
|
||||
options_.emplace_back(lang::getText("[SERVICE_MENU] AUDIO"), SettingsGroup::MAIN, OptionBehavior::SELECT, SettingsGroup::AUDIO);
|
||||
options_.emplace_back(lang::getText("[SERVICE_MENU] GAME"), SettingsGroup::MAIN, OptionBehavior::SELECT, SettingsGroup::GAME);
|
||||
options_.emplace_back(lang::getText("[SERVICE_MENU] SETTINGS"), SettingsGroup::MAIN, OptionBehavior::SELECT, SettingsGroup::GAME);
|
||||
options_.emplace_back(lang::getText("[SERVICE_MENU] SYSTEM"), SettingsGroup::MAIN, OptionBehavior::SELECT, SettingsGroup::SYSTEM);
|
||||
|
||||
// Al terminar de inicializar las opciones, recalcula los anchos de menú
|
||||
@@ -518,19 +523,24 @@ void ServiceMenu::AdjustListValues()
|
||||
void ServiceMenu::precalculateMenuWidths()
|
||||
{
|
||||
// Inicializa todos los anchos al mínimo
|
||||
for (int &w : group_menu_widths_) w = MIN_WIDTH_;
|
||||
for (int &w : group_menu_widths_)
|
||||
w = MIN_WIDTH_;
|
||||
|
||||
// Para cada grupo
|
||||
for (int group = 0; group < 5; ++group) {
|
||||
for (int group = 0; group < 5; ++group)
|
||||
{
|
||||
SettingsGroup sg = static_cast<SettingsGroup>(group);
|
||||
int max_option_width = 0;
|
||||
int max_value_width = 0;
|
||||
for (const auto &option : options_) {
|
||||
if (option.group != sg) continue;
|
||||
for (const auto &option : options_)
|
||||
{
|
||||
if (option.group != sg)
|
||||
continue;
|
||||
// Opción más larga
|
||||
max_option_width = std::max(max_option_width, element_text_->lenght(option.caption, -2));
|
||||
// Valor más largo de todos los posibles valores de todas las opciones
|
||||
switch (option.type) {
|
||||
switch (option.type)
|
||||
{
|
||||
case ValueType::BOOL:
|
||||
max_value_width = std::max({max_value_width,
|
||||
element_text_->lenght(lang::getText("[SERVICE_MENU] ON"), -2),
|
||||
@@ -549,7 +559,7 @@ void ServiceMenu::precalculateMenuWidths()
|
||||
break;
|
||||
}
|
||||
}
|
||||
size_t total_width = max_option_width + MIN_GAP_OPTION_VALUE_ + max_value_width + OPTIONS_HORIZONTAL_PADDING_*2;
|
||||
size_t total_width = max_option_width + MIN_GAP_OPTION_VALUE_ + max_value_width + (OPTIONS_HORIZONTAL_PADDING_ * 2);
|
||||
group_menu_widths_[group] = std::max(MIN_WIDTH_, total_width);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user