Commit e747cb08 authored by Jean-Baptiste Demonte's avatar Jean-Baptiste Demonte Committed by Subs

Split Game MetaData menu

parent 029ccec5
......@@ -33,6 +33,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- Added an upgrade progression indicator
- Display update changelog + update version, if update available
- Added help popups for games options
- Split Game informations into two popup screen
### Fixed
- Fixed systeminfo not populated on startup
- Fixed all texts resized in vertical mode
......
......@@ -11,33 +11,33 @@ std::vector<MetaDataDecl> gameMDD;
std::vector<MetaDataDecl> folderMDD;
void initMetadata() {
// WARN : statistic metadata must be last in list !
gameMDD.push_back(MetaDataDecl("emulator", MD_LIST, "default", false, _("Emulator"), _("enter emulator")));
gameMDD.push_back(MetaDataDecl("core", MD_LIST, "default", false, _("Core"), _("enter core")));
gameMDD.push_back(MetaDataDecl("ratio", MD_LIST, "auto", false, _("Ratio"), _("enter ratio")));
gameMDD.push_back(MetaDataDecl("name", MD_STRING, "", false, _("Name"), _("enter game name")));
gameMDD.push_back(MetaDataDecl("desc", MD_MULTILINE_STRING, "", false, _("Description"), _("enter description")));
gameMDD.push_back(MetaDataDecl("image", MD_IMAGE_PATH, "", false, _("Image"), _("enter path to image")));
gameMDD.push_back(MetaDataDecl("thumbnail", MD_IMAGE_PATH, "", false, _("Thumbnail"), _("enter path to thumbnail")));
gameMDD.push_back(MetaDataDecl("rating", MD_RATING, "0.000000", false, _("Rating"), _("enter rating")));
gameMDD.push_back(MetaDataDecl("releasedate", MD_DATE, "not-a-date-time", false, _("Release date"), _("enter release date")));
gameMDD.push_back(MetaDataDecl("developer", MD_STRING, "unknown", false, _("Developer"), _("enter game developer")));
gameMDD.push_back(MetaDataDecl("publisher", MD_STRING, "unknown", false, _("Publisher"), _("enter game publisher")));
gameMDD.push_back(MetaDataDecl("genre", MD_STRING, "unknown", false, _("Genre"), _("enter game genre")));
gameMDD.push_back(MetaDataDecl("players", MD_INT, "1", false, _("Players"), _("enter number of players")));
gameMDD.push_back(MetaDataDecl("favorite", MD_BOOL, "false", false, _("Favorite"), _("enter favorite")));
gameMDD.push_back(MetaDataDecl("region", MD_STRING, "", false, _("Region"), _("enter region")));
gameMDD.push_back(MetaDataDecl("romtype", MD_STRING, "Original", false, _("Romtype"), _("enter romtype")));
gameMDD.push_back(MetaDataDecl("hidden", MD_BOOL, "false", false, _("Hidden"), _("set hidden")));
gameMDD.push_back(MetaDataDecl("playcount", MD_INT, "0", true, _("Play count"), _("enter number of times played")));
gameMDD.push_back(MetaDataDecl("lastplayed", MD_TIME, "0", true, _("Last played"), _("enter last played date")));
folderMDD.push_back(MetaDataDecl("name", MD_STRING, "", false));
folderMDD.push_back(MetaDataDecl("desc", MD_MULTILINE_STRING, "", false));
folderMDD.push_back(MetaDataDecl("image", MD_IMAGE_PATH, "", false));
folderMDD.push_back(MetaDataDecl("thumbnail", MD_IMAGE_PATH, "", false));
folderMDD.push_back(MetaDataDecl("hidden", MD_BOOL, "false", false));
gameMDD.push_back(MetaDataDecl("name", MD_STRING, "", false, true, _("Name"), _("enter game name")));
gameMDD.push_back(MetaDataDecl("rating", MD_RATING, "0.000000", false, true, _("Rating"), _("enter rating")));
gameMDD.push_back(MetaDataDecl("favorite", MD_BOOL, "false", false, true, _("Favorite"), _("enter favorite")));
gameMDD.push_back(MetaDataDecl("hidden", MD_BOOL, "false", false, true, _("Hidden"), _("set hidden")));
gameMDD.push_back(MetaDataDecl("emulator", MD_LIST, "default", false, true, _("Emulator"), _("enter emulator")));
gameMDD.push_back(MetaDataDecl("core", MD_LIST, "default", false, true, _("Core"), _("enter core")));
gameMDD.push_back(MetaDataDecl("ratio", MD_LIST, "auto", false, true, _("Ratio"), _("enter ratio")));
gameMDD.push_back(MetaDataDecl("desc", MD_MULTILINE_STRING, "", false, false, _("Description"), _("enter description")));
gameMDD.push_back(MetaDataDecl("image", MD_IMAGE_PATH, "", false, false, _("Image"), _("enter path to image")));
gameMDD.push_back(MetaDataDecl("thumbnail", MD_IMAGE_PATH, "", false, false, _("Thumbnail"), _("enter path to thumbnail")));
gameMDD.push_back(MetaDataDecl("releasedate", MD_DATE, "not-a-date-time", false, false, _("Release date"), _("enter release date")));
gameMDD.push_back(MetaDataDecl("developer", MD_STRING, "unknown", false, false, _("Developer"), _("enter game developer")));
gameMDD.push_back(MetaDataDecl("publisher", MD_STRING, "unknown", false, false, _("Publisher"), _("enter game publisher")));
gameMDD.push_back(MetaDataDecl("genre", MD_STRING, "unknown", false, false, _("Genre"), _("enter game genre")));
gameMDD.push_back(MetaDataDecl("players", MD_INT, "1", false, false, _("Players"), _("enter number of players")));
gameMDD.push_back(MetaDataDecl("region", MD_STRING, "", false, false, _("Region"), _("enter region")));
gameMDD.push_back(MetaDataDecl("romtype", MD_STRING, "Original", false, false, _("Romtype"), _("enter romtype")));
gameMDD.push_back(MetaDataDecl("playcount", MD_INT, "0", true, false, _("Play count"), _("enter number of times played")));
gameMDD.push_back(MetaDataDecl("lastplayed", MD_TIME, "0", true, false, _("Last played"), _("enter last played date")));
folderMDD.push_back(MetaDataDecl("name", MD_STRING, "", false));
folderMDD.push_back(MetaDataDecl("desc", MD_MULTILINE_STRING, "", false));
folderMDD.push_back(MetaDataDecl("image", MD_IMAGE_PATH, "", false));
folderMDD.push_back(MetaDataDecl("thumbnail", MD_IMAGE_PATH, "", false));
folderMDD.push_back(MetaDataDecl("hidden", MD_BOOL, "false", false));
}
const std::vector<MetaDataDecl>& getMDDByType(MetaDataListType type)
......
......@@ -30,14 +30,16 @@ struct MetaDataDecl
MetaDataType type;
std::string defaultValue;
bool isStatistic; //if true, ignore scraper values for this metadata
bool isMain; //if true, display on main metadata editor GUI, else in secondary
std::string displayName; // displayed as this in editors
std::string displayPrompt; // phrase displayed in editors when prompted to enter value (currently only for strings)
MetaDataDecl(std::string key, MetaDataType type, std::string defaultValue, bool isStatistic, std::string displayName, std::string displayPrompt) {
MetaDataDecl(std::string key, MetaDataType type, std::string defaultValue, bool isStatistic, bool isMain, std::string displayName, std::string displayPrompt) {
this->key = key;
this->type = type;
this->defaultValue = defaultValue;
this->isStatistic = isStatistic;
this->isMain = isMain;
this->displayName = displayName;
this->displayPrompt = displayPrompt;
}
......@@ -47,6 +49,7 @@ struct MetaDataDecl
this->type = type;
this->defaultValue = defaultValue;
this->isStatistic = isStatistic;
this->isMain = true;
}
};
......
......@@ -130,7 +130,7 @@ void GuiGamelistOptions::openMetaDataEd()
file->getParent()->removeChild(file); //unlink it so list repopulations triggered from onFileChanged won't see it
getGamelist()->onFileChanged(file, FILE_REMOVED); //tell the view
},file->getSystem()));
},file->getSystem(), true));
}
void GuiGamelistOptions::jumpToLetter()
......
This diff is collapsed.
......@@ -11,7 +11,7 @@ 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, SystemData* system);
const std::string& header, std::function<void()> savedCallback, std::function<void()> deleteFunc, SystemData* system, bool main);
bool input(InputConfig* config, Input input) override;
void onSizeChanged() override;
......@@ -35,6 +35,7 @@ private:
ScraperSearchParams mScraperParams;
std::vector< std::shared_ptr<GuiComponent> > mEditors;
std::vector< MetaDataDecl > mMetaDataEditable;
std::vector<MetaDataDecl> mMetaDataDecl;
MetaDataList* mMetaData;
......
......@@ -131,6 +131,10 @@ msgstr ""
msgid "EDIT METADATA"
msgstr ""
#:
msgid "MORE DETAILS"
msgstr ""
#:
msgid "SCRAPE"
msgstr ""
......
......@@ -122,6 +122,10 @@ msgstr "OK"
msgid "EDIT METADATA"
msgstr "ÉDITER LES DONNÉES"
#:
msgid "MORE DETAILS"
msgstr "PLUS DE DETAILS"
#:
msgid "SCRAPE"
msgstr "SCRAPPER"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment