CRAB: Fix keymap not being changed in hud elements

Now the keymap is correctly set to KBM_GAME instead of KBM_UI after
Hud elements are closed.
This commit is contained in:
Aditya 2023-11-14 17:17:03 +05:30 committed by Eugene Sandulenko
parent aa362ca3d4
commit d84bcb3340

View File

@ -804,6 +804,11 @@ void Game::toggleState(const State &s) {
else
_state = STATE_GAME;
// If we are in game state switch to KBM_GAME
if (_state == STATE_GAME && g_engine->_inputManager->getKeyBindingMode() != KBM_GAME) {
g_engine->_inputManager->setKeyBindingMode(KBM_GAME);
}
// This is because game is the first state, the rest are in order
_hud.State(_state - 1);
_hud._pause.reset();