Fixed: In scene text bubble position

--HG--
branch : experimental-ui-scaling
This commit is contained in:
Nimetu 2016-06-06 19:48:08 +03:00
parent 8965ce50d5
commit 34fa04644e
2 changed files with 6 additions and 5 deletions

View file

@ -86,8 +86,10 @@ void CGroupInScene::computeWindowPos(sint32 &newX, sint32 &newY, CVector &newPro
tmp = pVR.getFrustum().projectZ (tmp);
// Get the width and height
tmp.x *= (float)CViewRenderer::getInstance()->getDriver()->getWindowWidth();
tmp.y *= (float)CViewRenderer::getInstance()->getDriver()->getWindowHeight();
uint32 width, height;
CViewRenderer::getInstance()->getScreenSize(width, height);
tmp.x *= width;
tmp.y *= height;
// position without offset, in float
newProjCenter.x= tmp.x;

View file

@ -668,9 +668,8 @@ CGroupInSceneBubbleManager::CPopupContext *CGroupInSceneBubbleManager::buildCont
if (target)
{
// Find a position
NL3D::UDriver *Driver = CViewRenderer::getInstance()->getDriver();
const uint width = Driver->getWindowWidth();
const uint height = Driver->getWindowHeight();
uint32 width, height;
CViewRenderer::getInstance()->getScreenSize(width, height);
h = (target->getXReal() < ((sint)width-target->getXReal()-target->getWReal()))?"l":"r";
v = (target->getYReal() < ((sint)height-target->getYReal()-target->getHReal()))?"b":"t";
target->setActive(true);