diff --git a/Aquaria/DSQ.cpp b/Aquaria/DSQ.cpp index 997e3d4..4d18f79 100644 --- a/Aquaria/DSQ.cpp +++ b/Aquaria/DSQ.cpp @@ -1056,15 +1056,13 @@ void DSQ::init() addRenderObject(subbox, LR_SUBTITLES); subtext = new BitmapText(subsFont); - - subtext->position = Vector(400,570); + subtext->position = Vector(0,-10); subtext->followCamera = 1; subtext->alpha = 0; subtext->setFontSize(14); subtext->setWidth(800); subtext->setAlign(ALIGN_CENTER); - - addRenderObject(subtext, LR_SUBTITLES); + subbox->addChild(subtext, PM_POINTER); achievement_box = new Quad(); achievement_box->position = Vector(800,0); @@ -1953,10 +1951,9 @@ void DSQ::shutdown() console = 0; removeRenderObject(cmDebug); cmDebug = 0; - removeRenderObject(subtext); - subtext = 0; removeRenderObject(subbox); subbox = 0; + subtext = 0; removeRenderObject(achievement_text); achievement_text = 0; @@ -3723,6 +3720,9 @@ void DSQ::onUpdate(float dt) noEffectTimer = 0; } + // Don't use go virtualOffY all the way, because then it's a bit too far down to be + // readable easily. Move it up a bit when we're in vertical mode. + subbox->position = Vector(400,580 + getVirtualOffY() * 0.8f); subtitlePlayer.update(dt); diff --git a/BBGE/Core.cpp b/BBGE/Core.cpp index b593108..d4e6395 100644 --- a/BBGE/Core.cpp +++ b/BBGE/Core.cpp @@ -1323,14 +1323,14 @@ Vector Core::pixelPosToVirtualCoords(int x, int y) const return Vector( (x * mx) - getVirtualOffX(), - y * my + (y * my) - getVirtualOffY() ); } void Core::virtualCoordsToPixelPos(int& x, int& y, const Vector& p) const { const float px = p.x + getVirtualOffX(); - const float py = p.y; + const float py = p.y + getVirtualOffY();; x = px * (float(getWindowWidth())/float(virtualWidth)); y = py * (float(getWindowHeight())/float(virtualHeight)); }