From f601531ec6feebd3688f7b4e49fb2922a458cc04 Mon Sep 17 00:00:00 2001 From: Aloshi Date: Sat, 19 Apr 2014 15:38:55 -0500 Subject: [PATCH] Added "displayName" to MetaDataDecls and updated GuiMetaDataEd accordingly. This was "desc" gets displayed as "description", spaces can be used, etc. --- src/MetaData.cpp | 24 ++++++++++++------------ src/MetaData.h | 1 + src/guis/GuiMetaDataEd.cpp | 2 +- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/src/MetaData.cpp b/src/MetaData.cpp index 5ea5a5bb3..3e3682552 100644 --- a/src/MetaData.cpp +++ b/src/MetaData.cpp @@ -3,18 +3,18 @@ #include "Log.h" MetaDataDecl gameDecls[] = { - {"name", MD_STRING, "", false}, - {"desc", MD_MULTILINE_STRING, "", false}, - {"image", MD_IMAGE_PATH, "", false}, - {"thumbnail", MD_IMAGE_PATH, "", false}, - {"rating", MD_RATING, "0", false}, - {"releasedate", MD_DATE, "0", false}, - {"developer", MD_STRING, "unknown", false}, - {"publisher", MD_STRING, "unknown", false}, - {"genre", MD_STRING, "unknown", false}, - {"players", MD_INT, "1", false}, - {"playcount", MD_INT, "0", true}, - {"lastplayed", MD_TIME, "0", true} + {"name", MD_STRING, "", false, "name"}, + {"desc", MD_MULTILINE_STRING, "", false, "description"}, + {"image", MD_IMAGE_PATH, "", false, "image"}, + {"thumbnail", MD_IMAGE_PATH, "", false, "thumbnail"}, + {"rating", MD_RATING, "0", false, "rating"}, + {"releasedate", MD_DATE, "0", false, "release date"}, + {"developer", MD_STRING, "unknown", false, "developer"}, + {"publisher", MD_STRING, "unknown", false, "publisher"}, + {"genre", MD_STRING, "unknown", false, "genre"}, + {"players", MD_INT, "1", false, "players"}, + {"playcount", MD_INT, "0", true, "play count"}, + {"lastplayed", MD_TIME, "0", true, "last played"} }; const std::vector gameMDD(gameDecls, gameDecls + sizeof(gameDecls) / sizeof(gameDecls[0])); diff --git a/src/MetaData.h b/src/MetaData.h index 9842edfb7..d2a9e26b8 100644 --- a/src/MetaData.h +++ b/src/MetaData.h @@ -27,6 +27,7 @@ struct MetaDataDecl MetaDataType type; std::string defaultValue; bool isStatistic; //if true, ignore scraper values for this metadata + std::string displayName; // displayed as this in editors }; boost::posix_time::ptime string_to_ptime(const std::string& str, const std::string& fmt = "%Y%m%dT%H%M%S%F%q"); diff --git a/src/guis/GuiMetaDataEd.cpp b/src/guis/GuiMetaDataEd.cpp index b195e1d42..b4c547773 100644 --- a/src/guis/GuiMetaDataEd.cpp +++ b/src/guis/GuiMetaDataEd.cpp @@ -53,7 +53,7 @@ GuiMetaDataEd::GuiMetaDataEd(Window* window, MetaDataList* md, const std::vector // create ed and add it (and any related components) to mMenu // ed's value will be set below ComponentListRow row; - auto lbl = std::make_shared(mWindow, strToUpper(iter->key), Font::get(FONT_SIZE_SMALL), 0x777777FF); + auto lbl = std::make_shared(mWindow, strToUpper(iter->displayName), Font::get(FONT_SIZE_SMALL), 0x777777FF); row.addElement(lbl, true); // label switch(iter->type)