1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 19:19:56 +00:00

Small cleanup

This commit is contained in:
scrawl 2015-11-08 18:27:01 +01:00
parent 516f2765a1
commit 79b3f1e6a8

View file

@ -99,8 +99,9 @@ namespace osgMyGUI
{ {
MyGUI::IntSize globalViewSize = MyGUI::RenderManager::getInstance().getViewSize(); MyGUI::IntSize globalViewSize = MyGUI::RenderManager::getInstance().getViewSize();
MyGUI::IntSize viewSize = globalViewSize; MyGUI::IntSize viewSize = globalViewSize;
viewSize.width /= getScaleFactor(); float scale = getScaleFactor();
viewSize.height /= getScaleFactor(); viewSize.width /= scale;
viewSize.height /= scale;
float hoffset = (globalViewSize.width - mViewSize.width*getScaleFactor())/2.f / static_cast<float>(globalViewSize.width); float hoffset = (globalViewSize.width - mViewSize.width*getScaleFactor())/2.f / static_cast<float>(globalViewSize.width);
float voffset = (globalViewSize.height - mViewSize.height*getScaleFactor())/2.f / static_cast<float>(globalViewSize.height); float voffset = (globalViewSize.height - mViewSize.height*getScaleFactor())/2.f / static_cast<float>(globalViewSize.height);