mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2024-11-29 03:33:48 +00:00
Vertical mode is a go!
- mouse problems fixed - make sure subtitles stay near the bottom of the screen
This commit is contained in:
parent
2cf5932eb3
commit
56922a0b6e
2 changed files with 8 additions and 8 deletions
|
@ -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);
|
||||
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue