[Scummvm-git-logs] scummvm master -> 2d15dcefad3df37bc9d944e0f7a629fea6ee2ad5
eriktorbjorn
noreply at scummvm.org
Mon Dec 20 12:11:56 UTC 2021
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:
2d15dcefad SHERLOCK: Fix glitch in Rose Tattoo save dialog
Commit: 2d15dcefad3df37bc9d944e0f7a629fea6ee2ad5
https://github.com/scummvm/scummvm/commit/2d15dcefad3df37bc9d944e0f7a629fea6ee2ad5
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2021-12-20T13:11:42+01:00
Commit Message:
SHERLOCK: Fix glitch in Rose Tattoo save dialog
This would happen when either clicking on an empty slot or when using
the Delete key. It was caused by using the screen coordinates, rather
than the surface coordinates, when specifying the rightmost edge of the
area to clear.
Changed paths:
engines/sherlock/tattoo/widget_files.cpp
diff --git a/engines/sherlock/tattoo/widget_files.cpp b/engines/sherlock/tattoo/widget_files.cpp
index bbb51b6e0e..a980c823b8 100644
--- a/engines/sherlock/tattoo/widget_files.cpp
+++ b/engines/sherlock/tattoo/widget_files.cpp
@@ -266,7 +266,7 @@ bool WidgetFiles::getFilename() {
if (isSlotEmpty(_selector)) {
index = 0;
- _surface.fillRect(Common::Rect(pt.x, pt.y, _bounds.right - BUTTON_SIZE - 9, pt.y + _surface.fontHeight()), TRANSPARENCY);
+ _surface.fillRect(Common::Rect(pt.x, pt.y, _bounds.width() - BUTTON_SIZE - 9, pt.y + _surface.fontHeight()), TRANSPARENCY);
filename = "";
} else {
index = filename.size();
@@ -373,7 +373,7 @@ bool WidgetFiles::getFilename() {
} else if (keyState.keycode == Common::KEYCODE_DELETE && index < (int)filename.size()) {
filename.deleteChar(index);
- _surface.fillRect(Common::Rect(pt.x, pt.y, _bounds.right - BUTTON_SIZE - 9, pt.y + _surface.fontHeight()), TRANSPARENCY);
+ _surface.fillRect(Common::Rect(pt.x, pt.y, _bounds.width() - BUTTON_SIZE - 9, pt.y + _surface.fontHeight()), TRANSPARENCY);
_surface.writeString(Common::String(filename.c_str() + index), pt, COMMAND_HIGHLIGHTED);
} else if (keyState.keycode == Common::KEYCODE_RETURN) {
done = 1;
More information about the Scummvm-git-logs
mailing list