mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-02-28 09:15:37 +00:00
The file name in the metadata editor now includes any folders in the path.
This commit is contained in:
parent
4556a0c71a
commit
9683c9c9a5
|
@ -59,9 +59,26 @@ GuiMetaDataEd::GuiMetaDataEd(
|
||||||
|
|
||||||
mTitle = std::make_shared<TextComponent>(mWindow, "EDIT METADATA",
|
mTitle = std::make_shared<TextComponent>(mWindow, "EDIT METADATA",
|
||||||
Font::get(FONT_SIZE_LARGE), 0x555555FF, ALIGN_CENTER);
|
Font::get(FONT_SIZE_LARGE), 0x555555FF, ALIGN_CENTER);
|
||||||
mSubtitle = std::make_shared<TextComponent>(mWindow,
|
|
||||||
Utils::FileSystem::getFileName(scraperParams.game->
|
// Extract possible subfolders from the path.
|
||||||
getPath()) + " [" + Utils::String::toUpper(scraperParams.system->getName()) + "]",
|
std::string folderPath = Utils::String::replace(
|
||||||
|
Utils::FileSystem::getParent(scraperParams.game->getPath()),
|
||||||
|
scraperParams.system->getSystemEnvData()->mStartPath, "");
|
||||||
|
|
||||||
|
if (folderPath.size() >= 2) {
|
||||||
|
folderPath.erase(0, 1);
|
||||||
|
#if defined(_WIN64)
|
||||||
|
folderPath.push_back('\');
|
||||||
|
folderPath = Utils::String::replace(folderPath, "/", "\\");
|
||||||
|
#else
|
||||||
|
folderPath.push_back('/');
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
mSubtitle = std::make_shared<TextComponent>(mWindow, folderPath +
|
||||||
|
Utils::FileSystem::getFileName(scraperParams.game->getPath()) +
|
||||||
|
" [" + Utils::String::toUpper(scraperParams.system->getName()) + "]" +
|
||||||
|
(scraperParams.game->getType() == FOLDER ? " " + ViewController::FOLDER_CHAR : ""),
|
||||||
Font::get(FONT_SIZE_SMALL), 0x777777FF, ALIGN_CENTER, Vector3f(0.0f, 0.0f, 0.0f),
|
Font::get(FONT_SIZE_SMALL), 0x777777FF, ALIGN_CENTER, Vector3f(0.0f, 0.0f, 0.0f),
|
||||||
Vector2f(0.0f, 0.0f), 0x00000000, 0.05f);
|
Vector2f(0.0f, 0.0f), 0x00000000, 0.05f);
|
||||||
mHeaderGrid->setEntry(mTitle, Vector2i(0, 1), false, true);
|
mHeaderGrid->setEntry(mTitle, Vector2i(0, 1), false, true);
|
||||||
|
|
Loading…
Reference in a new issue