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);
|
tmp = pVR.getFrustum().projectZ (tmp);
|
||||||
|
|
||||||
// Get the width and height
|
// Get the width and height
|
||||||
tmp.x *= (float)CViewRenderer::getInstance()->getDriver()->getWindowWidth();
|
uint32 width, height;
|
||||||
tmp.y *= (float)CViewRenderer::getInstance()->getDriver()->getWindowHeight();
|
CViewRenderer::getInstance()->getScreenSize(width, height);
|
||||||
|
tmp.x *= width;
|
||||||
|
tmp.y *= height;
|
||||||
|
|
||||||
// position without offset, in float
|
// position without offset, in float
|
||||||
newProjCenter.x= tmp.x;
|
newProjCenter.x= tmp.x;
|
||||||
|
|
|
@ -668,9 +668,8 @@ CGroupInSceneBubbleManager::CPopupContext *CGroupInSceneBubbleManager::buildCont
|
||||||
if (target)
|
if (target)
|
||||||
{
|
{
|
||||||
// Find a position
|
// Find a position
|
||||||
NL3D::UDriver *Driver = CViewRenderer::getInstance()->getDriver();
|
uint32 width, height;
|
||||||
const uint width = Driver->getWindowWidth();
|
CViewRenderer::getInstance()->getScreenSize(width, height);
|
||||||
const uint height = Driver->getWindowHeight();
|
|
||||||
h = (target->getXReal() < ((sint)width-target->getXReal()-target->getWReal()))?"l":"r";
|
h = (target->getXReal() < ((sint)width-target->getXReal()-target->getWReal()))?"l":"r";
|
||||||
v = (target->getYReal() < ((sint)height-target->getYReal()-target->getHReal()))?"b":"t";
|
v = (target->getYReal() < ((sint)height-target->getYReal()-target->getHReal()))?"b":"t";
|
||||||
target->setActive(true);
|
target->setActive(true);
|
||||||
|
|
Loading…
Reference in a new issue