Renamed GuiGameScraper to GuiScraperSingle.

This commit is contained in:
Leon Styhre 2022-01-16 11:10:32 +01:00
parent 5f2f439fc3
commit e64976d4bc
7 changed files with 29 additions and 29 deletions

View file

@ -29,7 +29,6 @@ set(ES_HEADERS
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiCollectionSystemsOptions.h
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiGamelistFilter.h
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiGamelistOptions.h
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiGameScraper.h
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiLaunchScreen.h
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiMediaViewerOptions.h
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiMenu.h
@ -38,6 +37,7 @@ set(ES_HEADERS
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiScraperMenu.h
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiScraperMulti.h
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiScraperSearch.h
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiScraperSingle.h
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiScreensaverOptions.h
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiSettings.h
@ -79,7 +79,6 @@ set(ES_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiCollectionSystemsOptions.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiGamelistFilter.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiGamelistOptions.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiGameScraper.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiLaunchScreen.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiMenu.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiMediaViewerOptions.cpp
@ -88,6 +87,7 @@ set(ES_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiScraperMenu.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiScraperMulti.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiScraperSearch.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiScraperSingle.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiScreensaverOptions.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiSettings.cpp

View file

@ -5,7 +5,7 @@
//
// Game metadata edit user interface.
// This interface is triggered from the GuiGamelistOptions menu.
// The scraping interface is handled by GuiGameScraper which calls GuiScraperSearch.
// The scraping interface is handled by GuiScraperSingle which calls GuiScraperSearch.
//
#include "guis/GuiMetaDataEd.h"
@ -24,8 +24,8 @@
#include "components/RatingComponent.h"
#include "components/SwitchComponent.h"
#include "components/TextComponent.h"
#include "guis/GuiGameScraper.h"
#include "guis/GuiMsgBox.h"
#include "guis/GuiScraperSingle.h"
#include "guis/GuiTextEditKeyboardPopup.h"
#include "guis/GuiTextEditPopup.h"
#include "resources/Font.h"
@ -747,7 +747,7 @@ void GuiMetaDataEd::save()
void GuiMetaDataEd::fetch()
{
GuiGameScraper* scr = new GuiGameScraper(
GuiScraperSingle* scr = new GuiScraperSingle(
mWindow, mScraperParams, std::bind(&GuiMetaDataEd::fetchDone, this, std::placeholders::_1),
mSavedMediaAndAborted);
mWindow->pushGui(scr);

View file

@ -5,7 +5,7 @@
//
// Game metadata edit user interface.
// This interface is triggered from the GuiGamelistOptions menu.
// The scraping interface is handled by GuiGameScraper which calls GuiScraperSearch.
// The scraping interface is handled by GuiScraperSingle which calls GuiScraperSearch.
//
#ifndef ES_APP_GUIS_GUI_META_DATA_ED_H

View file

@ -9,7 +9,7 @@
// to resolve scraping conflicts when run from GuiScraperMenu.
// The function to properly save scraped metadata is located here too.
//
// This GUI is called from GuiGameScraper for single-game scraping and
// This GUI is called from GuiScraperSingle for single-game scraping and
// from GuiScraperMulti for multi-game scraping.
//

View file

@ -9,7 +9,7 @@
// to resolve scraping conflicts when run from GuiScraperMenu.
// The function to properly save scraped metadata is located here too.
//
// This GUI is called from GuiGameScraper for single-game scraping and
// This GUI is called from GuiScraperSingle for single-game scraping and
// from GuiScraperMulti for multi-game scraping.
//

View file

@ -1,14 +1,14 @@
// SPDX-License-Identifier: MIT
//
// EmulationStation Desktop Edition
// GuiGameScraper.cpp
// GuiScraperSingle.cpp
//
// Single game scraping user interface.
// This interface is triggered from GuiMetaDataEd.
// GuiScraperSearch is called from here.
//
#include "guis/GuiGameScraper.h"
#include "guis/GuiScraperSingle.h"
#include "FileData.h"
#include "MameNames.h"
@ -18,7 +18,7 @@
#include "components/TextComponent.h"
#include "views/ViewController.h"
GuiGameScraper::GuiGameScraper(Window* window,
GuiScraperSingle::GuiScraperSingle(Window* window,
ScraperSearchParams& params,
std::function<void(const ScraperSearchResult&)> doneFunc,
bool& savedMediaAndAborted)
@ -141,7 +141,7 @@ GuiGameScraper::GuiGameScraper(Window* window,
mSearch->search(params); // Start the search.
}
void GuiGameScraper::onSizeChanged()
void GuiScraperSingle::onSizeChanged()
{
mGrid.setRowHeightPerc(
0, (mGameName->getFont()->getLetterHeight() + Renderer::getScreenHeight() * 0.0637f) /
@ -164,7 +164,7 @@ void GuiGameScraper::onSizeChanged()
mGameName->setPosition((mSize.x - newSizeX) / 2.0f, 0.0f);
}
bool GuiGameScraper::input(InputConfig* config, Input input)
bool GuiScraperSingle::input(InputConfig* config, Input input)
{
if (config->isMappedTo("b", input) && input.value) {
if (mSearch->getSavedNewMedia()) {
@ -181,7 +181,7 @@ bool GuiGameScraper::input(InputConfig* config, Input input)
return GuiComponent::input(config, input);
}
void GuiGameScraper::update(int deltaTime)
void GuiScraperSingle::update(int deltaTime)
{
GuiComponent::update(deltaTime);
@ -189,7 +189,7 @@ void GuiGameScraper::update(int deltaTime)
delete this;
}
std::vector<HelpPrompt> GuiGameScraper::getHelpPrompts()
std::vector<HelpPrompt> GuiScraperSingle::getHelpPrompts()
{
std::vector<HelpPrompt> prompts = mGrid.getHelpPrompts();
prompts.push_back(HelpPrompt("b", "back (cancel)"));
@ -197,14 +197,14 @@ std::vector<HelpPrompt> GuiGameScraper::getHelpPrompts()
return prompts;
}
HelpStyle GuiGameScraper::getHelpStyle()
HelpStyle GuiScraperSingle::getHelpStyle()
{
HelpStyle style = HelpStyle();
style.applyTheme(ViewController::getInstance()->getState().getSystem()->getTheme(), "system");
return style;
}
void GuiGameScraper::close()
void GuiScraperSingle::close()
{
// This will cause update() to close the GUI.
mClose = true;

View file

@ -1,25 +1,25 @@
// SPDX-License-Identifier: MIT
//
// EmulationStation Desktop Edition
// GuiGameScraper.h
// GuiScraperSingle.h
//
// Single game scraping user interface.
// This interface is triggered from GuiMetaDataEd.
// GuiScraperSearch is called from here.
//
#ifndef ES_APP_GUIS_GUI_GAME_SCRAPER_H
#define ES_APP_GUIS_GUI_GAME_SCRAPER_H
#ifndef ES_APP_GUIS_GUI_SCRAPER_SINGLE_H
#define ES_APP_GUIS_GUI_SCRAPER_SINGLE_H
#include "GuiComponent.h"
#include "components/NinePatchComponent.h"
#include "components/ScrollIndicatorComponent.h"
#include "guis/GuiScraperSearch.h"
class GuiGameScraper : public GuiComponent
class GuiScraperSingle : public GuiComponent
{
public:
GuiGameScraper(Window* window,
GuiScraperSingle(Window* window,
ScraperSearchParams& params,
std::function<void(const ScraperSearchResult&)> doneFunc,
bool& savedMediaAndAborted);
@ -54,4 +54,4 @@ private:
std::function<void()> mCancelFunc;
};
#endif // ES_APP_GUIS_GUI_GAME_SCRAPER_H
#endif // ES_APP_GUIS_GUI_SCRAPER_SINGLE_H