2020-09-21 17:17:34 +00:00
|
|
|
// SPDX-License-Identifier: MIT
|
2020-06-06 11:10:33 +00:00
|
|
|
//
|
2020-09-21 17:17:34 +00:00
|
|
|
// EmulationStation Desktop Edition
|
2020-06-21 12:25:28 +00:00
|
|
|
// GuiScraperMenu.h
|
2020-06-06 11:10:33 +00:00
|
|
|
//
|
2020-06-21 12:25:28 +00:00
|
|
|
// Game media scraper, including settings as well as the scraping start button.
|
|
|
|
// Submenu to the GuiMenu main menu.
|
|
|
|
// Will call GuiScraperMulti to perform the actual scraping.
|
2020-06-06 11:10:33 +00:00
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef ES_APP_GUIS_GUI_SCRAPER_MENU_H
|
|
|
|
#define ES_APP_GUIS_GUI_SCRAPER_MENU_H
|
|
|
|
|
|
|
|
#include "components/MenuComponent.h"
|
|
|
|
#include "scrapers/Scraper.h"
|
|
|
|
|
|
|
|
class FileData;
|
|
|
|
template<typename T>
|
|
|
|
class OptionListComponent;
|
|
|
|
class SwitchComponent;
|
|
|
|
class SystemData;
|
|
|
|
|
|
|
|
typedef std::function<bool(SystemData*, FileData*)> GameFilterFunc;
|
|
|
|
|
|
|
|
class GuiScraperMenu : public GuiComponent
|
|
|
|
{
|
|
|
|
public:
|
2020-11-06 19:27:41 +00:00
|
|
|
GuiScraperMenu(Window* window, std::string title);
|
2020-06-21 12:25:28 +00:00
|
|
|
~GuiScraperMenu();
|
2020-06-06 11:10:33 +00:00
|
|
|
|
2020-06-21 12:25:28 +00:00
|
|
|
bool input(InputConfig* config, Input input) override;
|
2020-06-06 11:10:33 +00:00
|
|
|
|
2020-06-21 12:25:28 +00:00
|
|
|
std::vector<HelpPrompt> getHelpPrompts() override;
|
|
|
|
HelpStyle getHelpStyle() override;
|
2020-06-06 11:10:33 +00:00
|
|
|
|
|
|
|
private:
|
2020-06-21 12:25:28 +00:00
|
|
|
void pressedStart();
|
|
|
|
void start();
|
2020-06-06 11:10:33 +00:00
|
|
|
|
2020-06-21 12:25:28 +00:00
|
|
|
void addEntry(const char* name, unsigned int color,
|
|
|
|
bool add_arrow, const std::function<void()>& func);
|
|
|
|
void openContentSettings();
|
|
|
|
void openOtherSettings();
|
2020-06-06 11:10:33 +00:00
|
|
|
|
2020-06-21 12:25:28 +00:00
|
|
|
std::queue<ScraperSearchParams> getSearches(
|
|
|
|
std::vector<SystemData*> systems, GameFilterFunc selector);
|
2020-06-06 11:10:33 +00:00
|
|
|
|
2020-11-05 17:18:11 +00:00
|
|
|
std::shared_ptr<OptionListComponent<std::string>> mScraper;
|
2020-06-21 12:25:28 +00:00
|
|
|
std::shared_ptr<OptionListComponent<GameFilterFunc>> mFilters;
|
|
|
|
std::shared_ptr<OptionListComponent<SystemData*>> mSystems;
|
2020-06-06 11:10:33 +00:00
|
|
|
|
2020-06-21 12:25:28 +00:00
|
|
|
MenuComponent mMenu;
|
2020-06-06 11:10:33 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // ES_APP_GUIS_GUI_SCRAPER_MENU_H
|