forked from jaildesigner-jailgames/jaildoctors_dilemma
24 lines
657 B
C++
24 lines
657 B
C++
#include "global_events.h"
|
|
#include "options.h" // Para Options, options, OptionsGame, OptionsAudio
|
|
#include "mouse.h"
|
|
|
|
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 = Section::QUIT;
|
|
return;
|
|
}
|
|
|
|
if (event.type == SDL_EVENT_RENDER_DEVICE_RESET || event.type == SDL_EVENT_RENDER_TARGETS_RESET)
|
|
{
|
|
// reLoadTextures();
|
|
}
|
|
|
|
Mouse::handleEvent(event);
|
|
}
|
|
} |