Fixed: In scene text bubble position
--HG-- branch : experimental-ui-scaling
This commit is contained in:
parent
8965ce50d5
commit
34fa04644e
2 changed files with 6 additions and 5 deletions
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue