Las notificaciones ya se renderizan a su propia resolución
This commit is contained in:
@@ -75,7 +75,7 @@ void Screen::blit()
|
|||||||
SDL_RenderCopy(renderer, gameCanvas, nullptr, &dest);
|
SDL_RenderCopy(renderer, gameCanvas, nullptr, &dest);
|
||||||
|
|
||||||
// Dibuja las notificaciones
|
// Dibuja las notificaciones
|
||||||
notify->render();
|
renderNotifications();
|
||||||
|
|
||||||
// Muestra por pantalla el renderizador
|
// Muestra por pantalla el renderizador
|
||||||
SDL_RenderPresent(renderer);
|
SDL_RenderPresent(renderer);
|
||||||
@@ -101,14 +101,16 @@ void Screen::setVideoMode(int fullScreenMode)
|
|||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
screenWidth = gameCanvasWidth;
|
screenWidth = gameCanvasWidth * options->windowSize;
|
||||||
screenHeight = gameCanvasHeight;
|
screenHeight = gameCanvasHeight * options->windowSize;
|
||||||
dest = {0, 0, gameCanvasWidth, gameCanvasHeight};
|
dest = {0, 0, gameCanvasWidth, gameCanvasHeight};
|
||||||
}
|
}
|
||||||
|
|
||||||
// Modifica el tamaño del renderizador y de la ventana
|
// Modifica el tamaño del renderizador y de la ventana
|
||||||
SDL_RenderSetLogicalSize(renderer, screenWidth, screenHeight);
|
// SDL_RenderSetLogicalSize(renderer, screenWidth, screenHeight);
|
||||||
SDL_SetWindowSize(window, screenWidth * options->windowSize, screenHeight * options->windowSize);
|
// SDL_SetWindowSize(window, screenWidth * options->windowSize, screenHeight * options->windowSize);
|
||||||
|
SDL_RenderSetLogicalSize(renderer, gameCanvasWidth, gameCanvasHeight);
|
||||||
|
SDL_SetWindowSize(window, screenWidth, screenHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Si está activo el modo de pantalla completa añade el borde
|
// Si está activo el modo de pantalla completa añade el borde
|
||||||
@@ -382,3 +384,11 @@ void Screen::showText(std::string text)
|
|||||||
{
|
{
|
||||||
notify->showText(text);
|
notify->showText(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Dibuja las notificaciones
|
||||||
|
void Screen::renderNotifications()
|
||||||
|
{
|
||||||
|
SDL_RenderSetLogicalSize(renderer, screenWidth, screenHeight);
|
||||||
|
notify->render();
|
||||||
|
SDL_RenderSetLogicalSize(renderer, gameCanvasWidth, gameCanvasHeight);
|
||||||
|
}
|
||||||
@@ -69,6 +69,9 @@ private:
|
|||||||
// Dibuja el spectrum fade
|
// Dibuja el spectrum fade
|
||||||
void renderSpectrumFade();
|
void renderSpectrumFade();
|
||||||
|
|
||||||
|
// Dibuja las notificaciones
|
||||||
|
void renderNotifications();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// Constructor
|
// Constructor
|
||||||
Screen(SDL_Window *window, SDL_Renderer *renderer, Asset *asset, options_t *options, int gameInternalResX, int gameInternalResY);
|
Screen(SDL_Window *window, SDL_Renderer *renderer, Asset *asset, options_t *options, int gameInternalResX, int gameInternalResY);
|
||||||
|
|||||||
Reference in New Issue
Block a user