// SPDX-License-Identifier: MIT // // ES-DE // GuiMetaDataEd.h // // Game metadata edit user interface. // This interface is triggered from the GuiGamelistOptions menu. // The scraping interface is handled by GuiScraperSingle which calls GuiScraperSearch. // #ifndef ES_APP_GUIS_GUI_META_DATA_ED_H #define ES_APP_GUIS_GUI_META_DATA_ED_H #include "GuiComponent.h" #include "MetaData.h" #include "components/BadgeComponent.h" #include "components/ComponentGrid.h" #include "components/NinePatchComponent.h" #include "components/ScrollIndicatorComponent.h" #include "guis/GuiSettings.h" #include "scrapers/Scraper.h" #include "views/ViewController.h" class ComponentList; class TextComponent; class GuiMetaDataEd : public GuiComponent { public: GuiMetaDataEd(MetaDataList* md, const std::vector& mdd, const ScraperSearchParams params, std::function savedCallback, std::function clearGameFunc, std::function deleteGameFunc); bool input(InputConfig* config, Input input) override; void onSizeChanged() override; std::vector getHelpPrompts() override; HelpStyle getHelpStyle() override { return ViewController::getInstance()->getViewHelpStyle(); } private: void save(); void fetch(); void fetchDone(const ScraperSearchResult& result); void close(); Renderer* mRenderer; NinePatchComponent mBackground; ComponentGrid mGrid; std::shared_ptr mTitle; std::shared_ptr mScrollUp; std::shared_ptr mScrollDown; std::shared_ptr mScrollIndicator; std::shared_ptr mSubtitle; std::shared_ptr mHeaderGrid; std::shared_ptr mList; std::shared_ptr mButtons; ScraperSearchParams mScraperParams; std::vector mControllerBadges; std::vector> mEditors; std::vector mMetaDataDecl; MetaDataList* mMetaData; std::function mSavedCallback; std::function mClearGameFunc; std::function mDeleteGameFunc; bool mIsCustomCollection; bool mMediaFilesUpdated; bool mSavedMediaAndAborted; bool mInvalidEmulatorEntry; bool mInvalidFolderLinkEntry; }; #endif // ES_APP_GUIS_GUI_META_DATA_ED_H