Modificados los colores de la pantalla de cambio de JailerID para adecuarse a los colores de los menus del juego
This commit is contained in:
@@ -37,6 +37,7 @@ EnterID::EnterID(SDL_Renderer *renderer, Screen *screen, Asset *asset, Lang *lan
|
|||||||
counter = 0;
|
counter = 0;
|
||||||
ticks = 0;
|
ticks = 0;
|
||||||
ticksSpeed = 15;
|
ticksSpeed = 15;
|
||||||
|
jailerIDPos = 0;
|
||||||
initName();
|
initName();
|
||||||
|
|
||||||
// Escribe el texto en la textura
|
// Escribe el texto en la textura
|
||||||
@@ -124,6 +125,7 @@ void EnterID::checkEvents()
|
|||||||
else if (eventHandler->key.keysym.scancode == SDL_SCANCODE_ESCAPE)
|
else if (eventHandler->key.keysym.scancode == SDL_SCANCODE_ESCAPE)
|
||||||
{
|
{
|
||||||
section->name = SECTION_PROG_QUIT;
|
section->name = SECTION_PROG_QUIT;
|
||||||
|
loopRunning = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -186,7 +188,7 @@ void EnterID::render()
|
|||||||
// Escribe el jailerID
|
// Escribe el jailerID
|
||||||
const std::string jailerID = (std::string)name + cursor;
|
const std::string jailerID = (std::string)name + cursor;
|
||||||
const color_t color = stringToColor(options->palette, "white");
|
const color_t color = stringToColor(options->palette, "white");
|
||||||
text->writeDX(TXT_CENTER | TXT_COLOR, GAMECANVAS_CENTER_X, (16 * 8 + 1), jailerID, 1, color);
|
text->writeDX(TXT_CENTER | TXT_COLOR, GAMECANVAS_CENTER_X, jailerIDPos, jailerID, 1, color);
|
||||||
|
|
||||||
// Vuelca el contenido del renderizador en pantalla
|
// Vuelca el contenido del renderizador en pantalla
|
||||||
screen->blit();
|
screen->blit();
|
||||||
@@ -195,36 +197,26 @@ void EnterID::render()
|
|||||||
// Inicializa los textos
|
// Inicializa los textos
|
||||||
void EnterID::iniTexts()
|
void EnterID::iniTexts()
|
||||||
{
|
{
|
||||||
|
const color_t orangeColor = {0xFF, 0x7A, 0x00};
|
||||||
|
const color_t noColor = {0xFF, 0xFF, 0xFF};
|
||||||
|
|
||||||
texts.clear();
|
texts.clear();
|
||||||
texts.push_back({"", stringToColor(options->palette, "white")});
|
texts.push_back({lang->getText(89), orangeColor});
|
||||||
texts.push_back({"", stringToColor(options->palette, "white")});
|
texts.push_back({"", noColor});
|
||||||
texts.push_back({"", stringToColor(options->palette, "white")});
|
texts.push_back({lang->getText(90), noColor});
|
||||||
texts.push_back({"", stringToColor(options->palette, "white")});
|
texts.push_back({lang->getText(91), noColor});
|
||||||
texts.push_back({"", stringToColor(options->palette, "white")});
|
texts.push_back({lang->getText(92), noColor});
|
||||||
texts.push_back({"", stringToColor(options->palette, "white")});
|
texts.push_back({"", noColor});
|
||||||
texts.push_back({lang->getText(89), stringToColor(options->palette, "red")});
|
texts.push_back({"", noColor});
|
||||||
texts.push_back({"", stringToColor(options->palette, "white")});
|
texts.push_back({"", noColor});
|
||||||
texts.push_back({lang->getText(90), stringToColor(options->palette, "white")});
|
texts.push_back({"JAILER_ID:", orangeColor});
|
||||||
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")});
|
|
||||||
texts.push_back({"JAILER_ID:", stringToColor(options->palette, "red")});
|
|
||||||
texts.push_back({"", 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")});
|
|
||||||
texts.push_back({"", 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")});
|
|
||||||
texts.push_back({"", stringToColor(options->palette, "white")});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Escribe el texto en la textura
|
// Escribe el texto en la textura
|
||||||
void EnterID::fillTexture()
|
void EnterID::fillTexture()
|
||||||
{
|
{
|
||||||
|
const color_t shdwTxtColor = {0x43, 0x43, 0x4F};
|
||||||
|
|
||||||
// Inicializa los textos
|
// Inicializa los textos
|
||||||
iniTexts();
|
iniTexts();
|
||||||
|
|
||||||
@@ -234,14 +226,16 @@ void EnterID::fillTexture()
|
|||||||
SDL_RenderClear(renderer);
|
SDL_RenderClear(renderer);
|
||||||
|
|
||||||
// Escribe el texto en la textura
|
// Escribe el texto en la textura
|
||||||
const int size = text->getCharacterSize();
|
const int desp = 40;
|
||||||
|
const int size = text->getCharacterSize() + 2;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
for (auto t : texts)
|
for (auto t : texts)
|
||||||
{
|
{
|
||||||
text->writeDX(TXT_CENTER | TXT_COLOR, PLAY_AREA_CENTER_X, i * size, t.label, 1, t.color);
|
text->writeDX(TXT_CENTER | TXT_COLOR | TXT_SHADOW, PLAY_AREA_CENTER_X, (i * size) + desp, t.label, 1, t.color, 1, shdwTxtColor);
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
jailerIDPos = ((i + 1) * size) + desp;
|
||||||
|
|
||||||
SDL_SetRenderTarget(renderer, nullptr);
|
SDL_SetRenderTarget(renderer, nullptr);
|
||||||
}
|
}
|
||||||
@@ -272,7 +266,7 @@ void EnterID::initOnline()
|
|||||||
#else
|
#else
|
||||||
const std::string caption = options->online.jailerID;
|
const std::string caption = options->online.jailerID;
|
||||||
#endif
|
#endif
|
||||||
//screen->showNotification(caption, lang->getText(85), 12);
|
// screen->showNotification(caption, lang->getText(85), 12);
|
||||||
screen->showNotification(caption, lang->getText(85));
|
screen->showNotification(caption, lang->getText(85));
|
||||||
if (options->console)
|
if (options->console)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ private:
|
|||||||
int pos; // Posición actual en el vector name
|
int pos; // Posición actual en el vector name
|
||||||
int maxLenght; // Tamaño máximo del jailerID
|
int maxLenght; // Tamaño máximo del jailerID
|
||||||
std::string oldJailerID; // Almacena el valor de jailerID al inicio para ver si se ha modificado
|
std::string oldJailerID; // Almacena el valor de jailerID al inicio para ver si se ha modificado
|
||||||
|
int jailerIDPos; // Posición en el eje Y donde ser va a escribir el texto
|
||||||
|
|
||||||
// Actualiza las variables
|
// Actualiza las variables
|
||||||
void update();
|
void update();
|
||||||
|
|||||||
Reference in New Issue
Block a user