Cambiado el tamaño del borde de porcentaje a valor absoluto en pixeles

This commit is contained in:
2022-11-29 18:45:25 +01:00
parent 4a430c0d5b
commit c59739c7ba
4 changed files with 27 additions and 16 deletions

View File

@@ -16,8 +16,8 @@ Screen::Screen(SDL_Window *window, SDL_Renderer *renderer, Asset *asset, options
gameCanvasWidth = options->gameWidth;
gameCanvasHeight = options->gameHeight;
borderWidth = options->gameWidth * options->borderSize;
borderHeight = options->gameHeight * options->borderSize;
borderWidth = options->borderWidth * 2;
borderHeight = options->borderHeight * 2;
notificationLogicalWidth = gameCanvasWidth;
notificationLogicalHeight = gameCanvasHeight;
@@ -203,9 +203,15 @@ void Screen::setBlendMode(SDL_BlendMode blendMode)
}
// Establece el tamaño del borde
void Screen::setBorderSize(float s)
void Screen::setBorderWidth(int s)
{
options->borderSize = s;
options->borderWidth = s;
}
// Establece el tamaño del borde
void Screen::setBorderHeight(int s)
{
options->borderHeight = s;
}
// Establece si se ha de ver el borde en el modo ventana