Skip to content

Commit

Permalink
TWINE: enable the ui bindings for the inventory menu
Browse files Browse the repository at this point in the history
  • Loading branch information
mgerhardy committed Oct 26, 2020
1 parent 74896d1 commit 4f638d3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions engines/twine/menu.cpp
Expand Up @@ -23,6 +23,7 @@
#include "twine/menu.h"
#include "audio/mixer.h"
#include "backends/audiocd/audiocd.h"
#include "backends/keymapper/keymapper.h"
#include "common/config-manager.h"
#include "common/events.h"
#include "common/keyboard.h"
Expand Down Expand Up @@ -1024,6 +1025,9 @@ void Menu::processInventoryMenu() {
_engine->_text->setFontCrossColor(4);
_engine->_text->initDialogueBox();

Common::Keymapper *keymapper = g_system->getEventManager()->getKeymapper();
keymapper->getKeymap(uiKeyMapId)->setEnabled(true);

while (_engine->_input->isActionActive(TwinEActionType::InventoryMenu)) {
_engine->readKeys();
int32 prevSelectedItem = inventorySelectedItem;
Expand Down Expand Up @@ -1110,6 +1114,8 @@ void Menu::processInventoryMenu() {
}
}

keymapper->getKeymap(uiKeyMapId)->setEnabled(false);

_engine->_text->printTextVar13 = 0;

_engine->_scene->alphaLight = tmpAlphaLight;
Expand Down

0 comments on commit 4f638d3

Please sign in to comment.