From a9514843b487c9df90589d61012cad3edef1fc1b Mon Sep 17 00:00:00 2001 From: Aloshi Date: Wed, 30 Apr 2014 12:16:56 -0500 Subject: [PATCH] Changed metadata text entry prompts to be more descriptive. --- src/MetaData.cpp | 25 +++++++++++++------------ src/MetaData.h | 1 + src/guis/GuiMetaDataEd.cpp | 2 +- 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/src/MetaData.cpp b/src/MetaData.cpp index 3e3682552..6b742af12 100644 --- a/src/MetaData.cpp +++ b/src/MetaData.cpp @@ -3,18 +3,19 @@ #include "Log.h" MetaDataDecl gameDecls[] = { - {"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"} + // key, type, default, statistic, name in GuiMetaDataEd, prompt in GuiMetaDataEd + {"name", MD_STRING, "", false, "name", "enter game name"}, + {"desc", MD_MULTILINE_STRING, "", false, "description", "enter description"}, + {"image", MD_IMAGE_PATH, "", false, "image", "enter path to image"}, + {"thumbnail", MD_IMAGE_PATH, "", false, "thumbnail", "enter path to thumbnail"}, + {"rating", MD_RATING, "0", false, "rating", "enter rating"}, + {"releasedate", MD_DATE, "0", false, "release date", "enter release date"}, + {"developer", MD_STRING, "unknown", false, "developer", "enter game developer"}, + {"publisher", MD_STRING, "unknown", false, "publisher", "enter game publisher"}, + {"genre", MD_STRING, "unknown", false, "genre", "enter game genre"}, + {"players", MD_INT, "1", false, "players", "enter number of players"}, + {"playcount", MD_INT, "0", true, "play count", "enter number of times played"}, + {"lastplayed", MD_TIME, "0", true, "last played", "enter last played date"} }; const std::vector gameMDD(gameDecls, gameDecls + sizeof(gameDecls) / sizeof(gameDecls[0])); diff --git a/src/MetaData.h b/src/MetaData.h index d2a9e26b8..fa28fc547 100644 --- a/src/MetaData.h +++ b/src/MetaData.h @@ -28,6 +28,7 @@ struct MetaDataDecl std::string defaultValue; bool isStatistic; //if true, ignore scraper values for this metadata std::string displayName; // displayed as this in editors + std::string displayPrompt; // phrase displayed in editors when prompted to enter value (currently only for strings) }; 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 ea2977b89..c56514ecd 100644 --- a/src/guis/GuiMetaDataEd.cpp +++ b/src/guis/GuiMetaDataEd.cpp @@ -111,7 +111,7 @@ GuiMetaDataEd::GuiMetaDataEd(Window* window, MetaDataList* md, const std::vector row.addElement(bracket, false); bool multiLine = iter->type == MD_MULTILINE_STRING; - const std::string title = "INPUT GAME " + iter->key; + const std::string title = iter->displayPrompt; auto updateVal = [ed](const std::string& newVal) { ed->setValue(newVal); }; // ok callback (apply new value to ed) row.makeAcceptInputHandler([this, title, ed, updateVal, multiLine] { mWindow->pushGui(new GuiTextEditPopup(mWindow, title, ed->getValue(), updateVal, multiLine));