Changed metadata text entry prompts to be more descriptive.

This commit is contained in:
Aloshi 2014-04-30 12:16:56 -05:00
parent 63113aeea7
commit a9514843b4
3 changed files with 15 additions and 13 deletions

View file

@ -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<MetaDataDecl> gameMDD(gameDecls, gameDecls + sizeof(gameDecls) / sizeof(gameDecls[0]));

View file

@ -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");

View file

@ -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));