From e50aa7751465de82e542319b4665367cc5479fb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Valor=20Mart=C3=ADnez?= Date: Mon, 5 Sep 2022 16:24:16 +0200 Subject: [PATCH] =?UTF-8?q?A=C3=B1adido=20color=20de=20borde=20para=20el?= =?UTF-8?q?=20logo,=20intro=20y=20titulo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/game.cpp | 1 + source/intro.cpp | 5 +++-- source/logo.cpp | 3 +++ source/title.cpp | 3 +++ source/utils.cpp | 2 +- 5 files changed, 11 insertions(+), 3 deletions(-) diff --git a/source/game.cpp b/source/game.cpp index d23f25a..d818a11 100644 --- a/source/game.cpp +++ b/source/game.cpp @@ -78,6 +78,7 @@ void Game::checkEventHandler() if (eventHandler->type == SDL_QUIT) { section.name = SECTION_PROG_QUIT; + screen->setBorderColor(stringToColor("black")); break; } else if ((eventHandler->type == SDL_KEYDOWN) and (eventHandler->key.repeat == 0)) diff --git a/source/intro.cpp b/source/intro.cpp index 97ce471..465d066 100644 --- a/source/intro.cpp +++ b/source/intro.cpp @@ -18,8 +18,6 @@ Intro::Intro(SDL_Renderer *renderer, Screen *screen, Asset *asset) loadingSound2 = JA_LoadMusic(asset->get("loading_sound2.ogg").c_str()); loadingSound3 = JA_LoadMusic(asset->get("loading_sound3.ogg").c_str()); - // text = new Text(asset->get("smb2.png"), asset->get("smb2.txt"), renderer); - // Inicializa variables preCounter = 0; counter = 0; @@ -31,6 +29,9 @@ Intro::Intro(SDL_Renderer *renderer, Screen *screen, Asset *asset) loadCounter = 0; load1 = true; load2 = false; + + // Cambia el color del borde + screen->setBorderColor(stringToColor("black")); } // Destructor diff --git a/source/logo.cpp b/source/logo.cpp index 00a348d..a683c73 100644 --- a/source/logo.cpp +++ b/source/logo.cpp @@ -63,6 +63,9 @@ Logo::Logo(SDL_Renderer *renderer, Screen *screen, Asset *asset) c = stringToColor("light_white"); color.push_back(c); + + // Cambia el color del borde + screen->setBorderColor(stringToColor("black")); } // Destructor diff --git a/source/title.cpp b/source/title.cpp index de477a6..4d37f5f 100644 --- a/source/title.cpp +++ b/source/title.cpp @@ -31,6 +31,9 @@ Title::Title(SDL_Renderer *renderer, Screen *screen, Asset *asset) letters.push_back(l); } letters[0].enabled = true; + + // Cambia el color del borde + screen->setBorderColor(stringToColor("magenta")); } // Destructor diff --git a/source/utils.cpp b/source/utils.cpp index 135a2da..6dcf506 100644 --- a/source/utils.cpp +++ b/source/utils.cpp @@ -229,7 +229,7 @@ color_t stringToColor(std::string str) } else - { + { // zxarne if (str == "black") { return {0x00, 0x00, 0x00};