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:
parent
10b589b168
commit
27b4537cd2
@ -52,7 +52,7 @@ bool EventHandler::OnEvent (const SEvent &event)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// FIXME : it's a bit unclean that all input events go trough the gui module
|
// 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;
|
return blockPropagation;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,8 +40,8 @@
|
|||||||
#include "modes/world.hpp"
|
#include "modes/world.hpp"
|
||||||
#include "race/history.hpp"
|
#include "race/history.hpp"
|
||||||
#include "race/race_manager.hpp"
|
#include "race/race_manager.hpp"
|
||||||
#include "states_screens/options_screen.hpp"
|
|
||||||
#include "states_screens/kart_selection.hpp"
|
#include "states_screens/kart_selection.hpp"
|
||||||
|
#include "states_screens/options_screen.hpp"
|
||||||
#include "states_screens/state_manager.hpp"
|
#include "states_screens/state_manager.hpp"
|
||||||
InputManager *input_manager;
|
InputManager *input_manager;
|
||||||
|
|
||||||
@ -506,8 +506,9 @@ bool InputManager::input(const SEvent& event)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// block events in all modes but initial menus (except in text boxes to allow typing)
|
// 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;
|
return getDeviceList()->playerAssignMode() != NO_ASSIGN && !GUIEngine::isWithinATextBox &&
|
||||||
|
(!GUIEngine::ModalDialog::isADialogActive() && StateManager::get()->isGameState());
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
Loading…
x
Reference in New Issue
Block a user