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"
|
2021-06-09 18:56:41 +00:00
|
|
|
#include "guis/GuiSettings.h"
|
2020-06-06 11:10:33 +00:00
|
|
|
#include "scrapers/Scraper.h"
|
|
|
|
|
|
|
|
class FileData;
|
|
|
|
class SwitchComponent;
|
|
|
|
class SystemData;
|
|
|
|
|
2021-07-07 18:03:42 +00:00
|
|
|
template <typename T> class OptionListComponent;
|
2020-06-06 11:10:33 +00:00
|
|
|
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
|
|
|
|
2021-07-07 18:03:42 +00:00
|
|
|
void addEntry(const std::string&,
|
|
|
|
unsigned int color,
|
|
|
|
bool add_arrow,
|
|
|
|
const std::function<void()>& func);
|
2021-06-07 21:02:42 +00:00
|
|
|
void openAccountOptions();
|
|
|
|
void openContentOptions();
|
|
|
|
void openMiximageOptions();
|
2021-06-09 18:56:41 +00:00
|
|
|
void openOfflineGenerator(GuiSettings* settings);
|
2021-06-07 21:02:42 +00:00
|
|
|
void openOtherOptions();
|
2020-06-06 11:10:33 +00:00
|
|
|
|
2021-07-07 18:03:42 +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
|