diff --git a/source/title.cpp b/source/title.cpp index 4d72e24..4a00585 100644 --- a/source/title.cpp +++ b/source/title.cpp @@ -118,6 +118,8 @@ void Title::checkEvents() case SDL_SCANCODE_3: runEnterID(); + fillTexture(); + createCheevosTexture(); break; default: @@ -377,6 +379,8 @@ void Title::fillTexture() SDL_RenderClear(renderer); // Pinta el grafico del titulo a partir del sprite + sprite->setPosX(0); + sprite->setPosY(0); sprite->setSpriteClip(0, 0, sprite->getWidth(), 64); sprite->render(); // Titulo grande @@ -405,9 +409,10 @@ void Title::fillTexture() // Escribe el texto en la textura const color_t textColor = stringToColor(options->palette, "green"); const int textSize = text->getCharacterSize(); + const std::string onlineText = options->online.jailerID == "" ? "3.ONLINE MODE" : "3." + options->online.jailerID; text->writeDX(TXT_CENTER | TXT_COLOR, PLAY_AREA_CENTER_X, 11 * textSize, "1.PLAY", 1, textColor); text->writeDX(TXT_CENTER | TXT_COLOR, PLAY_AREA_CENTER_X, 13 * textSize, "2.ACHIEVEMENTS", 1, textColor); - text->writeDX(TXT_CENTER | TXT_COLOR, PLAY_AREA_CENTER_X, 15 * textSize, "3.ONLINE MODE", 1, textColor); + text->writeDX(TXT_CENTER | TXT_COLOR, PLAY_AREA_CENTER_X, 15 * textSize, onlineText, 1, textColor); text->writeDX(TXT_CENTER | TXT_COLOR, PLAY_AREA_CENTER_X, 18 * textSize, "ESC.EXIT GAME", 1, textColor); // Devuelve el puntero del renderizador a su sitio @@ -435,7 +440,8 @@ void Title::createCheevosTexture() SDL_RenderClear(renderer); // Escribe la lista de logros en la textura - const std::string cheevosListCaption = "ACHIEVEMENTS (" + std::to_string(cheevos->unlocked()) + " / " + std::to_string(cheevos->count()) + ")"; + const std::string cheevosOwner = options->online.jailerID == "" ? "LOCAL ACHIEVEMENTS" : "ACHIEVEMENTS FOR " + options->online.jailerID; + const std::string cheevosListCaption = cheevosOwner + " (" + std::to_string(cheevos->unlocked()) + " / " + std::to_string(cheevos->count()) + ")"; infoText->writeDX(TXT_CENTER | TXT_COLOR, cheevosTexture->getWidth() / 2, 2, cheevosListCaption, 1, stringToColor(options->palette, "bright_green")); int pos = 11; const color_t cheevoLockedColor = stringToColor(options->palette, "white");