Tweaks to event handling to fix keyboard navigation and dialogs (more work still needed)

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@4005 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2009-09-05 16:08:13 +00:00
parent 10b589b168
commit 27b4537cd2
2 changed files with 5 additions and 4 deletions

View File

@ -52,7 +52,7 @@ bool EventHandler::OnEvent (const SEvent &event)
else
{
// FIXME : it's a bit unclean that all input events go trough the gui module
const bool blockPropagation = input_manager->input(event) && !ModalDialog::isADialogActive();
const bool blockPropagation = input_manager->input(event);
return blockPropagation;
}

View File

@ -40,8 +40,8 @@
#include "modes/world.hpp"
#include "race/history.hpp"
#include "race/race_manager.hpp"
#include "states_screens/options_screen.hpp"
#include "states_screens/kart_selection.hpp"
#include "states_screens/options_screen.hpp"
#include "states_screens/state_manager.hpp"
InputManager *input_manager;
@ -506,8 +506,9 @@ bool InputManager::input(const SEvent& event)
}
#endif
// block events in all modes but initial menus (except in text boxes to allow typing)
return getDeviceList()->playerAssignMode() != NO_ASSIGN && !GUIEngine::isWithinATextBox;
// block events in all modes but initial menus (except in text boxes to allow typing, and exceptm in modal dialogs in-game)
return getDeviceList()->playerAssignMode() != NO_ASSIGN && !GUIEngine::isWithinATextBox &&
(!GUIEngine::ModalDialog::isADialogActive() && StateManager::get()->isGameState());
}
//-----------------------------------------------------------------------------