mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-24 07:05:39 +00:00
3a3471cfe8
You don't need to dynamic_cast everywhere to check things anymore. Folders can have metadata now (currently not set up). Metadata is now a public member variable instead of a function that returns a pointer to make actually using const possible.
48 lines
1.1 KiB
C++
48 lines
1.1 KiB
C++
#pragma once
|
|
|
|
#include "../GuiComponent.h"
|
|
#include "ComponentListComponent.h"
|
|
#include "../MetaData.h"
|
|
#include "TextComponent.h"
|
|
#include "NinePatchComponent.h"
|
|
#include "ButtonComponent.h"
|
|
#include <functional>
|
|
#include "../scrapers/Scraper.h"
|
|
|
|
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);
|
|
virtual ~GuiMetaDataEd();
|
|
|
|
bool input(InputConfig* config, Input input) override;
|
|
|
|
private:
|
|
void save();
|
|
void fetch();
|
|
void fetchDone(MetaDataList result);
|
|
|
|
void populateList(const std::vector<MetaDataDecl>& mdd);
|
|
|
|
ScraperSearchParams mScraperParams;
|
|
|
|
NinePatchComponent mBox;
|
|
|
|
ComponentListComponent mList;
|
|
|
|
TextComponent mHeader;
|
|
|
|
std::vector<TextComponent*> mLabels;
|
|
std::vector<GuiComponent*> mEditors;
|
|
|
|
std::vector<MetaDataDecl> mMetaDataDecl;
|
|
MetaDataList* mMetaData;
|
|
std::function<void()> mSavedCallback;
|
|
std::function<void()> mDeleteFunc;
|
|
|
|
ButtonComponent mDeleteButton;
|
|
ButtonComponent mFetchButton;
|
|
ButtonComponent mSaveButton;
|
|
};
|