From 45d02440f601775bb2af2aad2a3142ec32a5ebb4 Mon Sep 17 00:00:00 2001 From: Sergio Valor Date: Mon, 25 Sep 2023 22:18:19 +0200 Subject: [PATCH] =?UTF-8?q?La=20pantalla=20de=20cambio=20de=20jailer=5Fid?= =?UTF-8?q?=20ya=20est=C3=A1=20en=20multilenguaje?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data/lang/ba_BA.txt | 18 +++++++++++++++--- data/lang/en_UK.txt | 18 +++++++++++++++--- data/lang/es_ES.txt | 18 +++++++++++++++--- source/director.cpp | 3 ++- source/enter_id.cpp | 16 ++++++---------- source/lang.h | 2 +- 6 files changed, 54 insertions(+), 21 deletions(-) diff --git a/data/lang/ba_BA.txt b/data/lang/ba_BA.txt index 56e4611..52835d0 100644 --- a/data/lang/ba_BA.txt +++ b/data/lang/ba_BA.txt @@ -259,8 +259,20 @@ ha iniciat la sesio ## 86 - NOTIFICACIONES Punts enviats: -## 86 - NOTIFICACIONES +## 87 - NOTIFICACIONES No s'ha pogut -## 87 - NOTIFICACIONES -enviar la puntuacio \ No newline at end of file +## 88 - NOTIFICACIONES +enviar la puntuacio + +## 89 - ENTER ID +CONFIGURACIO EN LINEA + +## 90 - ENTER ID +INTRODUEIX UN JAILER_ID + +## 91 - ENTER ID +O DEIXA BUIT PER A + +## 92 - ENTER ID +MODE FORA DE LINEA \ No newline at end of file diff --git a/data/lang/en_UK.txt b/data/lang/en_UK.txt index 9135b30..de4f865 100644 --- a/data/lang/en_UK.txt +++ b/data/lang/en_UK.txt @@ -259,8 +259,20 @@ is logged in ## 86 - NOTIFICACIONES Score submitted -## 86 - NOTIFICACIONES +## 87 - NOTIFICACIONES Failed to send -## 87 - NOTIFICACIONES -score to online server \ No newline at end of file +## 88 - NOTIFICACIONES +score to online server + +## 89 - ENTER ID +ONLINE CONFIGURATION + +## 90 - ENTER ID +PLEASE ENTER AN ID + +## 91 - ENTER ID +OR LEAVE BLANK FOR + +## 92 - ENTER ID +OFFLINE MODE \ No newline at end of file diff --git a/data/lang/es_ES.txt b/data/lang/es_ES.txt index 0ffe93f..0cf8e32 100644 --- a/data/lang/es_ES.txt +++ b/data/lang/es_ES.txt @@ -259,8 +259,20 @@ ha iniciado la sesion ## 86 - NOTIFICACIONES Puntos enviados: -## 86 - NOTIFICACIONES +## 87 - NOTIFICACIONES No se ha podido -## 87 - NOTIFICACIONES -enviar la puntuacion \ No newline at end of file +## 88 - NOTIFICACIONES +enviar la puntuacion + +## 89 - ENTER ID +CONFIGURACION ONLNE + +## 90 - ENTER ID +INTRODUCE UN JAILER_ID + +## 91 - ENTER ID +O DEJA EN BLANCO PARA + +## 92 - ENTER ID +MODO OFFLINE \ No newline at end of file diff --git a/source/director.cpp b/source/director.cpp index d630df7..28fa105 100644 --- a/source/director.cpp +++ b/source/director.cpp @@ -741,7 +741,8 @@ void Director::initOnline() #else const std::string caption = options->online.jailerID; #endif - screen->showNotification(caption, lang->getText(85), 12); + //screen->showNotification(caption, lang->getText(85), 12); + screen->showNotification(caption, lang->getText(85)); if (options->console) { std::cout << caption << std::endl; diff --git a/source/enter_id.cpp b/source/enter_id.cpp index 5015378..fe95a14 100644 --- a/source/enter_id.cpp +++ b/source/enter_id.cpp @@ -180,9 +180,6 @@ void EnterID::render() // Prepara para empezar a dibujar en la textura de juego screen->start(); - // Limpia la pantalla - screen->clean(); - // Dibuja la textura con el texto en pantalla SDL_RenderCopy(renderer, textTexture, nullptr, nullptr); @@ -203,13 +200,13 @@ void EnterID::iniTexts() texts.push_back({"", stringToColor(options->palette, "white")}); texts.push_back({"", stringToColor(options->palette, "white")}); texts.push_back({"", stringToColor(options->palette, "white")}); - texts.push_back({"ONLINE CONFIGURATION:", stringToColor(options->palette, "red")}); texts.push_back({"", stringToColor(options->palette, "white")}); - texts.push_back({"YOU HAVE NOT SPECIFIED ANY ID", stringToColor(options->palette, "white")}); - texts.push_back({"FOR THE ONLINE SERVICE", stringToColor(options->palette, "white")}); texts.push_back({"", stringToColor(options->palette, "white")}); - texts.push_back({"PLEASE ENTER AN ID OR", stringToColor(options->palette, "white")}); - texts.push_back({"LEAVE BLANK FOR OFFLINE MODE", stringToColor(options->palette, "white")}); + texts.push_back({lang->getText(89), stringToColor(options->palette, "red")}); + texts.push_back({"", stringToColor(options->palette, "white")}); + texts.push_back({lang->getText(90), stringToColor(options->palette, "white")}); + texts.push_back({lang->getText(91), stringToColor(options->palette, "white")}); + texts.push_back({lang->getText(92), stringToColor(options->palette, "white")}); texts.push_back({"", stringToColor(options->palette, "white")}); texts.push_back({"", stringToColor(options->palette, "white")}); texts.push_back({"", stringToColor(options->palette, "white")}); @@ -233,8 +230,7 @@ void EnterID::fillTexture() // Rellena la textura de texto SDL_SetRenderTarget(renderer, textTexture); - color_t c = stringToColor(options->palette, "black"); - SDL_SetRenderDrawColor(renderer, c.r, c.g, c.b, 0xFF); + SDL_SetRenderDrawColor(renderer, bgColor.r, bgColor.g, bgColor.b, 0xFF); SDL_RenderClear(renderer); // Escribe el texto en la textura diff --git a/source/lang.h b/source/lang.h index 00a9410..821784d 100644 --- a/source/lang.h +++ b/source/lang.h @@ -20,7 +20,7 @@ class Lang { private: - Asset *mAsset; // Objeto que gestiona todos los ficheros de recursos + Asset *mAsset; // Objeto que gestiona todos los ficheros de recursos std::string mTextStrings[MAX_TEXT_STRINGS]; // Vector con los textos public: