21 lines
663 B
C++
21 lines
663 B
C++
#include "utils/global_events.hpp"
|
|
|
|
#include "core/input/mouse.hpp"
|
|
#include "game/gameplay/options.hpp" // Para Options, options, OptionsGame, OptionsAudio
|
|
|
|
namespace globalEvents {
|
|
// Comprueba los eventos que se pueden producir en cualquier sección del juego
|
|
void check(const SDL_Event& event) {
|
|
// Evento de salida de la aplicación
|
|
if (event.type == SDL_EVENT_QUIT) {
|
|
Options::section.section = Options::Scene::QUIT;
|
|
return;
|
|
}
|
|
|
|
if (event.type == SDL_EVENT_RENDER_DEVICE_RESET || event.type == SDL_EVENT_RENDER_TARGETS_RESET) {
|
|
// reLoadTextures();
|
|
}
|
|
|
|
Mouse::handleEvent(event);
|
|
}
|
|
} // namespace globalEvents
|