mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-07 10:51:11 +00:00
Help: Reorder columns in unit help page
This commit is contained in:
parent
4c247fd873
commit
0f1d70dbdc
@ -557,9 +557,9 @@ std::string unit_topic_generator::operator()() const {
|
|||||||
// Dummy element, icons are below.
|
// Dummy element, icons are below.
|
||||||
first_row.push_back(item("", 0));
|
first_row.push_back(item("", 0));
|
||||||
push_header(first_row, _("unit help^Name"));
|
push_header(first_row, _("unit help^Name"));
|
||||||
push_header(first_row, _("Type"));
|
|
||||||
push_header(first_row, _("Strikes"));
|
push_header(first_row, _("Strikes"));
|
||||||
push_header(first_row, _("Range"));
|
push_header(first_row, _("Range"));
|
||||||
|
push_header(first_row, _("Type"));
|
||||||
push_header(first_row, _("Special"));
|
push_header(first_row, _("Special"));
|
||||||
table.push_back(first_row);
|
table.push_back(first_row);
|
||||||
// Print information about every attack.
|
// Print information about every attack.
|
||||||
@ -577,17 +577,15 @@ std::string unit_topic_generator::operator()() const {
|
|||||||
// Attack name
|
// Attack name
|
||||||
push_tab_pair(row, lang_weapon);
|
push_tab_pair(row, lang_weapon);
|
||||||
|
|
||||||
// Damage type, with icon
|
|
||||||
const auto padding = 5; // TODO amount of padding?
|
|
||||||
const std::string type_icon = "icons/profiles/" + attack.type() + ".png";
|
|
||||||
push_tab_pair(row, lang_type, type_icon, padding);
|
|
||||||
|
|
||||||
// damage x strikes
|
// damage x strikes
|
||||||
attack_ss << attack.damage() << font::weapon_numbers_sep << attack.num_attacks()
|
attack_ss << attack.damage() << font::weapon_numbers_sep << attack.num_attacks()
|
||||||
<< " " << attack.accuracy_parry_description();
|
<< " " << attack.accuracy_parry_description();
|
||||||
push_tab_pair(row, attack_ss.str());
|
push_tab_pair(row, attack_ss.str());
|
||||||
attack_ss.str(clear_stringstream);
|
attack_ss.str(clear_stringstream);
|
||||||
|
|
||||||
|
// Padding for range and damage type icons
|
||||||
|
const auto padding = 5; // TODO amount of padding?
|
||||||
|
|
||||||
// Range, with icon
|
// Range, with icon
|
||||||
const std::string range_icon = "icons/profiles/" + attack.range() + "_attack.png";
|
const std::string range_icon = "icons/profiles/" + attack.range() + "_attack.png";
|
||||||
if (attack.min_range() > 1 || attack.max_range() > 1) {
|
if (attack.min_range() > 1 || attack.max_range() > 1) {
|
||||||
@ -597,6 +595,10 @@ std::string unit_topic_generator::operator()() const {
|
|||||||
push_tab_pair(row, attack_ss.str(), range_icon, padding);
|
push_tab_pair(row, attack_ss.str(), range_icon, padding);
|
||||||
attack_ss.str(clear_stringstream);
|
attack_ss.str(clear_stringstream);
|
||||||
|
|
||||||
|
// Damage type, with icon
|
||||||
|
const std::string type_icon = "icons/profiles/" + attack.type() + ".png";
|
||||||
|
push_tab_pair(row, lang_type, type_icon, padding);
|
||||||
|
|
||||||
// Show this attack's special, if it has any. Cross
|
// Show this attack's special, if it has any. Cross
|
||||||
// reference it to the section describing the special.
|
// reference it to the section describing the special.
|
||||||
std::vector<std::pair<t_string, t_string>> specials = attack.special_tooltips();
|
std::vector<std::pair<t_string, t_string>> specials = attack.special_tooltips();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user