2020-09-21 17:17:34 +00:00
|
|
|
// SPDX-License-Identifier: MIT
|
2020-05-26 16:34:33 +00:00
|
|
|
//
|
2020-09-21 17:17:34 +00:00
|
|
|
// EmulationStation Desktop Edition
|
2020-06-21 12:25:28 +00:00
|
|
|
// GuiScraperMulti.h
|
2020-05-26 16:34:33 +00:00
|
|
|
//
|
2020-06-21 12:25:28 +00:00
|
|
|
// Multiple game scraping user interface.
|
|
|
|
// Shows the progress for the scraping as it's running.
|
|
|
|
// This interface is triggered from GuiScraperMenu.
|
|
|
|
// GuiScraperSearch is called from here.
|
2020-05-26 16:34:33 +00:00
|
|
|
//
|
|
|
|
|
2017-10-31 17:12:50 +00:00
|
|
|
#ifndef ES_APP_GUIS_GUI_SCRAPER_MULTI_H
|
|
|
|
#define ES_APP_GUIS_GUI_SCRAPER_MULTI_H
|
2014-06-25 16:29:58 +00:00
|
|
|
|
2021-07-07 18:03:42 +00:00
|
|
|
#include "GuiComponent.h"
|
|
|
|
#include "MetaData.h"
|
2014-06-25 16:29:58 +00:00
|
|
|
#include "components/ComponentGrid.h"
|
2017-11-01 22:21:10 +00:00
|
|
|
#include "components/NinePatchComponent.h"
|
2021-10-15 18:58:40 +00:00
|
|
|
#include "components/ScrollIndicatorComponent.h"
|
2014-06-25 16:29:58 +00:00
|
|
|
#include "scrapers/Scraper.h"
|
|
|
|
|
2020-06-06 12:14:13 +00:00
|
|
|
class GuiScraperSearch;
|
2014-06-25 16:29:58 +00:00
|
|
|
class TextComponent;
|
|
|
|
|
|
|
|
class GuiScraperMulti : public GuiComponent
|
|
|
|
{
|
|
|
|
public:
|
2022-01-19 17:01:54 +00:00
|
|
|
GuiScraperMulti(const std::queue<ScraperSearchParams>& searches, bool approveResults);
|
2020-05-26 16:34:33 +00:00
|
|
|
|
2020-06-21 12:25:28 +00:00
|
|
|
virtual ~GuiScraperMulti();
|
2014-06-25 16:29:58 +00:00
|
|
|
|
2020-06-21 12:25:28 +00:00
|
|
|
void onSizeChanged() override;
|
2020-06-07 18:09:02 +00:00
|
|
|
|
2020-06-21 12:25:28 +00:00
|
|
|
std::vector<HelpPrompt> getHelpPrompts() override;
|
|
|
|
HelpStyle getHelpStyle() override;
|
2014-06-25 16:29:58 +00:00
|
|
|
|
|
|
|
private:
|
2020-06-21 12:25:28 +00:00
|
|
|
void acceptResult(const ScraperSearchResult& result);
|
|
|
|
void skip();
|
|
|
|
void doNextSearch();
|
|
|
|
void finish();
|
|
|
|
|
|
|
|
NinePatchComponent mBackground;
|
|
|
|
ComponentGrid mGrid;
|
|
|
|
|
|
|
|
std::shared_ptr<TextComponent> mTitle;
|
2021-10-15 18:58:40 +00:00
|
|
|
std::shared_ptr<ImageComponent> mScrollUp;
|
|
|
|
std::shared_ptr<ImageComponent> mScrollDown;
|
|
|
|
std::shared_ptr<ScrollIndicatorComponent> mScrollIndicator;
|
2020-06-21 12:25:28 +00:00
|
|
|
std::shared_ptr<TextComponent> mSystem;
|
|
|
|
std::shared_ptr<TextComponent> mSubtitle;
|
|
|
|
std::shared_ptr<GuiScraperSearch> mSearchComp;
|
|
|
|
std::shared_ptr<ComponentGrid> mButtonGrid;
|
2021-10-15 18:58:40 +00:00
|
|
|
std::shared_ptr<ComponentList> mResultList;
|
2021-07-07 18:03:42 +00:00
|
|
|
|
|
|
|
std::queue<ScraperSearchParams> mSearchQueue;
|
|
|
|
std::vector<MetaDataDecl> mMetaDataDecl;
|
|
|
|
unsigned int mTotalGames;
|
|
|
|
unsigned int mCurrentGame;
|
|
|
|
unsigned int mTotalSuccessful;
|
|
|
|
unsigned int mTotalSkipped;
|
|
|
|
bool mApproveResults;
|
2014-06-25 16:29:58 +00:00
|
|
|
};
|
2017-10-31 17:12:50 +00:00
|
|
|
|
|
|
|
#endif // ES_APP_GUIS_GUI_SCRAPER_MULTI_H
|