#include "GEventManager.h"

#include <SDL/SDL.h>


GEventManager::GEventManager(){
}

GEventManager::~GEventManager(){
}

bool GEventManager::doEvent(){

	bool isRunning = true;

	SDL_Event ev;
	while(SDL_PollEvent(&ev)){
		if(ev.type == SDL_QUIT){
			isRunning = false;
		}else if(ev.type == SDL_KEYDOWN){
			if(ev.key.keysym.sym == SDLK_ESCAPE){
				isRunning = false;
			}
			
		}
	}
	return isRunning;
}
