mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-02-16 20:15:38 +00:00
The game launch screen now uses the same menu opening effect setting as the menus.
This commit is contained in:
parent
a9617686b6
commit
c95351d94c
|
@ -172,6 +172,12 @@ void GuiLaunchScreen::displayLaunchScreen(FileData* game)
|
||||||
mMarquee->setPosition(currentPos);
|
mMarquee->setPosition(currentPos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setOrigin({0.5f, 0.5f});
|
||||||
|
|
||||||
|
// Center on the X axis and keep slightly off-center on the Y axis.
|
||||||
|
setPosition(static_cast<float>(Renderer::getScreenWidth()) / 2.0f,
|
||||||
|
static_cast<float>(Renderer::getScreenHeight()) / 2.25f);
|
||||||
|
|
||||||
mBackground.fitTo(mSize, Vector3f::Zero(), Vector2f(-32, -32));
|
mBackground.fitTo(mSize, Vector3f::Zero(), Vector2f(-32, -32));
|
||||||
mBackground.setEdgeColor(0xEEEEEEFF);
|
mBackground.setEdgeColor(0xEEEEEEFF);
|
||||||
}
|
}
|
||||||
|
@ -202,20 +208,17 @@ void GuiLaunchScreen::onSizeChanged()
|
||||||
|
|
||||||
void GuiLaunchScreen::update(int deltaTime)
|
void GuiLaunchScreen::update(int deltaTime)
|
||||||
{
|
{
|
||||||
if (mScaleUp < 1.0f)
|
if (Settings::getInstance()->getString("MenuOpeningEffect") == "none")
|
||||||
|
mScaleUp = 1.0f;
|
||||||
|
else if (mScaleUp < 1.0f)
|
||||||
mScaleUp = Math::clamp(mScaleUp + 0.07f, 0.0f, 1.0f);
|
mScaleUp = Math::clamp(mScaleUp + 0.07f, 0.0f, 1.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GuiLaunchScreen::render()
|
void GuiLaunchScreen::render()
|
||||||
{
|
{
|
||||||
// Scale up animation.
|
// Scale up animation.
|
||||||
if (mScaleUp < 1.0f) {
|
if (mScaleUp < 1.0f)
|
||||||
setOrigin({0.5f, 0.5f});
|
|
||||||
// Center on the X axis and keep slightly off-center on the Y axis.
|
|
||||||
setPosition(static_cast<float>(Renderer::getScreenWidth()) / 2.0f,
|
|
||||||
static_cast<float>(Renderer::getScreenHeight()) / 2.25f);
|
|
||||||
setScale(mScaleUp);
|
setScale(mScaleUp);
|
||||||
}
|
|
||||||
|
|
||||||
Transform4x4f trans = Transform4x4f::Identity() * getTransform();
|
Transform4x4f trans = Transform4x4f::Identity() * getTransform();
|
||||||
Renderer::setMatrix(trans);
|
Renderer::setMatrix(trans);
|
||||||
|
|
Loading…
Reference in a new issue