[Scummvm-git-logs] scummvm master -> 8749ae06448a18eca56ece5507ad1695ee08aab8
criezy
criezy at scummvm.org
Wed Aug 26 23:51:20 UTC 2020
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:
8749ae0644 Ultima8: Use kFeatureVirtualKeyboard in text mode
Commit: 8749ae06448a18eca56ece5507ad1695ee08aab8
https://github.com/scummvm/scummvm/commit/8749ae06448a18eca56ece5507ad1695ee08aab8
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2020-08-27T00:47:04+01:00
Commit Message:
Ultima8: Use kFeatureVirtualKeyboard in text mode
This means that it now automatically shows the virtual keyboard
when entering text mode, and hides it when leaving text mode.
There is a potential issue that entering text mode is done for any
ModalGump, which includes things like the credits and movies, and
it is strange to see the virtual keyboard popup when a movie
starts (even though it allows skipping it with the Esc key). So
maybe we should check the Gump type when entering and leaving the
text mode to only show/hide the virtual keyboard for the MenuGump.
This fixes bug #11624
Changed paths:
engines/ultima/ultima8/ultima8.cpp
diff --git a/engines/ultima/ultima8/ultima8.cpp b/engines/ultima/ultima8/ultima8.cpp
index faefa8652c..4d7eb88439 100644
--- a/engines/ultima/ultima8/ultima8.cpp
+++ b/engines/ultima/ultima8/ultima8.cpp
@@ -390,6 +390,8 @@ void Ultima8Engine::shutdownGame(bool reloading) {
// Save config here....
+ if (!_textModes.empty())
+ g_system->setFeatureState(OSystem::kFeatureVirtualKeyboard, false);
_textModes.clear();
// reset mouse cursor
@@ -736,6 +738,8 @@ bool Ultima8Engine::LoadConsoleFont(Std::string confontini) {
}
void Ultima8Engine::enterTextMode(Gump *gump) {
+ if (_textModes.empty())
+ g_system->setFeatureState(OSystem::kFeatureVirtualKeyboard, true);
if (!_textModes.empty()) {
_textModes.remove(gump->getObjId());
}
@@ -745,6 +749,8 @@ void Ultima8Engine::enterTextMode(Gump *gump) {
void Ultima8Engine::leaveTextMode(Gump *gump) {
if (!_textModes.empty())
_textModes.remove(gump->getObjId());
+ if (_textModes.empty())
+ g_system->setFeatureState(OSystem::kFeatureVirtualKeyboard, false);
}
void Ultima8Engine::handleEvent(const Common::Event &event) {
@@ -1043,6 +1049,8 @@ void Ultima8Engine::resetEngine() {
_scalerGump = nullptr;
_inverterGump = nullptr;
+ if (!_textModes.empty())
+ g_system->setFeatureState(OSystem::kFeatureVirtualKeyboard, false);
_textModes.clear();
// reset mouse cursor
More information about the Scummvm-git-logs
mailing list