CampaignWML: Support auto_markup=false to suppress automatic parentheses.

https://forums.wesnoth.org/viewtopic.php?p=640178#p639809
This commit is contained in:
josteph 2019-03-25 23:04:32 +00:00
parent 306589cfd9
commit c44aa31158

View file

@ -135,7 +135,9 @@ void campaign_difficulty::pre_show(window& window)
ss << d["label"];
if(!d["description"].empty()) {
if (!d["old_markup"].to_bool()) {
if (d["auto_markup"].to_bool(true) == false) {
ss << "\n" << d["description"].str();
} else if (!d["old_markup"].to_bool()) {
ss << "\n<small>" << font::span_color(font::GRAY_COLOR) << "(" << d["description"].str() << ")</span></small>";
} else {
ss << "\n<small>" << font::span_color(font::GRAY_COLOR) << d["description"] << "</span></small>";