mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-17 22:55:38 +00:00
Give an error message if a scrape is started with no games selected.
This commit is contained in:
parent
b3dcdb52eb
commit
391e299f79
|
@ -14,6 +14,8 @@ GuiScraperMulti::GuiScraperMulti(Window* window, const std::queue<ScraperSearchP
|
||||||
GuiComponent(window), mBackground(window, ":/frame.png"), mGrid(window, Vector2i(1, 5)),
|
GuiComponent(window), mBackground(window, ":/frame.png"), mGrid(window, Vector2i(1, 5)),
|
||||||
mSearchQueue(searches)
|
mSearchQueue(searches)
|
||||||
{
|
{
|
||||||
|
assert(mSearchQueue.size());
|
||||||
|
|
||||||
addChild(&mBackground);
|
addChild(&mBackground);
|
||||||
addChild(&mGrid);
|
addChild(&mGrid);
|
||||||
|
|
||||||
|
|
|
@ -57,9 +57,15 @@ void GuiScraperStart::start()
|
||||||
{
|
{
|
||||||
std::queue<ScraperSearchParams> searches = getSearches(mSystems->getSelectedObjects(), mFilters->getSelected());
|
std::queue<ScraperSearchParams> searches = getSearches(mSystems->getSelectedObjects(), mFilters->getSelected());
|
||||||
|
|
||||||
GuiScraperMulti* gsm = new GuiScraperMulti(mWindow, searches, mApproveResults->getState());
|
if(searches.empty())
|
||||||
mWindow->pushGui(gsm);
|
{
|
||||||
delete this;
|
mWindow->pushGui(new GuiMsgBox(mWindow,
|
||||||
|
"NO GAMES FIT THAT CRITERIA."));
|
||||||
|
}else{
|
||||||
|
GuiScraperMulti* gsm = new GuiScraperMulti(mWindow, searches, mApproveResults->getState());
|
||||||
|
mWindow->pushGui(gsm);
|
||||||
|
delete this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::queue<ScraperSearchParams> GuiScraperStart::getSearches(std::vector<SystemData*> systems, GameFilterFunc selector)
|
std::queue<ScraperSearchParams> GuiScraperStart::getSearches(std::vector<SystemData*> systems, GameFilterFunc selector)
|
||||||
|
|
Loading…
Reference in a new issue