[Scummvm-git-logs] scummvm master -> 13bd7a59ca7cb9825eea181e645d963fc6e500df
neuromancer
noreply at scummvm.org
Mon Nov 13 14:53:29 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:
13bd7a59ca HYPNO: allow better menu navigation in wet when using touchscreen
Commit: 13bd7a59ca7cb9825eea181e645d963fc6e500df
https://github.com/scummvm/scummvm/commit/13bd7a59ca7cb9825eea181e645d963fc6e500df
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2023-11-13T15:49:30+01:00
Commit Message:
HYPNO: allow better menu navigation in wet when using touchscreen
Changed paths:
engines/hypno/wet/hard.cpp
diff --git a/engines/hypno/wet/hard.cpp b/engines/hypno/wet/hard.cpp
index aee02a0eb53..299e6b93ca2 100644
--- a/engines/hypno/wet/hard.cpp
+++ b/engines/hypno/wet/hard.cpp
@@ -258,11 +258,25 @@ void WetEngine::runMainMenu(Code *code) {
case Common::EVENT_RETURN_TO_LAUNCHER:
break;
+ case Common::EVENT_LBUTTONDOWN:
case Common::EVENT_KEYDOWN:
- if (event.kbd.keycode == Common::KEYCODE_LEFT && idx > 0) {
+ if (!g_system->hasFeature(OSystem::kFeatureTouchscreen))
+ event.mouse = Common::Point(0, 0);
+
+ if (idx == 1 && (subDamp.contains(event.mouse) || subSoaked.contains(event.mouse))) {
+ if (subDamp.contains(event.mouse)) {
+ playSound("sound/no_rapid.raw", 1, 11025);
+ idx--;
+ } else if (subSoaked.contains(event.mouse)) {
+ playSound("sound/no_rapid.raw", 1, 11025);
+ idx++;
+ }
+ } else if (idx == 1 && subWet.contains(event.mouse)) {
+ // Nothing
+ } else if ((subWet.contains(event.mouse) || subDamp.contains(event.mouse) || event.kbd.keycode == Common::KEYCODE_LEFT) && idx > 0) {
playSound("sound/no_rapid.raw", 1, 11025);
idx--;
- } else if (event.kbd.keycode == Common::KEYCODE_RIGHT && idx < 2) {
+ } else if ((subWet.contains(event.mouse) || subSoaked.contains(event.mouse) || event.kbd.keycode == Common::KEYCODE_RIGHT) && idx < 2) {
playSound("sound/no_rapid.raw", 1, 11025);
idx++;
} else if (event.kbd.keycode == Common::KEYCODE_RETURN)
More information about the Scummvm-git-logs
mailing list