utils: Añadidas las funciones darkenColor y lightenColor
This commit is contained in:
@@ -61,7 +61,8 @@ void OnScreenKeyboard::fillTexture()
|
||||
text->write(text->getCharacterSize(), text->getCharacterSize(), caption);
|
||||
|
||||
// Dibuja el cuadro donde va el texto que se escribirá
|
||||
SDL_SetRenderDrawColor(renderer, bgColor.r - 10, bgColor.g - 10, bgColor.b - 10, 255);
|
||||
const color_t darkColor = darkenColor(bgColor, 10);
|
||||
SDL_SetRenderDrawColor(renderer, darkColor.r, darkColor.g, darkColor.b, 255);
|
||||
const int x_rect = (text->getCharacterSize() * 2) + text->lenght(caption);
|
||||
const int y_rect = text->getCharacterSize();
|
||||
const int w_rect = width - text->getCharacterSize() - x_rect;
|
||||
|
||||
Reference in New Issue
Block a user