aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2015-07-15 07:41:54 -0400
committerPaul Gilbert2015-07-15 07:41:54 -0400
commit18406818ebcf0aa40f9c881742d366931f16fb1a (patch)
tree457e8570a99a0dbcc78dc66cee2262b951491912
parent40dee7d9668423908998cf2d823eec15a39a1f3d (diff)
downloadscummvm-rg350-18406818ebcf0aa40f9c881742d366931f16fb1a.tar.gz
scummvm-rg350-18406818ebcf0aa40f9c881742d366931f16fb1a.tar.bz2
scummvm-rg350-18406818ebcf0aa40f9c881742d366931f16fb1a.zip
SHERLOCK: RT: Fix map tooltip display when map is scrolled
-rw-r--r--engines/sherlock/tattoo/widget_base.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/sherlock/tattoo/widget_base.cpp b/engines/sherlock/tattoo/widget_base.cpp
index 905dd31be0..9b8569c590 100644
--- a/engines/sherlock/tattoo/widget_base.cpp
+++ b/engines/sherlock/tattoo/widget_base.cpp
@@ -147,10 +147,10 @@ void WidgetBase::restrictToScreen() {
_bounds.moveTo(screen._currentScroll.x, _bounds.top);
if (_bounds.top < 0)
_bounds.moveTo(_bounds.left, 0);
- if (_bounds.right > SHERLOCK_SCENE_WIDTH)
- _bounds.moveTo(SHERLOCK_SCENE_WIDTH - _bounds.width(), _bounds.top);
- if (_bounds.bottom > SHERLOCK_SCREEN_HEIGHT)
- _bounds.moveTo(_bounds.left, SHERLOCK_SCREEN_HEIGHT - _bounds.height());
+ if (_bounds.right > screen._backBuffer1.w())
+ _bounds.moveTo(screen._backBuffer1.w() - _bounds.width(), _bounds.top);
+ if (_bounds.bottom > screen._backBuffer1.h())
+ _bounds.moveTo(_bounds.left, screen._backBuffer1.h() - _bounds.height());
}
void WidgetBase::makeInfoArea(Surface &s) {