statistics_dialog: Move a static tooltip from C++ to WML
This commit is contained in:
parent
4bcd0ba620
commit
bc90feedee
2 changed files with 9 additions and 9 deletions
|
@ -568,7 +568,9 @@ The sum (or difference) of the two numbers in parentheses is the actual number o
|
|||
(_ "Hits") hits_this_turn_header stats_list_hits hits_type hits_overall hits_this_turn
|
||||
# The tooltips are in statistics_dialog::add_hits_row because dynamic data is appended to them
|
||||
""
|
||||
""}
|
||||
(_"stats dialog^Estimate of how much randomness of battles favored or disfavored this side.
|
||||
Values between 0 and 50 suggest the number of hits was less than expected.
|
||||
Values between 50 and 100 suggest the number of hits was more than expected.")}
|
||||
[/column]
|
||||
|
||||
[/row]
|
||||
|
|
|
@ -332,12 +332,9 @@ void statistics_dialog::add_hits_row(
|
|||
item["tooltip"] = tooltip_static_part + element.tooltip;
|
||||
item["label"] = element.hitrate_str;
|
||||
data.emplace("hits_overall", item);
|
||||
item["tooltip"] = _(
|
||||
"stats dialog^Estimate of how much randomness of battles favored or disfavored this side.\n"
|
||||
"Values between 0 and 50 suggest the number of hits was less than expected."
|
||||
"Values between 50 and 100 suggest the number of hits was more than expected.");
|
||||
item["label"] = element.pvalue_str;
|
||||
data.emplace("overall_score", item);
|
||||
|
||||
// Don't set the tooltip; it's set in WML.
|
||||
data.emplace("overall_score", string_map { { "label", element.pvalue_str } });
|
||||
|
||||
if(show_this_turn) {
|
||||
label& this_turn_header = find_widget<label>(&window, "hits_this_turn_header", false);
|
||||
|
@ -347,8 +344,9 @@ void statistics_dialog::add_hits_row(
|
|||
item["tooltip"] = tooltip_static_part + element.tooltip;
|
||||
item["label"] = element.hitrate_str;
|
||||
data.emplace("hits_this_turn", item);
|
||||
item["label"] = element.pvalue_str;
|
||||
data.emplace("this_turn_score", item);
|
||||
|
||||
// Don't set the tooltip; it's set in WML.
|
||||
data.emplace("this_turn_score", string_map { { "label", element.pvalue_str } });
|
||||
} else {
|
||||
// TODO: Setting the label to "" causes "This Turn" not to be drawn when changing back to the current scenraio view, so set the label to " " (a single space) instead.
|
||||
label& this_turn_header = find_widget<label>(&window, "hits_this_turn_header", false);
|
||||
|
|
Loading…
Add table
Reference in a new issue