mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-17 22:55:38 +00:00
Added "ignore" plaform.
If <platform> is set to "ignore", the system will not show up in the "SCRAPE NOW" systems list, and the "SCRAPE" button will be missing in the "EDIT METADATA" screen. Useful for single-game systems, systems made up of shortcuts, and pre-configured systems in distributions.
This commit is contained in:
parent
d102ef1485
commit
1122476de6
|
@ -53,7 +53,8 @@ namespace PlatformIds
|
|||
"pcengine", // = 45,
|
||||
"zxspectrum", // = 46,
|
||||
|
||||
"invalid" // = 47
|
||||
"ignore", // = 47 // do not allow scraping for this system
|
||||
"invalid" // = 48
|
||||
};
|
||||
|
||||
PlatformId getPlatformId(const char* str)
|
||||
|
|
|
@ -55,7 +55,8 @@ namespace PlatformIds
|
|||
TURBOGRAFX_16 = 45,
|
||||
ZX_SPECTRUM = 46,
|
||||
|
||||
PLATFORM_COUNT = 47
|
||||
PLATFORM_IGNORE = 47, // do not allow scraping for this system
|
||||
PLATFORM_COUNT = 48
|
||||
};
|
||||
|
||||
PlatformId getPlatformId(const char* str);
|
||||
|
|
|
@ -128,7 +128,10 @@ GuiMetaDataEd::GuiMetaDataEd(Window* window, MetaDataList* md, const std::vector
|
|||
}
|
||||
|
||||
std::vector< std::shared_ptr<ButtonComponent> > buttons;
|
||||
|
||||
if(scraperParams.system->getPlatformId() != PlatformIds::PLATFORM_IGNORE)
|
||||
buttons.push_back(std::make_shared<ButtonComponent>(mWindow, "SCRAPE", "scrape", std::bind(&GuiMetaDataEd::fetch, this)));
|
||||
|
||||
buttons.push_back(std::make_shared<ButtonComponent>(mWindow, "SAVE", "save", [&] { save(); delete this; }));
|
||||
buttons.push_back(std::make_shared<ButtonComponent>(mWindow, "CANCEL", "cancel", [&] { delete this; }));
|
||||
|
||||
|
|
|
@ -23,7 +23,10 @@ GuiScraperStart::GuiScraperStart(Window* window) : GuiComponent(window),
|
|||
//add systems (all with a platformid specified selected)
|
||||
mSystems = std::make_shared< OptionListComponent<SystemData*> >(mWindow, "SCRAPE THESE SYSTEMS", true);
|
||||
for(auto it = SystemData::sSystemVector.begin(); it != SystemData::sSystemVector.end(); it++)
|
||||
{
|
||||
if((*it)->getPlatformId() != PlatformIds::PLATFORM_IGNORE)
|
||||
mSystems->add((*it)->getFullName(), *it, (*it)->getPlatformId() != PlatformIds::PLATFORM_UNKNOWN);
|
||||
}
|
||||
mMenu.addWithLabel("Systems", mSystems);
|
||||
|
||||
mApproveResults = std::make_shared<SwitchComponent>(mWindow);
|
||||
|
|
Loading…
Reference in a new issue