Trabajando en las notificaciones

This commit is contained in:
2022-11-18 23:15:38 +01:00
parent fdc8797d2b
commit 2216c9632e
3 changed files with 10 additions and 7 deletions

View File

@@ -70,7 +70,7 @@ void Screen::blit()
SDL_RenderCopy(renderer, gameCanvas, nullptr, &dest);
// Dibuja las notificaciones
// renderNotifications();
renderNotifications();
// Muestra por pantalla el renderizador
SDL_RenderPresent(renderer);
@@ -360,10 +360,10 @@ void Screen::showText(std::string text)
// Dibuja las notificaciones
void Screen::renderNotifications()
{
if (!notifyActive)
{
return;
}
// if (!notifyActive)
// {
// return;
// }
SDL_RenderSetLogicalSize(renderer, screenWidth, screenHeight);
notify->render();

View File

@@ -55,12 +55,11 @@ Director::Director(int argc, char *argv[])
initInput();
screen = new Screen(window, renderer, asset, options);
screen->setBorderColor(borderColor);
// screen->setVideoMode(options->videoMode);
debug = new Debug(renderer, screen, asset);
music = JA_LoadMusic(asset->get("title.ogg").c_str());
// Inicializa los servicios online
// initOnline();
initOnline();
}
Director::~Director()

View File

@@ -131,6 +131,10 @@ void Game::checkEventHandler()
case SDL_SCANCODE_D:
goToRoom(BORDER_RIGHT);
break;
case SDL_SCANCODE_F6:
screen->showText("MAMA MIRA! SIN MANOS!");
break;
#endif
case SDL_SCANCODE_M: