#include "global_events.h" #include // Para SDL_LogInfo, SDL_LogCategory #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::NONE; return; case SDL_EVENT_RENDER_DEVICE_RESET: case SDL_EVENT_RENDER_TARGETS_RESET: SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, "SDL_RENDER_TARGETS_RESET"); break; case SDL_EVENT_WINDOW_RESIZED: SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, "SDL_WINDOWEVENT_SIZE_CHANGED"); break; default: break; } Mouse::handleEvent(event); } }