Campaign Difficulty: consolidated both lines into a single label
(cherry-picked from commit f72f89f4d5
)
This commit is contained in:
parent
fbdc6814e0
commit
075d793539
2 changed files with 18 additions and 45 deletions
|
@ -171,44 +171,13 @@
|
|||
[column]
|
||||
grow_factor = 1
|
||||
horizontal_grow = true
|
||||
border = "all"
|
||||
border_size = 5
|
||||
|
||||
[grid]
|
||||
|
||||
[row]
|
||||
|
||||
[column]
|
||||
grow_factor = 1
|
||||
horizontal_grow = true
|
||||
border = "all"
|
||||
border_size = 5
|
||||
|
||||
[label]
|
||||
id = "label"
|
||||
definition = "default_large"
|
||||
[/label]
|
||||
|
||||
[/column]
|
||||
|
||||
[/row]
|
||||
|
||||
[row]
|
||||
|
||||
[column]
|
||||
grow_factor = 1
|
||||
horizontal_grow = true
|
||||
border = "all"
|
||||
border_size = 5
|
||||
|
||||
[label]
|
||||
id = "description"
|
||||
definition = "default"
|
||||
[/label]
|
||||
|
||||
[/column]
|
||||
|
||||
[/row]
|
||||
|
||||
[/grid]
|
||||
[label]
|
||||
id = "label"
|
||||
definition = "default_large"
|
||||
[/label]
|
||||
|
||||
[/column]
|
||||
|
||||
|
|
|
@ -135,16 +135,20 @@ void campaign_difficulty::pre_show(window& window)
|
|||
|
||||
item["use_markup"] = "true";
|
||||
|
||||
item["label"] = d["label"];
|
||||
std::ostringstream ss;
|
||||
ss << d["label"];
|
||||
|
||||
if(!d["description"].empty()) {
|
||||
if (!d["old_markup"].to_bool()) {
|
||||
ss << "\n<small>" << font::span_color(font::GRAY_COLOR) << "(" << d["description"].str() << ")</span></small>"";
|
||||
} else {
|
||||
ss << "\n<small>" << d["description"] << "</small>";
|
||||
}
|
||||
}
|
||||
|
||||
item["label"] = ss.str();
|
||||
data.emplace("label", item);
|
||||
|
||||
const std::string descrip_text = d["old_markup"].to_bool() || d["description"].empty()
|
||||
? d["description"]
|
||||
: (formatter() << font::span_color(font::GRAY_COLOR) << "(" << d["description"].str() << ")</span>").str();
|
||||
|
||||
item["label"] = descrip_text;
|
||||
data.emplace("description", item);
|
||||
|
||||
grid& grid = list.add_row(data);
|
||||
|
||||
if(d["default"].to_bool(false)) {
|
||||
|
|
Loading…
Add table
Reference in a new issue