diff options
author | Paul Gilbert | 2015-07-26 21:15:57 -0400 |
---|---|---|
committer | Paul Gilbert | 2015-07-26 21:15:57 -0400 |
commit | c2d13695463bd6e98910a3fac6d42853cc29a668 (patch) | |
tree | 4bbcaca57185f1b13c4299cb253451480d898a10 /engines/sherlock/tattoo/widget_base.cpp | |
parent | 20a067a66266ab63270b65994a8ab35ff398c7d2 (diff) | |
download | scummvm-rg350-c2d13695463bd6e98910a3fac6d42853cc29a668.tar.gz scummvm-rg350-c2d13695463bd6e98910a3fac6d42853cc29a668.tar.bz2 scummvm-rg350-c2d13695463bd6e98910a3fac6d42853cc29a668.zip |
SHERLOCK: RT: Stop windows from going off-screen to the right
Diffstat (limited to 'engines/sherlock/tattoo/widget_base.cpp')
-rw-r--r-- | engines/sherlock/tattoo/widget_base.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/sherlock/tattoo/widget_base.cpp b/engines/sherlock/tattoo/widget_base.cpp index 57d2fe0d6c..539d4a2f02 100644 --- a/engines/sherlock/tattoo/widget_base.cpp +++ b/engines/sherlock/tattoo/widget_base.cpp @@ -177,8 +177,8 @@ void WidgetBase::restrictToScreen() { _bounds.moveTo(screen._currentScroll.x, _bounds.top); if (_bounds.top < 0) _bounds.moveTo(_bounds.left, 0); - if (_bounds.right > screen._backBuffer1.w()) - _bounds.moveTo(screen._backBuffer1.w() - _bounds.width(), _bounds.top); + if (_bounds.right > (screen._currentScroll.x + SHERLOCK_SCREEN_WIDTH)) + _bounds.moveTo(screen._currentScroll.x + SHERLOCK_SCREEN_WIDTH - _bounds.width(), _bounds.top); if (_bounds.bottom > screen._backBuffer1.h()) _bounds.moveTo(_bounds.left, screen._backBuffer1.h() - _bounds.height()); } |