mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-03-06 14:27:43 +00:00
Renamed GuiGameScraper to GuiScraperSingle.
This commit is contained in:
parent
5f2f439fc3
commit
e64976d4bc
|
@ -29,7 +29,6 @@ set(ES_HEADERS
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiCollectionSystemsOptions.h
|
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiCollectionSystemsOptions.h
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiGamelistFilter.h
|
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiGamelistFilter.h
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiGamelistOptions.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/GuiLaunchScreen.h
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiMediaViewerOptions.h
|
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiMediaViewerOptions.h
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiMenu.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/GuiScraperMenu.h
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiScraperMulti.h
|
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiScraperMulti.h
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiScraperSearch.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/GuiScreensaverOptions.h
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiSettings.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/GuiCollectionSystemsOptions.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiGamelistFilter.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiGamelistFilter.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiGamelistOptions.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/GuiLaunchScreen.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiMenu.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiMenu.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiMediaViewerOptions.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/GuiScraperMenu.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiScraperMulti.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiScraperMulti.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiScraperSearch.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/GuiScreensaverOptions.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiSettings.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiSettings.cpp
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
//
|
//
|
||||||
// Game metadata edit user interface.
|
// Game metadata edit user interface.
|
||||||
// This interface is triggered from the GuiGamelistOptions menu.
|
// 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"
|
#include "guis/GuiMetaDataEd.h"
|
||||||
|
@ -24,8 +24,8 @@
|
||||||
#include "components/RatingComponent.h"
|
#include "components/RatingComponent.h"
|
||||||
#include "components/SwitchComponent.h"
|
#include "components/SwitchComponent.h"
|
||||||
#include "components/TextComponent.h"
|
#include "components/TextComponent.h"
|
||||||
#include "guis/GuiGameScraper.h"
|
|
||||||
#include "guis/GuiMsgBox.h"
|
#include "guis/GuiMsgBox.h"
|
||||||
|
#include "guis/GuiScraperSingle.h"
|
||||||
#include "guis/GuiTextEditKeyboardPopup.h"
|
#include "guis/GuiTextEditKeyboardPopup.h"
|
||||||
#include "guis/GuiTextEditPopup.h"
|
#include "guis/GuiTextEditPopup.h"
|
||||||
#include "resources/Font.h"
|
#include "resources/Font.h"
|
||||||
|
@ -747,7 +747,7 @@ void GuiMetaDataEd::save()
|
||||||
|
|
||||||
void GuiMetaDataEd::fetch()
|
void GuiMetaDataEd::fetch()
|
||||||
{
|
{
|
||||||
GuiGameScraper* scr = new GuiGameScraper(
|
GuiScraperSingle* scr = new GuiScraperSingle(
|
||||||
mWindow, mScraperParams, std::bind(&GuiMetaDataEd::fetchDone, this, std::placeholders::_1),
|
mWindow, mScraperParams, std::bind(&GuiMetaDataEd::fetchDone, this, std::placeholders::_1),
|
||||||
mSavedMediaAndAborted);
|
mSavedMediaAndAborted);
|
||||||
mWindow->pushGui(scr);
|
mWindow->pushGui(scr);
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
//
|
//
|
||||||
// Game metadata edit user interface.
|
// Game metadata edit user interface.
|
||||||
// This interface is triggered from the GuiGamelistOptions menu.
|
// 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
|
#ifndef ES_APP_GUIS_GUI_META_DATA_ED_H
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
// to resolve scraping conflicts when run from GuiScraperMenu.
|
// to resolve scraping conflicts when run from GuiScraperMenu.
|
||||||
// The function to properly save scraped metadata is located here too.
|
// 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.
|
// from GuiScraperMulti for multi-game scraping.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
// to resolve scraping conflicts when run from GuiScraperMenu.
|
// to resolve scraping conflicts when run from GuiScraperMenu.
|
||||||
// The function to properly save scraped metadata is located here too.
|
// 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.
|
// from GuiScraperMulti for multi-game scraping.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
//
|
//
|
||||||
// EmulationStation Desktop Edition
|
// EmulationStation Desktop Edition
|
||||||
// GuiGameScraper.cpp
|
// GuiScraperSingle.cpp
|
||||||
//
|
//
|
||||||
// Single game scraping user interface.
|
// Single game scraping user interface.
|
||||||
// This interface is triggered from GuiMetaDataEd.
|
// This interface is triggered from GuiMetaDataEd.
|
||||||
// GuiScraperSearch is called from here.
|
// GuiScraperSearch is called from here.
|
||||||
//
|
//
|
||||||
|
|
||||||
#include "guis/GuiGameScraper.h"
|
#include "guis/GuiScraperSingle.h"
|
||||||
|
|
||||||
#include "FileData.h"
|
#include "FileData.h"
|
||||||
#include "MameNames.h"
|
#include "MameNames.h"
|
||||||
|
@ -18,7 +18,7 @@
|
||||||
#include "components/TextComponent.h"
|
#include "components/TextComponent.h"
|
||||||
#include "views/ViewController.h"
|
#include "views/ViewController.h"
|
||||||
|
|
||||||
GuiGameScraper::GuiGameScraper(Window* window,
|
GuiScraperSingle::GuiScraperSingle(Window* window,
|
||||||
ScraperSearchParams& params,
|
ScraperSearchParams& params,
|
||||||
std::function<void(const ScraperSearchResult&)> doneFunc,
|
std::function<void(const ScraperSearchResult&)> doneFunc,
|
||||||
bool& savedMediaAndAborted)
|
bool& savedMediaAndAborted)
|
||||||
|
@ -141,7 +141,7 @@ GuiGameScraper::GuiGameScraper(Window* window,
|
||||||
mSearch->search(params); // Start the search.
|
mSearch->search(params); // Start the search.
|
||||||
}
|
}
|
||||||
|
|
||||||
void GuiGameScraper::onSizeChanged()
|
void GuiScraperSingle::onSizeChanged()
|
||||||
{
|
{
|
||||||
mGrid.setRowHeightPerc(
|
mGrid.setRowHeightPerc(
|
||||||
0, (mGameName->getFont()->getLetterHeight() + Renderer::getScreenHeight() * 0.0637f) /
|
0, (mGameName->getFont()->getLetterHeight() + Renderer::getScreenHeight() * 0.0637f) /
|
||||||
|
@ -164,7 +164,7 @@ void GuiGameScraper::onSizeChanged()
|
||||||
mGameName->setPosition((mSize.x - newSizeX) / 2.0f, 0.0f);
|
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 (config->isMappedTo("b", input) && input.value) {
|
||||||
if (mSearch->getSavedNewMedia()) {
|
if (mSearch->getSavedNewMedia()) {
|
||||||
|
@ -181,7 +181,7 @@ bool GuiGameScraper::input(InputConfig* config, Input input)
|
||||||
return GuiComponent::input(config, input);
|
return GuiComponent::input(config, input);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GuiGameScraper::update(int deltaTime)
|
void GuiScraperSingle::update(int deltaTime)
|
||||||
{
|
{
|
||||||
GuiComponent::update(deltaTime);
|
GuiComponent::update(deltaTime);
|
||||||
|
|
||||||
|
@ -189,7 +189,7 @@ void GuiGameScraper::update(int deltaTime)
|
||||||
delete this;
|
delete this;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<HelpPrompt> GuiGameScraper::getHelpPrompts()
|
std::vector<HelpPrompt> GuiScraperSingle::getHelpPrompts()
|
||||||
{
|
{
|
||||||
std::vector<HelpPrompt> prompts = mGrid.getHelpPrompts();
|
std::vector<HelpPrompt> prompts = mGrid.getHelpPrompts();
|
||||||
prompts.push_back(HelpPrompt("b", "back (cancel)"));
|
prompts.push_back(HelpPrompt("b", "back (cancel)"));
|
||||||
|
@ -197,14 +197,14 @@ std::vector<HelpPrompt> GuiGameScraper::getHelpPrompts()
|
||||||
return prompts;
|
return prompts;
|
||||||
}
|
}
|
||||||
|
|
||||||
HelpStyle GuiGameScraper::getHelpStyle()
|
HelpStyle GuiScraperSingle::getHelpStyle()
|
||||||
{
|
{
|
||||||
HelpStyle style = HelpStyle();
|
HelpStyle style = HelpStyle();
|
||||||
style.applyTheme(ViewController::getInstance()->getState().getSystem()->getTheme(), "system");
|
style.applyTheme(ViewController::getInstance()->getState().getSystem()->getTheme(), "system");
|
||||||
return style;
|
return style;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GuiGameScraper::close()
|
void GuiScraperSingle::close()
|
||||||
{
|
{
|
||||||
// This will cause update() to close the GUI.
|
// This will cause update() to close the GUI.
|
||||||
mClose = true;
|
mClose = true;
|
|
@ -1,25 +1,25 @@
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
//
|
//
|
||||||
// EmulationStation Desktop Edition
|
// EmulationStation Desktop Edition
|
||||||
// GuiGameScraper.h
|
// GuiScraperSingle.h
|
||||||
//
|
//
|
||||||
// Single game scraping user interface.
|
// Single game scraping user interface.
|
||||||
// This interface is triggered from GuiMetaDataEd.
|
// This interface is triggered from GuiMetaDataEd.
|
||||||
// GuiScraperSearch is called from here.
|
// GuiScraperSearch is called from here.
|
||||||
//
|
//
|
||||||
|
|
||||||
#ifndef ES_APP_GUIS_GUI_GAME_SCRAPER_H
|
#ifndef ES_APP_GUIS_GUI_SCRAPER_SINGLE_H
|
||||||
#define ES_APP_GUIS_GUI_GAME_SCRAPER_H
|
#define ES_APP_GUIS_GUI_SCRAPER_SINGLE_H
|
||||||
|
|
||||||
#include "GuiComponent.h"
|
#include "GuiComponent.h"
|
||||||
#include "components/NinePatchComponent.h"
|
#include "components/NinePatchComponent.h"
|
||||||
#include "components/ScrollIndicatorComponent.h"
|
#include "components/ScrollIndicatorComponent.h"
|
||||||
#include "guis/GuiScraperSearch.h"
|
#include "guis/GuiScraperSearch.h"
|
||||||
|
|
||||||
class GuiGameScraper : public GuiComponent
|
class GuiScraperSingle : public GuiComponent
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
GuiGameScraper(Window* window,
|
GuiScraperSingle(Window* window,
|
||||||
ScraperSearchParams& params,
|
ScraperSearchParams& params,
|
||||||
std::function<void(const ScraperSearchResult&)> doneFunc,
|
std::function<void(const ScraperSearchResult&)> doneFunc,
|
||||||
bool& savedMediaAndAborted);
|
bool& savedMediaAndAborted);
|
||||||
|
@ -54,4 +54,4 @@ private:
|
||||||
std::function<void()> mCancelFunc;
|
std::function<void()> mCancelFunc;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // ES_APP_GUIS_GUI_GAME_SCRAPER_H
|
#endif // ES_APP_GUIS_GUI_SCRAPER_SINGLE_H
|
Loading…
Reference in a new issue