forked from teamnwah/openmw-tes3coop
Fix initial view offset for large world maps (Fixes #1523)
This commit is contained in:
parent
218f916d6d
commit
8eab3abb15
2 changed files with 3 additions and 6 deletions
|
@ -431,6 +431,9 @@ namespace MWGui
|
||||||
{
|
{
|
||||||
mGlobalMapRender = new MWRender::GlobalMap("");
|
mGlobalMapRender = new MWRender::GlobalMap("");
|
||||||
mGlobalMapRender->render(loadingListener);
|
mGlobalMapRender->render(loadingListener);
|
||||||
|
mGlobalMap->setCanvasSize (mGlobalMapRender->getWidth(), mGlobalMapRender->getHeight());
|
||||||
|
mGlobalMapImage->setSize(mGlobalMapRender->getWidth(), mGlobalMapRender->getHeight());
|
||||||
|
|
||||||
mGlobalMapImage->setImageTexture("GlobalMap.png");
|
mGlobalMapImage->setImageTexture("GlobalMap.png");
|
||||||
mGlobalMapOverlay->setImageTexture("GlobalMapOverlay");
|
mGlobalMapOverlay->setImageTexture("GlobalMapOverlay");
|
||||||
}
|
}
|
||||||
|
@ -512,7 +515,6 @@ namespace MWGui
|
||||||
else
|
else
|
||||||
mGlobalMap->setViewOffset( mGlobalMap->getViewOffset() + diff );
|
mGlobalMap->setViewOffset( mGlobalMap->getViewOffset() + diff );
|
||||||
|
|
||||||
|
|
||||||
mLastDragPos = MyGUI::IntPoint(_left, _top);
|
mLastDragPos = MyGUI::IntPoint(_left, _top);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -536,9 +538,6 @@ namespace MWGui
|
||||||
|
|
||||||
void MapWindow::open()
|
void MapWindow::open()
|
||||||
{
|
{
|
||||||
mGlobalMap->setCanvasSize (mGlobalMapRender->getWidth(), mGlobalMapRender->getHeight());
|
|
||||||
mGlobalMapImage->setSize(mGlobalMapRender->getWidth(), mGlobalMapRender->getHeight());
|
|
||||||
|
|
||||||
// force markers to foreground
|
// force markers to foreground
|
||||||
for (unsigned int i=0; i<mGlobalMapOverlay->getChildCount (); ++i)
|
for (unsigned int i=0; i<mGlobalMapOverlay->getChildCount (); ++i)
|
||||||
{
|
{
|
||||||
|
|
|
@ -17,8 +17,6 @@
|
||||||
|
|
||||||
<!-- Global map -->
|
<!-- Global map -->
|
||||||
<Widget type="ScrollView" skin="MW_MapView" position="0 0 284 264" align="Stretch" name="GlobalMap">
|
<Widget type="ScrollView" skin="MW_MapView" position="0 0 284 264" align="Stretch" name="GlobalMap">
|
||||||
<Property key="CanvasSize" value="1536 1536"/>
|
|
||||||
|
|
||||||
<Widget type="ImageBox" skin="ImageBox" position_real="0 0 1 1" align="Stretch" name="GlobalMapImage">
|
<Widget type="ImageBox" skin="ImageBox" position_real="0 0 1 1" align="Stretch" name="GlobalMapImage">
|
||||||
<Widget type="ImageBox" skin="ImageBox" position_real="0 0 1 1" align="Stretch" name="GlobalMapOverlay"/>
|
<Widget type="ImageBox" skin="ImageBox" position_real="0 0 1 1" align="Stretch" name="GlobalMapOverlay"/>
|
||||||
</Widget>
|
</Widget>
|
||||||
|
|
Loading…
Reference in a new issue