ES-DE/src/components/GuiScraperLog.h
Aloshi 56b04aec4c updateGamelist now creates a gamelist.xml if one does not exist.
Added GuiMsgBoxOk and GuiMsgBoxYesNo, basic message boxes.
Added rating scraping to TheGamesDB scraper.
Added warning if platform ID is not set for a system the user has selected
to scrape.
2013-10-16 17:05:02 -05:00

46 lines
1.2 KiB
C++

#pragma once
#include "../GuiComponent.h"
#include "NinePatchComponent.h"
#include <queue>
#include "../scrapers/Scraper.h"
#include <boost/circular_buffer.hpp>
#include "TextComponent.h"
//A "terminal" of sorts for scraping.
//Doesn't accept input, but renders log-style messages and handles the callback chain for multi-game scraping.
class GuiScraperLog : public GuiComponent
{
public:
GuiScraperLog(Window* window, const std::queue<ScraperSearchParams>& params, bool manualMode);
~GuiScraperLog();
void start();
void render(const Eigen::Affine3f& parentTrans) override;
bool input(InputConfig* config, Input input) override;
private:
void updateStatus();
void writeLine(const std::string& line, unsigned int color);
void resultFetched(ScraperSearchParams params, MetaDataList mdl);
void resultResolved(ScraperSearchParams params, MetaDataList mdl);
void resultEmpty(ScraperSearchParams params);
void next();
void done();
bool mManualMode;
NinePatchComponent mBox;
std::queue<ScraperSearchParams> mSearches;
TextComponent mStatus;
boost::circular_buffer< std::shared_ptr<TextComponent> > mTextLines;
unsigned int mSuccessCount;
unsigned int mSkippedCount;
};