From 477fc35e2961ae771988a101ba2bb1b9fab49df6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Valor=20Mart=C3=ADnez?= Date: Sun, 28 May 2023 19:45:32 +0200 Subject: [PATCH] =?UTF-8?q?on=5Fscreen=5Fkeyboard:=20A=C3=B1adidos=20borde?= =?UTF-8?q?s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- units/on_screen_keyboard.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/units/on_screen_keyboard.cpp b/units/on_screen_keyboard.cpp index 789a0d0..0a5dc15 100644 --- a/units/on_screen_keyboard.cpp +++ b/units/on_screen_keyboard.cpp @@ -39,8 +39,12 @@ OnScreenKeyboard::OnScreenKeyboard(SDL_Renderer *renderer, Input *input, string // Rellena la textura del cursor SDL_SetRenderTarget(renderer, textureCursor); - SDL_SetRenderDrawColor(renderer, 255, 0, 0, 128); + color_t c = {192, 0, 0}; + SDL_SetRenderDrawColor(renderer, c.r, c.g, c.b, 255); SDL_RenderClear(renderer); + c = lightenColor(c, 20); + SDL_SetRenderDrawColor(renderer, c.r, c.g, c.b, 255); + SDL_RenderDrawRect(renderer, NULL); SDL_SetRenderTarget(renderer, nullptr); } @@ -77,6 +81,9 @@ void OnScreenKeyboard::fillTexture() // Establece el color de fondo SDL_SetRenderDrawColor(renderer, bgColor.r, bgColor.g, bgColor.b, 255); SDL_RenderClear(renderer); + color_t color = lightenColor(bgColor, 20); + SDL_SetRenderDrawColor(renderer, color.r, color.g, color.b, 255); + SDL_RenderDrawRect(renderer, NULL); // Escribe el texto que aparece en el objeto text->write(text->getCharacterSize(), text->getCharacterSize(), caption);