Afegides traduccions a les notificacions que faltaven
This commit is contained in:
@@ -380,4 +380,28 @@ Torna a polsar per reiniciar
|
|||||||
Torna a polsar per canviar el idioma a
|
Torna a polsar per canviar el idioma a
|
||||||
|
|
||||||
## 127 - NOTIFICACIONES
|
## 127 - NOTIFICACIONES
|
||||||
Idioma canviat a
|
Idioma canviat a
|
||||||
|
|
||||||
|
## 128 - VARIOS
|
||||||
|
activat
|
||||||
|
|
||||||
|
## 129 - VARIOS
|
||||||
|
desactivat
|
||||||
|
|
||||||
|
## 130 - VARIOS
|
||||||
|
Dispar automatic
|
||||||
|
|
||||||
|
## 131 - VARIOS
|
||||||
|
Zoom de finestra
|
||||||
|
|
||||||
|
## 132 - VARIOS
|
||||||
|
Mode finestra
|
||||||
|
|
||||||
|
## 133 - VARIOS
|
||||||
|
Mode pantalla completa
|
||||||
|
|
||||||
|
## 134 - VARIOS
|
||||||
|
Mode d'escalat sencer
|
||||||
|
|
||||||
|
## 135 - VARIOS
|
||||||
|
Filtre
|
||||||
@@ -380,4 +380,28 @@ Press again to reset
|
|||||||
Press again to change languaje to
|
Press again to change languaje to
|
||||||
|
|
||||||
## 127 - NOTIFICACIONES
|
## 127 - NOTIFICACIONES
|
||||||
Language set to
|
Language set to
|
||||||
|
|
||||||
|
## 128 - VARIOS
|
||||||
|
on
|
||||||
|
|
||||||
|
## 129 - VARIOS
|
||||||
|
off
|
||||||
|
|
||||||
|
## 130 - VARIOS
|
||||||
|
Autofire
|
||||||
|
|
||||||
|
## 131 - VARIOS
|
||||||
|
Window zoom
|
||||||
|
|
||||||
|
## 132 - VARIOS
|
||||||
|
Window mode
|
||||||
|
|
||||||
|
## 133 - VARIOS
|
||||||
|
Fullscreen mode
|
||||||
|
|
||||||
|
## 134 - VARIOS
|
||||||
|
Integer scale
|
||||||
|
|
||||||
|
## 135 - VARIOS
|
||||||
|
Filter
|
||||||
@@ -380,4 +380,28 @@ Vuelve a pulsar para reiniciar
|
|||||||
Vuelve a pulsar para cambiar el idioma a
|
Vuelve a pulsar para cambiar el idioma a
|
||||||
|
|
||||||
## 127 - NOTIFICACIONES
|
## 127 - NOTIFICACIONES
|
||||||
Idioma cambiado a
|
Idioma cambiado a
|
||||||
|
|
||||||
|
## 128 - VARIOS
|
||||||
|
activado
|
||||||
|
|
||||||
|
## 129 - VARIOS
|
||||||
|
desactivado
|
||||||
|
|
||||||
|
## 130 - VARIOS
|
||||||
|
Disparo automático
|
||||||
|
|
||||||
|
## 131 - VARIOS
|
||||||
|
Zoom de ventana
|
||||||
|
|
||||||
|
## 132 - VARIOS
|
||||||
|
Modo ventana
|
||||||
|
|
||||||
|
## 133 - VARIOS
|
||||||
|
Modo pantalla completa
|
||||||
|
|
||||||
|
## 134 - VARIOS
|
||||||
|
Modo de escalado entero
|
||||||
|
|
||||||
|
## 135 - VARIOS
|
||||||
|
Filtro
|
||||||
@@ -49,7 +49,7 @@ namespace globalInputs
|
|||||||
if (Notifier::get()->checkCode(CODE))
|
if (Notifier::get()->checkCode(CODE))
|
||||||
{
|
{
|
||||||
section::name = section::Name::INIT;
|
section::name = section::Name::INIT;
|
||||||
Notifier::get()->show({"Reset"});
|
Notifier::get()->show({lang::getText(111)});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -74,6 +74,22 @@ namespace globalInputs
|
|||||||
Notifier::get()->show({"Audio " + boolToOnOff(options.audio.enabled)});
|
Notifier::get()->show({"Audio " + boolToOnOff(options.audio.enabled)});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Cambia el modo de escalado entero
|
||||||
|
void toggleintegerScale()
|
||||||
|
{
|
||||||
|
options.video.integer_scale = !options.video.integer_scale;
|
||||||
|
SDL_RenderSetIntegerScale(Screen::get()->getRenderer(), options.video.integer_scale ? SDL_TRUE : SDL_FALSE);
|
||||||
|
Screen::get()->setVideoMode();
|
||||||
|
Notifier::get()->show({lang::getText(134) + " " + boolToOnOff(options.video.integer_scale)});
|
||||||
|
}
|
||||||
|
|
||||||
|
// Activa o desactiva los shaders
|
||||||
|
void toggleShaders()
|
||||||
|
{
|
||||||
|
Screen::get()->toggleShaders();
|
||||||
|
Notifier::get()->show({lang::getText(135) + " " + boolToOnOff(options.video.shaders)});
|
||||||
|
}
|
||||||
|
|
||||||
// Obtiene una fichero a partir de un lang::Code
|
// Obtiene una fichero a partir de un lang::Code
|
||||||
std::string getLangFile(lang::Code code)
|
std::string getLangFile(lang::Code code)
|
||||||
{
|
{
|
||||||
@@ -131,7 +147,7 @@ namespace globalInputs
|
|||||||
void toggleFireMode()
|
void toggleFireMode()
|
||||||
{
|
{
|
||||||
options.game.autofire = !options.game.autofire;
|
options.game.autofire = !options.game.autofire;
|
||||||
Notifier::get()->show({"Autofire " + boolToOnOff(options.game.autofire)});
|
Notifier::get()->show({lang::getText(130) + " " + boolToOnOff(options.game.autofire)});
|
||||||
}
|
}
|
||||||
|
|
||||||
// Salta una sección del juego
|
// Salta una sección del juego
|
||||||
@@ -141,7 +157,7 @@ namespace globalInputs
|
|||||||
{
|
{
|
||||||
case section::Name::INTRO:
|
case section::Name::INTRO:
|
||||||
JA_StopMusic();
|
JA_StopMusic();
|
||||||
// Continua en el case de abajo
|
/* Continua en el case de abajo */
|
||||||
case section::Name::LOGO:
|
case section::Name::LOGO:
|
||||||
case section::Name::HI_SCORE_TABLE:
|
case section::Name::HI_SCORE_TABLE:
|
||||||
case section::Name::INSTRUCTIONS:
|
case section::Name::INSTRUCTIONS:
|
||||||
@@ -161,13 +177,12 @@ namespace globalInputs
|
|||||||
{
|
{
|
||||||
// Teclado
|
// Teclado
|
||||||
{
|
{
|
||||||
#ifndef ARCADE
|
|
||||||
// Comprueba el teclado para cambiar entre pantalla completa y ventana
|
// Comprueba el teclado para cambiar entre pantalla completa y ventana
|
||||||
if (Input::get()->checkInput(InputType::WINDOW_FULLSCREEN, INPUT_DO_NOT_ALLOW_REPEAT, InputDeviceToUse::KEYBOARD))
|
if (Input::get()->checkInput(InputType::WINDOW_FULLSCREEN, INPUT_DO_NOT_ALLOW_REPEAT, InputDeviceToUse::KEYBOARD))
|
||||||
{
|
{
|
||||||
Screen::get()->toggleVideoMode();
|
Screen::get()->toggleVideoMode();
|
||||||
const std::string mode = options.video.mode == ScreenVideoMode::WINDOW ? "Window" : "Fullscreen";
|
const std::string mode = options.video.mode == ScreenVideoMode::WINDOW ? lang::getText(132) : lang::getText(133);
|
||||||
Notifier::get()->show({mode + " mode"});
|
Notifier::get()->show({mode});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -176,7 +191,7 @@ namespace globalInputs
|
|||||||
{
|
{
|
||||||
if (Screen::get()->decWindowZoom())
|
if (Screen::get()->decWindowZoom())
|
||||||
{
|
{
|
||||||
Notifier::get()->show({"Window zoom x" + std::to_string(options.video.window.zoom)});
|
Notifier::get()->show({lang::getText(131) + " x" + std::to_string(options.video.window.zoom)});
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -186,11 +201,11 @@ namespace globalInputs
|
|||||||
{
|
{
|
||||||
if (Screen::get()->incWindowZoom())
|
if (Screen::get()->incWindowZoom())
|
||||||
{
|
{
|
||||||
Notifier::get()->show({"Window zoom x" + std::to_string(options.video.window.zoom)});
|
Notifier::get()->show({lang::getText(131) + " x" + std::to_string(options.video.window.zoom)});
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
// Salir
|
// Salir
|
||||||
if (Input::get()->checkInput(InputType::EXIT, INPUT_DO_NOT_ALLOW_REPEAT, InputDeviceToUse::KEYBOARD))
|
if (Input::get()->checkInput(InputType::EXIT, INPUT_DO_NOT_ALLOW_REPEAT, InputDeviceToUse::KEYBOARD))
|
||||||
{
|
{
|
||||||
@@ -236,16 +251,14 @@ namespace globalInputs
|
|||||||
// Shaders
|
// Shaders
|
||||||
if (Input::get()->checkInput(InputType::VIDEO_SHADERS, INPUT_DO_NOT_ALLOW_REPEAT, InputDeviceToUse::KEYBOARD))
|
if (Input::get()->checkInput(InputType::VIDEO_SHADERS, INPUT_DO_NOT_ALLOW_REPEAT, InputDeviceToUse::KEYBOARD))
|
||||||
{
|
{
|
||||||
Screen::get()->toggleShaders();
|
toggleShaders();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Input::get()->checkInput(InputType::VIDEO_INTEGER_SCALE, INPUT_DO_NOT_ALLOW_REPEAT, InputDeviceToUse::KEYBOARD))
|
if (Input::get()->checkInput(InputType::VIDEO_INTEGER_SCALE, INPUT_DO_NOT_ALLOW_REPEAT, InputDeviceToUse::KEYBOARD))
|
||||||
{
|
{
|
||||||
options.video.integer_scale = !options.video.integer_scale;
|
toggleintegerScale();
|
||||||
SDL_RenderSetIntegerScale(Screen::get()->getRenderer(), options.video.integer_scale ? SDL_TRUE : SDL_FALSE);
|
return;
|
||||||
Screen::get()->setVideoMode();
|
|
||||||
Notifier::get()->show({"Integer scale " + std::string(options.video.integer_scale ? "on" : "off")});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
@@ -296,7 +309,7 @@ namespace globalInputs
|
|||||||
if (Input::get()->checkInput(InputType::SERVICE, INPUT_ALLOW_REPEAT, InputDeviceToUse::CONTROLLER, i) &&
|
if (Input::get()->checkInput(InputType::SERVICE, INPUT_ALLOW_REPEAT, InputDeviceToUse::CONTROLLER, i) &&
|
||||||
Input::get()->checkInput(InputType::VIDEO_SHADERS, INPUT_DO_NOT_ALLOW_REPEAT, InputDeviceToUse::CONTROLLER, i))
|
Input::get()->checkInput(InputType::VIDEO_SHADERS, INPUT_DO_NOT_ALLOW_REPEAT, InputDeviceToUse::CONTROLLER, i))
|
||||||
{
|
{
|
||||||
Screen::get()->toggleShaders();
|
toggleShaders();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
|||||||
@@ -273,7 +273,6 @@ void Screen::renderShake()
|
|||||||
void Screen::toggleShaders()
|
void Screen::toggleShaders()
|
||||||
{
|
{
|
||||||
options.video.shaders = !options.video.shaders;
|
options.video.shaders = !options.video.shaders;
|
||||||
Notifier::get()->show({"Shaders " + std::string(options.video.shaders ? "on" : "off")});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Activa / desactiva la información de debug
|
// Activa / desactiva la información de debug
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
#include <iostream> // Para basic_ostream, cout, basic_ios, endl, ios
|
#include <iostream> // Para basic_ostream, cout, basic_ios, endl, ios
|
||||||
#include <stdexcept> // Para runtime_error
|
#include <stdexcept> // Para runtime_error
|
||||||
#include <string> // Para basic_string, string, char_traits, opera...
|
#include <string> // Para basic_string, string, char_traits, opera...
|
||||||
|
#include "lang.h"
|
||||||
|
|
||||||
// Variables
|
// Variables
|
||||||
Overrides overrides = Overrides();
|
Overrides overrides = Overrides();
|
||||||
@@ -121,7 +122,7 @@ std::string boolToString(bool value)
|
|||||||
// Convierte un valor booleano en una cadena "on" o "off"
|
// Convierte un valor booleano en una cadena "on" o "off"
|
||||||
std::string boolToOnOff(bool value)
|
std::string boolToOnOff(bool value)
|
||||||
{
|
{
|
||||||
return value ? "on" : "off";
|
return value ? lang::getText(128) : lang::getText(129);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Convierte una cadena a minusculas
|
// Convierte una cadena a minusculas
|
||||||
|
|||||||
Reference in New Issue
Block a user