mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-14 16:07:39 +00:00
MACVENTURE: Fix temporal window reallocation
This commit is contained in:
parent
8aec5e1cdb
commit
b35ef40895
@ -856,10 +856,14 @@ ObjID MacVentureEngine::getParent(ObjID objID) {
|
||||
}
|
||||
|
||||
Common::Rect MacVentureEngine::getObjBounds(ObjID objID) {
|
||||
BorderBounds bounds = _gui->borderBounds(_gui->getWindowData(findParentWindow(objID)).type); // HACK
|
||||
Common::Point pos = getObjPosition(objID);
|
||||
pos.x += bounds.leftOffset;
|
||||
pos.y += bounds.topOffset;
|
||||
|
||||
WindowReference win = findParentWindow(objID);
|
||||
if (win != kNoWindow) { // If it's not in a window YET, we don't really care about the border
|
||||
BorderBounds bounds = _gui->borderBounds(_gui->getWindowData(win).type); // HACK
|
||||
pos.x += bounds.leftOffset;
|
||||
pos.y += bounds.topOffset;
|
||||
}
|
||||
uint w = _gui->getObjWidth(objID); // This shouldn't go here
|
||||
uint h = _gui->getObjHeight(objID);
|
||||
return Common::Rect(pos.x, pos.y, pos.x + w, pos.y + h);
|
||||
|
Loading…
x
Reference in New Issue
Block a user