mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-23 22:55:39 +00:00
44 lines
1.2 KiB
C
44 lines
1.2 KiB
C
|
#pragma once
|
||
|
|
||
|
#include "GuiComponent.h"
|
||
|
#include "components/MenuComponent.h"
|
||
|
#include "MetaData.h"
|
||
|
#include "scrapers/Scraper.h"
|
||
|
|
||
|
#include <functional>
|
||
|
|
||
|
class GuiMetaDataEd : public GuiComponent
|
||
|
{
|
||
|
public:
|
||
|
GuiMetaDataEd(Window* window, MetaDataList* md, const std::vector<MetaDataDecl>& mdd, ScraperSearchParams params,
|
||
|
const std::string& header, std::function<void()> savedCallback, std::function<void()> deleteFunc);
|
||
|
|
||
|
bool input(InputConfig* config, Input input) override;
|
||
|
void onSizeChanged() override;
|
||
|
virtual std::vector<HelpPrompt> getHelpPrompts() override;
|
||
|
|
||
|
private:
|
||
|
void save();
|
||
|
void fetch();
|
||
|
void fetchDone(const ScraperSearchResult& result);
|
||
|
void close(bool closeAllWindows);
|
||
|
|
||
|
NinePatchComponent mBackground;
|
||
|
ComponentGrid mGrid;
|
||
|
|
||
|
std::shared_ptr<TextComponent> mTitle;
|
||
|
std::shared_ptr<TextComponent> mSubtitle;
|
||
|
std::shared_ptr<ComponentGrid> mHeaderGrid;
|
||
|
std::shared_ptr<ComponentList> mList;
|
||
|
std::shared_ptr<ComponentGrid> mButtons;
|
||
|
|
||
|
ScraperSearchParams mScraperParams;
|
||
|
|
||
|
std::vector< std::shared_ptr<GuiComponent> > mEditors;
|
||
|
|
||
|
std::vector<MetaDataDecl> mMetaDataDecl;
|
||
|
MetaDataList* mMetaData;
|
||
|
std::function<void()> mSavedCallback;
|
||
|
std::function<void()> mDeleteFunc;
|
||
|
};
|