Commit 11065cc5 authored by Aloshi's avatar Aloshi

Fixed color of GuiMetaDataEd title.

Tweaked "fade" transition when launching a game.
parent 64d6af09
......@@ -30,7 +30,7 @@ GuiMetaDataEd::GuiMetaDataEd(Window* window, MetaDataList* md, const std::vector
mHeaderGrid = std::make_shared<ComponentGrid>(mWindow, Vector2i(1, 5));
mTitle = std::make_shared<TextComponent>(mWindow, "EDIT METADATA", Font::get(FONT_SIZE_LARGE), 0x333333FF, ALIGN_CENTER);
mTitle = std::make_shared<TextComponent>(mWindow, "EDIT METADATA", Font::get(FONT_SIZE_LARGE), 0x555555FF, ALIGN_CENTER);
mSubtitle = std::make_shared<TextComponent>(mWindow, strToUpper(scraperParams.game->getPath().filename().generic_string()),
Font::get(FONT_SIZE_SMALL), 0x777777FF, ALIGN_CENTER);
mHeaderGrid->setEntry(mTitle, Vector2i(0, 1), false, true);
......@@ -214,5 +214,6 @@ std::vector<HelpPrompt> GuiMetaDataEd::getHelpPrompts()
{
std::vector<HelpPrompt> prompts = mGrid.getHelpPrompts();
prompts.push_back(HelpPrompt("b", "discard"));
prompts.push_back(HelpPrompt("start", "close"));
return prompts;
}
......@@ -139,14 +139,15 @@ void ViewController::launch(FileData* game, Eigen::Vector3f center)
{
// fade out, launch game, fade back in
auto fadeFunc = [this](float t) {
t -= 1;
mFadeOpacity = lerp<float>(0.0f, 1.0f, t*t*t + 1);
//t -= 1;
//mFadeOpacity = lerp<float>(0.0f, 1.0f, t*t*t + 1);
mFadeOpacity = lerp<float>(0.0f, 1.0f, t);
};
setAnimation(new LambdaAnimation(fadeFunc, 1500), 0, [this, game, fadeFunc]
setAnimation(new LambdaAnimation(fadeFunc, 800), 0, [this, game, fadeFunc]
{
game->getSystem()->launchGame(mWindow, game);
mLockInput = false;
setAnimation(new LambdaAnimation(fadeFunc, 1500), 0, nullptr, true);
setAnimation(new LambdaAnimation(fadeFunc, 800), 0, nullptr, true);
this->onFileChanged(game, FILE_METADATA_CHANGED);
});
}else{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment