Opened 2 months ago
Last modified 7 weeks ago
#15265 new defect
TINSEL: Virtual keyboard gets hidden when skipping cutscenes or at the end of cutscenes
Reported by: | i30817 | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | Engine: Tinsel |
Version: | Keywords: | android virtual keyboard hide cutscenes | |
Cc: | Game: | Discworld |
Description
This is slightly annoying when in a game with several animations where clicking the mouse to skip them is not possible.
As a alternative to close the screen the top right controller\pointer type button already exists, or if you want to add a new one, clicking outside the virtual keyboard.
I first got annoyed by this in discworld 1, a game where some animations can't be skipped by the mouse but ESC can do it. Unfortunately act 2 is structured like a fetch quest of several items that require manipulation of several locations always separated by 2 long animations, and you'll see them dozens of times if you solve the puzzles naturally.
So you'll open the keyboard with long press, click the symbolic key, finally click esc, and do it again if you don't want to wait about 1 minute every time...
Change History (8)
comment:1 by , 2 months ago
comment:2 by , 2 months ago
As far as I can tell, the keymapper tab, through ScummVM's launcher's Game Options) for this game, allows to map the skip action (by default mapped to Esc key) to any other key. Wouldn't that help?
I suppose, like in other games, we could use a more specific keymapper for all their particular hotkey actions. For some games this is implemented, for others it's not; currently there's work done regarding keymapper support for many engines, but I'm not following that closely.
But in this case, mapping the skip action to a key or mouse action should do the trick, I believe.
comment:3 by , 8 weeks ago
I didn't know it was possible to remap (and it's good to know).
I think it's likely that in android mapping to the mouse interface is impossible in most games (that is, all the slots are filled for normal game actions and there is not key 3 in android unless you want to introduce a gesture, like long touch).
So I'd still would prefer if esc didn't actually affect the virtual keyboard in android only, if the default for skips won't actually be changed there. But if you can convince people to make the default skip action the long touch android gesture, even better.
comment:4 by , 8 weeks ago
Well. Long touch and release in the game area. Because people might long touch by accident or touch centered habit, but if you give them a out of not lifting their finger, they'll learn not to do it if they don't want to skip.
comment:5 by , 8 weeks ago
So, I admit I'm a bit confused about what is the issue with the virtual keyboard now.
I originally thought that it was that "touching" the "Esc" button on the virtual keyboard would hide the virtual keyboard, but I've just tested that (on ScummVM 2.9 dev build, but I don't think we've changed virtual keyboard behavior since 2.8.1 at all) and the virtual keyboard is not being hidden. Furthermore, the key is set as repeatable so you can hold it "down" (aka keep touching on it) and it will skip cutscenes/animations etc, as long as the engine and game support skipping animations using Esc (or support a key mapping for this action that the user has set to Esc).
Mapping actions to long touch events is not something we're currently considering, as it would break the current hardcoded differentiation of the long touch event based on the duration of touching (so that can be interpreted as either simple tap (left click), long tap (right click) and longer tap (middle click)). You are allowed however to map those events (left click, right click, middle click) to a mappable action by using ScummVM's keymapper, although personally I wouldn't recommend mapping actions to left click or right click which are probably also used already for something else in a point and click adventure. But you can do it, as long as you're certain about it, and you can always revert to the default mapping anyway.
So, again, I am unsure what is asked here. It also seems to me that this is more of a "Feature Request" rather than a "Defect" but I'm still confused as to what is requested, that is not in the app already.
comment:6 by , 7 weeks ago
originally thought that it was that "touching" the "Esc" button on the virtual keyboard would hide the virtual keyboard, but I've just tested that
This is what happens, both in game and just with the cursor focus on the game search entry in the game list. I just have to select the text entry field (without it esc exits scummvm from the game list), then press the 123... button to show esc, then show esc. This also happens in discworld 1 if it's supposed to close in text fields.
Note that the android virtual keyboard looks different from it on a PC (doesn't show the Fkeys right away) so it takes a different code path.
My scummvm version according to the about button is 2.8.0
comment:7 by , 7 weeks ago
There are a couple of different things mixed in your above post:
Some widgets in the ScummVM GUI do have certain events attached to them that will show or hide the virtual keyboard (like a text field gaining focus will show the virtual keyboard, an Esc or Return key while a text field is focused will hide the virtual keyboard -- there's also some behavior for hiding the virtual keyboard when selecting an item from a list etc).
Also while in-game, if the virtual keyboard is shown, calling for the ScummVM Global Menu will hide the virtual keyboard.
And on the ScummVM launcher, the "Esc" key causes ScummVM to quit, if a text field is not in focus. If a text field is in focus, the Esc key will prioritize first losing the focus of the text field.
Those are by design, part of the native ScummVM code, and not Android specific behavior.
Searching the ScummVM source code for instances of:
g_system->setFeatureState(OSystem::kFeatureVirtualKeyboard, true);
and
g_system->setFeatureState(OSystem::kFeatureVirtualKeyboard, false);
reveals other places (engine specific ones) that set the virtual keyboard as hidden or shown, on the native side of the code.
Now, albeit those are not Android specific, the Android virtual keyboard *does not* pause an engine like the "native" ScummVM virtual keyboard does (that is by design and a good thing in my opinion), and that means that on Android you can keep watching a cutscene while the keyboard is shown. This exposes some issues that we may have not caught while testing on the main platforms (eg. Windows/Linux/Mac). Because, if during that cutscene or at the end of the cutscene, some event or engine specific action explicitly "orders" the keyboard to be hidden, then it will be hidden.
This seems to be the case in the Tinsel engine in particular, too. If you are showing the keyboard when the game launches, it will be automatically hidden when the first intro cutscene ends. And it will keep doing that with subsequent cutscenes, without even pressing any key. Since Esc key does skip a cutscene, what happens is that it goes directly to the end of the cutscene and then the engine tells the keyboard to be hidden. Again, this is not Android specific, it's in the engine's code.
The culprit seems to be in this particular case (Tinsel engine) the method Dialogs::killInventory(), which does explicitly hide the virtual keyboard, but it seems to be called from many places for, what I think is, making absolutely sure the inventory is not shown in various situations. And one of those places is at the end of cutscenes.
https://github.com/scummvm/scummvm/blob/dbb1a6a014459c15c48fc386fdd3010816441ef8/engines/tinsel/dialogs.cpp#L3828
https://github.com/scummvm/scummvm/blob/dbb1a6a014459c15c48fc386fdd3010816441ef8/engines/tinsel/scene.cpp#L393
So, the keyboard gets hidden as a side effect of the engine being overly cautious hiding the inventory screen.
If this is considered a defect/bug/issue it should thus be specific for the TINSEL engine and probably be investigated and properly resolved by a developer familiar with the engine (ie. probably not me).
In general, I'd say that the issue reported in this ticket is not Android-specific and, if a fix is required, it should be considered on a specific engine or game basis each time, where the issue appears.
To clarify, as noted in my previous message, other engines and games won't hide the virtual keyboard when skipping cutscenes (with Esc or other key mapped to the skip action). A few examples of this, that I've quick-tested, are Blade Runner, Monkey Island 1, Indiana Jones and the Last Crusade, Indiana Jones and Fate of Atlantis. This is the expected behavior. You are able to just keep your finger on the "Esc" and keep skipping cutscenes back to back.
comment:8 by , 7 weeks ago
Component: | Port: Android → Engine: Tinsel |
---|---|
Game: | → Discworld |
Keywords: | virtual hide cutscenes added |
Summary: | ANDROID: Please make virtual keyboard ESC not close the virtual keyboard → TINSEL: Virtual keyboard gets hidden when skipping cutscenes or at the end of cutscenes |
Changing the ticket to indicate the the issue is specific to engine TINSEL and the game Discworld (other engines may have this issue, but it's currently unknown and should be reported separately).
Obviously, it would be better to modify this particular game to make cutscenes skipable with some form of mouse interaction, but I doubt this game is the only one suffering from this annoyance, and discworld 1 probably couldn't be modified for that 'simply' because I remember that you can use the mouse click to skip dialog in cutscenes so consistency would be hard and different from the original anyway, unless using right click or something strange like that.