Slightly cleaned up some code in event handler

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5356 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2010-05-03 00:50:11 +00:00
parent 58812b6dbe
commit 57c4a77a76

View File

@ -48,13 +48,15 @@ EventHandler::~EventHandler()
bool EventHandler::OnEvent (const SEvent &event)
{
if (event.EventType == EET_GUI_EVENT ||
(GUIEngine::getStateManager()->getGameState() != GUIEngine::GAME && event.EventType != EET_KEY_INPUT_EVENT &&
event.EventType != EET_JOYSTICK_INPUT_EVENT)
)
if (event.EventType == EET_GUI_EVENT)
{
return onGUIEvent(event) == EVENT_BLOCK;
}
else if (GUIEngine::getStateManager()->getGameState() != GUIEngine::GAME &&
event.EventType != EET_KEY_INPUT_EVENT && event.EventType != EET_JOYSTICK_INPUT_EVENT)
{
return false; // EVENT_LET
}
else if (event.EventType == EET_MOUSE_INPUT_EVENT ||
event.EventType == EET_KEY_INPUT_EVENT ||
event.EventType == EET_JOYSTICK_INPUT_EVENT)