[Scummvm-git-logs] scummvm master -> 5fec5a992accdcd8299e4871edd82df85df2e364
sev-
noreply at scummvm.org
Tue Nov 14 11:30:55 UTC 2023
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
5fec5a992a CRAB: Fix wrong keymap being set in the Dialog Box
Commit: 5fec5a992accdcd8299e4871edd82df85df2e364
https://github.com/scummvm/scummvm/commit/5fec5a992accdcd8299e4871edd82df85df2e364
Author: Aditya (adityamurali003 at gmail.com)
Date: 2023-11-14T12:30:52+01:00
Commit Message:
CRAB: Fix wrong keymap being set in the Dialog Box
Now pressing enter key loads the next statement of the character in the
dialog box.
Changed paths:
engines/crab/ui/dialogbox.cpp
diff --git a/engines/crab/ui/dialogbox.cpp b/engines/crab/ui/dialogbox.cpp
index afe9a67721d..e50558619e7 100644
--- a/engines/crab/ui/dialogbox.cpp
+++ b/engines/crab/ui/dialogbox.cpp
@@ -83,7 +83,18 @@ void GameDialogBox::draw(pyrodactyl::event::Info &info, Common::String &message)
// Purpose: Handle input
//------------------------------------------------------------------------
bool GameDialogBox::handleEvents(const Common::Event &event) {
- return (_button.handleEvents(event) == BUAC_LCLICK);
+ // Switch to KBM_UI
+ if (g_engine->_inputManager->getKeyBindingMode() != KBM_UI)
+ g_engine->_inputManager->setKeyBindingMode(KBM_UI);
+
+ bool isLeftClick = (_button.handleEvents(event) == BUAC_LCLICK);
+
+ if (isLeftClick) {
+ // Switch to KBM_GAME
+ g_engine->_inputManager->setKeyBindingMode(KBM_GAME);
+ }
+
+ return isLeftClick;
}
void GameDialogBox::setUI() {
More information about the Scummvm-git-logs
mailing list