aboutsummaryrefslogtreecommitdiff
path: root/engines/sherlock/tattoo/widget_base.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2015-07-07 21:25:55 -0400
committerPaul Gilbert2015-07-07 21:25:55 -0400
commited2caf7cd64ad16110dba763ebda8bbbdb69a244 (patch)
treefb81e1c4261172c9c3c9e34d2c2c1e141c4e23ff /engines/sherlock/tattoo/widget_base.cpp
parent47aa40104d11d92ea3c53390851e719d133fc7b9 (diff)
downloadscummvm-rg350-ed2caf7cd64ad16110dba763ebda8bbbdb69a244.tar.gz
scummvm-rg350-ed2caf7cd64ad16110dba763ebda8bbbdb69a244.tar.bz2
scummvm-rg350-ed2caf7cd64ad16110dba763ebda8bbbdb69a244.zip
SHERLOCK: RT: Fix display of verb menu in wide-screen scenes
Diffstat (limited to 'engines/sherlock/tattoo/widget_base.cpp')
-rw-r--r--engines/sherlock/tattoo/widget_base.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/engines/sherlock/tattoo/widget_base.cpp b/engines/sherlock/tattoo/widget_base.cpp
index 10b8ad8dec..d946c46e4c 100644
--- a/engines/sherlock/tattoo/widget_base.cpp
+++ b/engines/sherlock/tattoo/widget_base.cpp
@@ -141,12 +141,14 @@ Common::String WidgetBase::splitLines(const Common::String &str, Common::StringA
}
void WidgetBase::restrictToScreen() {
+ Screen &screen = *_vm->_screen;
+
if (_bounds.left < 0)
_bounds.moveTo(0, _bounds.top);
if (_bounds.top < 0)
_bounds.moveTo(_bounds.left, 0);
- if (_bounds.right > SHERLOCK_SCREEN_WIDTH)
- _bounds.moveTo(SHERLOCK_SCREEN_WIDTH - _bounds.width(), _bounds.top);
+ if (_bounds.right > screen._backBuffer1.w())
+ _bounds.moveTo(screen._backBuffer1.w() - _bounds.width(), _bounds.top);
if (_bounds.bottom > SHERLOCK_SCREEN_HEIGHT)
_bounds.moveTo(_bounds.left, SHERLOCK_SCREEN_HEIGHT - _bounds.height());
}
@@ -243,7 +245,7 @@ void WidgetBase::drawScrollBar(int index, int pageSize, int count) {
void WidgetBase::handleScrollbarEvents(int index, int pageSize, int count) {
Events &events = *_vm->_events;
TattooUserInterface &ui = *(TattooUserInterface *)_vm->_ui;
- Common::Point mousePos = events.mousePos();
+ Common::Point mousePos = events.sceneMousePos();
// If they have selected the sollbar, return with the Scroll Bar Still selected
if (ui._scrollHighlight == 3)