EditableWidget took over keyboard events targeted towards Debugger and
List. This commit fixes it by reverting some part of the code to its
original state.
Fixes issues caused by PR #5366
This matches also the behavior as set in engines/metaengine.cpp MetaEngine::initKeymaps()
This change is needed at least to avoid a hack on Android. Setting the "kdbRepeat" flag
for events of keeping the arrow keys pressed (on the touch virtual keyboard), as Android supports,
would not work to eg. keep going through a list upwards or downwards with the respective
arrow key pressed. Instead we had to hack the behavior of a physical keyboard which
sents multiple keypresses (keydown and keyup events), without setting the kbdRepeat flag.
However, this hack would work poorly in some game engines (eg. in LBA while rotating Twinsen,
the movement becomes "stuttering"). In-games the kbdRepeat flags is respected already due
to the setting in engines/metaengine.cpp (as far as I can tell) and resulting movement is
more fluid.
#4953 optimized redrawing of the top dialog in commit f824f8a. This
however broke console's sliding up as the code in question depended on
the fact that it was internally equivalent to a full redraw.
When calling any of:
- Widget::setEnabled
- EditTextWidget::setEditString
- EditableWidget::setEditString
- StaticTextWidget::setLabel
there is no need to call neither GuiManager::scheduleTopDialogRedraw nor
Widget::markAsDirty afterwards -- they set up the call by themselves.
Also, refactor a couple of code blocks into calling just
GuiManager::redrawFull as it does the same thing.
Unfortunately, it is not that simple. Tooltip may be placed also outside
of the dialog. Current implementation leaves tooltip leftovers over
the dialog below the topmost one, so reverting until I find a correct
way to achieve the goal.
This reverts commit 19b7b2aa20.
The icons download dialog was triggering the grid launcher update after
icons had been downloaded. But that means no update was done if the
dialog had been closed during the download.
Now the GUIManager triggers the update. This fixes the missing update
when hiding the download dialog while downloading an icon set.
GuiManager::initIconsSet is called from a callback of the iconset
download dialog, which runs in a separate thread. That means the
iconset can be accessed from two separate thread (the GUI thread,
and the download thread).
This was not an issue until the previous commit as closing the
download dialog while a download was ongoing would crash ScummVM.
But now that the crash is fixed, a race condition was possible.
Currently, the text-to-speech manager will try to update the voices whenever TextToSpeechManager::pushState()/popState() is called. This causes lags of 4 - 5 seconds on Windows. Also, a warning is triggered each time. This commit prevents that from happening if the tts option is not enabled.
This commit currently affects only Windows. Other backends don't make use of the new _enabled setting. I don't know if it would make sense for any of these and I also wouldn't be able to test it.