forked from jaildesigner-jailgames/jaildoctors_dilemma
Afegit globalEvents
This commit is contained in:
24
source/global_events.cpp
Normal file
24
source/global_events.cpp
Normal file
@@ -0,0 +1,24 @@
|
||||
#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_QUIT)
|
||||
{
|
||||
options.section.name = SECTION_QUIT;
|
||||
return;
|
||||
}
|
||||
|
||||
if (event.type == SDL_RENDER_DEVICE_RESET || event.type == SDL_RENDER_TARGETS_RESET)
|
||||
{
|
||||
//reLoadTextures();
|
||||
}
|
||||
|
||||
Mouse::handleEvent(event);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user