#include "global_events.h" #include // Para SDL_WINDOWEVENT_SIZE_CHANGED #include // Para char_traits, basic_ostream, operator<< #include "mouse.h" // Para handleEvent #include "section.h" // Para Name, Options, name, options namespace globalEvents { // Comprueba los eventos que se pueden producir en cualquier sección del juego void check(const SDL_Event &event) { switch (event.type) { case SDL_EVENT_QUIT: // Evento de salida de la aplicación section::name = section::Name::QUIT; section::options = section::Options::QUIT_FROM_EVENT; return; case SDL_EVENT_RENDER_DEVICE_RESET: case SDL_EVENT_RENDER_TARGETS_RESET: std::cout << "SDL_RENDER_TARGETS_RESET" << std::endl; break; case SDL_EVENT_WINDOW_RESIZED: std::cout << "SDL_WINDOWEVENT_SIZE_CHANGED" << std::endl; break; default: break; } Mouse::handleEvent(event); } }