Removed Credits section from help browser (fixes #2555)

I had disabled this when I redid the End Credits screen in GUI2 (476027f) since (IIRC)
I didn't want to figure out about parsing the new config-based credits storage. The topic
remained in Help, empty. We've decided the new End Credits screen is a better method for
viewing the credits anyway, so I'm now removing the topic.
This commit is contained in:
Charles Dang 2018-03-03 21:27:19 +11:00
parent 8b80fa6635
commit 044dedb43a
3 changed files with 1 additions and 39 deletions

View file

@ -2,7 +2,7 @@
[help]
[toplevel]
sections=introduction,gameplay,units,abilities_section,traits_section,weapon_specials,eras_section,terrains_section,schedule,addons,editor,commands,encyclopedia
topics=about,license
topics=license
[/toplevel]
[section]
@ -379,12 +379,6 @@ Unlike other forms of healing, the heals ability will not take effect on the hea
text= _ "This concludes the fundamentals of Wesnoth. You might want to read up on basic strategy, or familiarize yourself with <ref>dst='..traits_section' text='traits'</ref> and <ref>dst='..abilities_section' text='abilities'</ref>, but you now know everything you need to know to play the <italic>text='Heir to the Throne'</italic> campaign. Have fun, and good luck!"
[/topic]
[topic]
id=about
title= _ "ingame_help_item^Contributors" # wmllint: no spellcheck
generator=about
[/topic]
[topic]
id=license
title= _ "License"

View file

@ -312,8 +312,6 @@ std::string generate_topic_text(const std::string &generator, const config *help
std::string empty_string = "";
if (generator.empty()) {
return empty_string;
} else if (generator == "about") {
return generate_about_text();
} else {
std::vector<std::string> parts = utils::split(generator, ':');
if (parts.size() > 1 && parts[0] == "contents") {
@ -1014,18 +1012,6 @@ UNIT_DESCRIPTION_TYPE description_type(const unit_type &type)
return NO_DESCRIPTION;
}
std::string generate_about_text()
{
/*std::vector<std::string> about_lines = about::get_text();
std::vector<std::string> res_lines;
std::transform(about_lines.begin(), about_lines.end(), std::back_inserter(res_lines),
about_text_formatter());
res_lines.erase(std::remove(res_lines.begin(), res_lines.end(), ""), res_lines.end());
std::string text = utils::join(res_lines, "\n");
return text;*/
return "";
}
std::string generate_contents_links(const std::string& section_name, config const *help_cfg)
{
const config& section_cfg = help_cfg->find_child("section", "id", section_name);

View file

@ -231,7 +231,6 @@ void generate_sections(const config *help_cfg, const std::string &generator, sec
std::vector<topic> generate_topics(const bool sort_topics,const std::string &generator);
std::string generate_topic_text(const std::string &generator, const config *help_cfg,
const section &sec, const std::vector<topic>& generated_topics);
std::string generate_about_text();
std::string generate_contents_links(const std::string& section_name, config const *help_cfg);
std::string generate_contents_links(const section &sec, const std::vector<topic>& topics);
@ -354,23 +353,6 @@ bool is_visible_id(const std::string &id);
/// be defined in the config.
bool is_valid_id(const std::string &id);
/// Class to be used as a function object when generating the about
/// text. Translate the about dialog formatting to format suitable
/// for the help dialog.
class about_text_formatter {
public:
std::string operator()(const std::string &s) {
if (s.empty()) return s;
// Format + as headers, and the rest as normal text.
if (s[0] == '+')
return " \n<header>text='" + help::escape(s.substr(1)) + "'</header>";
if (s[0] == '-')
return s.substr(1);
return s;
}
};
// Helpers for making generation of topics easier.
inline std::string make_link(const std::string& text, const std::string& dst)