2014-06-25 16:29:58 +00:00
|
|
|
#pragma once
|
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
|
|
|
|
|
|
|
#include "components/ComponentGrid.h"
|
2017-11-01 22:21:10 +00:00
|
|
|
#include "components/NinePatchComponent.h"
|
2014-06-25 16:29:58 +00:00
|
|
|
#include "scrapers/Scraper.h"
|
2017-11-01 22:21:10 +00:00
|
|
|
#include "GuiComponent.h"
|
2014-06-25 16:29:58 +00:00
|
|
|
|
|
|
|
class ScraperSearchComponent;
|
|
|
|
class TextComponent;
|
|
|
|
|
|
|
|
class GuiScraperMulti : public GuiComponent
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
GuiScraperMulti(Window* window, const std::queue<ScraperSearchParams>& searches, bool approveResults);
|
|
|
|
virtual ~GuiScraperMulti();
|
|
|
|
|
|
|
|
void onSizeChanged() override;
|
|
|
|
std::vector<HelpPrompt> getHelpPrompts() override;
|
|
|
|
|
|
|
|
private:
|
|
|
|
void acceptResult(const ScraperSearchResult& result);
|
|
|
|
void skip();
|
|
|
|
void doNextSearch();
|
|
|
|
|
|
|
|
void finish();
|
|
|
|
|
|
|
|
unsigned int mTotalGames;
|
|
|
|
unsigned int mCurrentGame;
|
|
|
|
unsigned int mTotalSuccessful;
|
|
|
|
unsigned int mTotalSkipped;
|
|
|
|
std::queue<ScraperSearchParams> mSearchQueue;
|
|
|
|
|
|
|
|
NinePatchComponent mBackground;
|
|
|
|
ComponentGrid mGrid;
|
|
|
|
|
|
|
|
std::shared_ptr<TextComponent> mTitle;
|
|
|
|
std::shared_ptr<TextComponent> mSystem;
|
|
|
|
std::shared_ptr<TextComponent> mSubtitle;
|
|
|
|
std::shared_ptr<ScraperSearchComponent> mSearchComp;
|
|
|
|
std::shared_ptr<ComponentGrid> mButtonGrid;
|
|
|
|
};
|
2017-10-31 17:12:50 +00:00
|
|
|
|
|
|
|
#endif // ES_APP_GUIS_GUI_SCRAPER_MULTI_H
|