2013-10-10 21:49:59 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "../GuiComponent.h"
|
|
|
|
#include "../SystemData.h"
|
|
|
|
#include "TextComponent.h"
|
|
|
|
#include "ComponentListComponent.h"
|
|
|
|
#include "OptionListComponent.h"
|
|
|
|
#include "SwitchComponent.h"
|
2013-10-11 00:55:57 +00:00
|
|
|
#include "ButtonComponent.h"
|
|
|
|
#include "../scrapers/Scraper.h"
|
|
|
|
#include <queue>
|
|
|
|
|
2013-11-06 01:41:49 +00:00
|
|
|
typedef std::function<bool(SystemData*, FileData*)> GameFilterFunc;
|
2013-10-10 21:49:59 +00:00
|
|
|
|
2013-10-16 22:05:02 +00:00
|
|
|
//The starting point for a multi-game scrape.
|
|
|
|
//Allows the user to set various parameters (to set filters, to set which systems to scrape, to enable manual mode).
|
|
|
|
//Generates a list of "searches" that will be carried out by GuiScraperLog.
|
2013-10-10 21:49:59 +00:00
|
|
|
class GuiScraperStart : public GuiComponent
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
GuiScraperStart(Window* window);
|
|
|
|
|
2013-10-11 00:55:57 +00:00
|
|
|
bool input(InputConfig* config, Input input) override;
|
|
|
|
|
2013-10-10 21:49:59 +00:00
|
|
|
private:
|
2013-10-16 22:05:02 +00:00
|
|
|
void pressedStart();
|
2013-10-11 00:55:57 +00:00
|
|
|
void start();
|
|
|
|
std::queue<ScraperSearchParams> getSearches(std::vector<SystemData*> systems, GameFilterFunc selector);
|
|
|
|
|
2013-10-10 21:49:59 +00:00
|
|
|
NinePatchComponent mBox;
|
|
|
|
ComponentListComponent mList;
|
|
|
|
|
|
|
|
TextComponent mFilterLabel;
|
|
|
|
TextComponent mSystemsLabel;
|
|
|
|
TextComponent mManualLabel;
|
|
|
|
|
2013-10-11 00:55:57 +00:00
|
|
|
OptionListComponent<GameFilterFunc> mFiltersOpt;
|
2013-10-10 21:49:59 +00:00
|
|
|
OptionListComponent<SystemData*> mSystemsOpt;
|
|
|
|
SwitchComponent mManualSwitch;
|
2013-10-11 00:55:57 +00:00
|
|
|
|
|
|
|
ButtonComponent mStartButton;
|
2013-10-10 21:49:59 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
Filter: [MISSING IMAGES | ALL]
|
|
|
|
Systems: [# selected]
|
|
|
|
Manual Mode: [ON | OFF]
|
|
|
|
GO GO GO
|
|
|
|
|
|
|
|
*/
|
|
|
|
|