|
|
@ -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);
|
|
|
|