mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 14:15:38 +00:00
The scraper now shows the string actually being used for searching in the screen subtitle.
This commit is contained in:
parent
7c61d7b19d
commit
077a0e0e2c
|
@ -15,6 +15,7 @@
|
|||
#include "components/TextComponent.h"
|
||||
#include "views/ViewController.h"
|
||||
#include "FileData.h"
|
||||
#include "MameNames.h"
|
||||
#include "SystemData.h"
|
||||
|
||||
GuiGameScraper::GuiGameScraper(
|
||||
|
@ -32,8 +33,22 @@ GuiGameScraper::GuiGameScraper(
|
|||
|
||||
// Row 0 is a spacer.
|
||||
|
||||
mGameName = std::make_shared<TextComponent>(mWindow,
|
||||
Utils::FileSystem::getFileName(mSearchParams.game->getPath()) +
|
||||
std::string scrapeName;
|
||||
|
||||
if (Settings::getInstance()->getBool("ScraperSearchMetadataName")) {
|
||||
scrapeName = mSearchParams.game->getName();
|
||||
}
|
||||
else {
|
||||
if (params.game->isArcadeGame() &&
|
||||
Settings::getInstance()->getString("Scraper") == "thegamesdb")
|
||||
scrapeName = Utils::FileSystem::getFileName(mSearchParams.game->getPath()) + " (" +
|
||||
MameNames::getInstance()->getCleanName(mSearchParams.game->getCleanName()) +
|
||||
")";
|
||||
else
|
||||
scrapeName = Utils::FileSystem::getFileName(mSearchParams.game->getPath());
|
||||
}
|
||||
|
||||
mGameName = std::make_shared<TextComponent>(mWindow, scrapeName +
|
||||
((mSearchParams.game->getType() == FOLDER) ? " " + ViewController::FOLDER_CHAR : ""),
|
||||
Font::get(FONT_SIZE_MEDIUM), 0x777777FF, ALIGN_CENTER);
|
||||
mGrid.setEntry(mGameName, Vector2i(0, 1), false, true);
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
#include "guis/GuiScraperSearch.h"
|
||||
#include "views/ViewController.h"
|
||||
#include "Gamelist.h"
|
||||
#include "MameNames.h"
|
||||
#include "SystemData.h"
|
||||
#include "Window.h"
|
||||
|
||||
|
@ -130,10 +131,24 @@ void GuiScraperMulti::doNextSearch()
|
|||
std::stringstream ss;
|
||||
mSystem->setText(Utils::String::toUpper(mSearchQueue.front().system->getFullName()));
|
||||
|
||||
std::string scrapeName;
|
||||
|
||||
if (Settings::getInstance()->getBool("ScraperSearchMetadataName")) {
|
||||
scrapeName = mSearchQueue.front().game->getName();
|
||||
}
|
||||
else {
|
||||
if (mSearchQueue.front().game->isArcadeGame() &&
|
||||
Settings::getInstance()->getString("Scraper") == "thegamesdb")
|
||||
scrapeName = Utils::FileSystem::getFileName(mSearchQueue.front().game->getPath()) +
|
||||
" (" + MameNames::getInstance()->getCleanName(mSearchQueue.front().game->
|
||||
getCleanName()) + ")";
|
||||
else
|
||||
scrapeName = Utils::FileSystem::getFileName(mSearchQueue.front().game->getPath());
|
||||
}
|
||||
|
||||
// Update subtitle.
|
||||
ss.str("");
|
||||
ss << "GAME " << (mCurrentGame + 1) << " OF " << mTotalGames << " - " <<
|
||||
Utils::FileSystem::getFileName(mSearchQueue.front().game->getPath()) <<
|
||||
ss << "GAME " << (mCurrentGame + 1) << " OF " << mTotalGames << " - " << scrapeName <<
|
||||
((mSearchQueue.front().game->getType() == FOLDER) ? " " +
|
||||
ViewController::FOLDER_CHAR : "");
|
||||
mSubtitle->setText(ss.str());
|
||||
|
|
Loading…
Reference in a new issue