mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-12 22:51:11 +00:00
SHERLOCK: RT: Fix looking at characters
This commit is contained in:
parent
03fbbbb3ae
commit
169f4b94f2
@ -63,13 +63,18 @@ void TattooUserInterface::initScrollVars() {
|
||||
}
|
||||
|
||||
void TattooUserInterface::lookAtObject() {
|
||||
Events &events = *_vm->_events;
|
||||
People &people = *_vm->_people;
|
||||
Scene &scene = *_vm->_scene;
|
||||
Sound &sound = *_vm->_sound;
|
||||
Talk &talk = *_vm->_talk;
|
||||
Common::Point mousePos = events.mousePos();
|
||||
Common::String desc;
|
||||
int cAnimSpeed = 0;
|
||||
|
||||
_lookPos = mousePos;
|
||||
_menuMode = LOOK_MODE;
|
||||
|
||||
if (_personFound) {
|
||||
desc = people[_bgFound - 1000]._examine;
|
||||
} else {
|
||||
@ -184,6 +189,7 @@ void TattooUserInterface::printObjectDesc(const Common::String &str, bool firstT
|
||||
|
||||
// Show text dialog
|
||||
_textWidget.load(str);
|
||||
_textWidget.summonWindow();
|
||||
|
||||
if (firstTime)
|
||||
_selector = _oldSelector = -1;
|
||||
|
@ -76,7 +76,9 @@ void WidgetBase::draw() {
|
||||
|
||||
if (_bounds.width() > 0 && !_surface.empty()) {
|
||||
// Get the area to draw, adjusted for scroll position
|
||||
restrictToScreen();
|
||||
Common::Rect bounds = _bounds;
|
||||
|
||||
bounds.translate(currentScroll.x, currentScroll.y);
|
||||
|
||||
// Draw the background for the widget
|
||||
@ -148,7 +150,7 @@ Common::String WidgetBase::splitLines(const Common::String &str, Common::StringA
|
||||
return *strP ? Common::String(strP) : Common::String();
|
||||
}
|
||||
|
||||
void WidgetBase::checkMenuPosition() {
|
||||
void WidgetBase::restrictToScreen() {
|
||||
if (_bounds.left < 0)
|
||||
_bounds.moveTo(0, _bounds.top);
|
||||
if (_bounds.top < 0)
|
||||
|
@ -51,7 +51,7 @@ protected:
|
||||
/**
|
||||
* Ensure that menu is drawn entirely on-screen
|
||||
*/
|
||||
void checkMenuPosition();
|
||||
void restrictToScreen();
|
||||
|
||||
/**
|
||||
* Draw a window frame around the dges of the passed surface
|
||||
|
@ -287,7 +287,7 @@ void WidgetInventory::load(int mode) {
|
||||
}
|
||||
|
||||
// Ensure menu will be on-screen
|
||||
checkMenuPosition();
|
||||
restrictToScreen();
|
||||
|
||||
// Load the inventory data
|
||||
inv.loadInv();
|
||||
|
Loading…
x
Reference in New Issue
Block a user