GUI2: Improve an error message

This commit is contained in:
Celtic Minstrel 2016-02-16 18:13:43 -05:00
parent fc12c8bcc8
commit d8268c0bd6
2 changed files with 5 additions and 5 deletions

View file

@ -399,8 +399,8 @@ twindow_builder::tresolution::tresolution(const config& cfg)
, click_dismiss(cfg["click_dismiss"].to_bool())
, definition(cfg["definition"])
, linked_groups()
, tooltip(cfg.child_or_empty("tooltip"))
, helptip(cfg.child_or_empty("helptip"))
, tooltip(cfg.child_or_empty("tooltip"), "tooltip")
, helptip(cfg.child_or_empty("helptip"), "helptip")
, grid(0)
{
if(!cfg["functions"].empty()) {
@ -452,10 +452,10 @@ twindow_builder::tresolution::tresolution(const config& cfg)
}
}
twindow_builder::tresolution::ttip::ttip(const config& cfg) : id(cfg["id"])
twindow_builder::tresolution::ttip::ttip(const config& cfg, const std::string& tagname) : id(cfg["id"])
{
VALIDATE(!id.empty(),
missing_mandatory_wml_key("[window][resolution][tip]", "id"));
missing_mandatory_wml_key("[window][resolution][" + tagname + "]", "id"));
}
/*WIKI

View file

@ -203,7 +203,7 @@ public:
/** Helper struct to store information about the tips. */
struct ttip
{
ttip(const config& cfg);
ttip(const config& cfg, const std::string& tagname);
std::string id;
};