mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-26 08:05:38 +00:00
Slight adjustments to the placement and color of the game launch screen.
This commit is contained in:
parent
cc335343c4
commit
174b2f5256
|
@ -57,7 +57,7 @@ void GuiLaunchScreen::displayLaunchScreen(FileData* game)
|
||||||
// Title.
|
// Title.
|
||||||
mTitle = std::make_shared<TextComponent>(mWindow, "LAUNCHING GAME",
|
mTitle = std::make_shared<TextComponent>(mWindow, "LAUNCHING GAME",
|
||||||
Font::get(static_cast<int>(titleFontSize * std::min(Renderer::getScreenHeight(),
|
Font::get(static_cast<int>(titleFontSize * std::min(Renderer::getScreenHeight(),
|
||||||
Renderer::getScreenWidth()))), 0x777777FF, ALIGN_CENTER);
|
Renderer::getScreenWidth()))), 0x666666FF, ALIGN_CENTER);
|
||||||
mGrid->setEntry(mTitle, Vector2i(1, 1), false, true, Vector2i(1, 1));
|
mGrid->setEntry(mTitle, Vector2i(1, 1), false, true, Vector2i(1, 1));
|
||||||
|
|
||||||
// Spacer row.
|
// Spacer row.
|
||||||
|
@ -75,12 +75,12 @@ void GuiLaunchScreen::displayLaunchScreen(FileData* game)
|
||||||
// Game name.
|
// Game name.
|
||||||
mGameName = std::make_shared<TextComponent>(mWindow, "GAME NAME",
|
mGameName = std::make_shared<TextComponent>(mWindow, "GAME NAME",
|
||||||
Font::get(static_cast<int>(gameNameFontSize * std::min(Renderer::getScreenHeight(),
|
Font::get(static_cast<int>(gameNameFontSize * std::min(Renderer::getScreenHeight(),
|
||||||
Renderer::getScreenWidth()))), 0x555555FF, ALIGN_CENTER);
|
Renderer::getScreenWidth()))), 0x444444FF, ALIGN_CENTER);
|
||||||
mGrid->setEntry(mGameName, Vector2i(1, 5), false, true, Vector2i(1, 1));
|
mGrid->setEntry(mGameName, Vector2i(1, 5), false, true, Vector2i(1, 1));
|
||||||
|
|
||||||
// System name.
|
// System name.
|
||||||
mSystemName = std::make_shared<TextComponent>(mWindow, "SYSTEM NAME",
|
mSystemName = std::make_shared<TextComponent>(mWindow, "SYSTEM NAME",
|
||||||
Font::get(FONT_SIZE_MEDIUM), 0x777777FF, ALIGN_CENTER);
|
Font::get(FONT_SIZE_MEDIUM), 0x666666FF, ALIGN_CENTER);
|
||||||
mGrid->setEntry(mSystemName, Vector2i(1, 6), false, true, Vector2i(1, 1));
|
mGrid->setEntry(mSystemName, Vector2i(1, 6), false, true, Vector2i(1, 1));
|
||||||
|
|
||||||
// Spacer row.
|
// Spacer row.
|
||||||
|
@ -170,10 +170,7 @@ void GuiLaunchScreen::displayLaunchScreen(FileData* game)
|
||||||
}
|
}
|
||||||
|
|
||||||
mBackground.fitTo(mSize, Vector3f::Zero(), Vector2f(-32, -32));
|
mBackground.fitTo(mSize, Vector3f::Zero(), Vector2f(-32, -32));
|
||||||
|
mBackground.setEdgeColor(0xEEEEEEFF);
|
||||||
// Center the screen both on the X and Y axes.
|
|
||||||
setPosition((static_cast<float>(Renderer::getScreenWidth()) - mSize.x()) / 2.0f,
|
|
||||||
(static_cast<float>(Renderer::getScreenHeight()) - mSize.y()) / 2.0f);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void GuiLaunchScreen::closeLaunchScreen()
|
void GuiLaunchScreen::closeLaunchScreen()
|
||||||
|
@ -211,8 +208,9 @@ void GuiLaunchScreen::render()
|
||||||
// Scale up animation.
|
// Scale up animation.
|
||||||
if (mScaleUp < 1.0f) {
|
if (mScaleUp < 1.0f) {
|
||||||
setOrigin({0.5f, 0.5f});
|
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,
|
setPosition(static_cast<float>(Renderer::getScreenWidth()) / 2.0f,
|
||||||
static_cast<float>(Renderer::getScreenHeight()) / 2.0f);
|
static_cast<float>(Renderer::getScreenHeight()) / 2.25f);
|
||||||
setScale(mScaleUp);
|
setScale(mScaleUp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue