mail[Wesnoth-commits] r43206 - /trunk/src/generate_report.cpp


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by alinktomine on June 06, 2010 - 19:25:
Author: alink
Date: Sun Jun  6 19:25:13 2010
New Revision: 43206

URL: http://svn.gna.org/viewcvs/wesnoth?rev=43206&view=rev
Log:
Move accuracy/parry to its own line and toolip.
Take one more precious line, but was frequently unreadable before.

Modified:
    trunk/src/generate_report.cpp

Modified: trunk/src/generate_report.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/generate_report.cpp?rev=43206&r1=43205&r2=43206&view=diff
==============================================================================
--- trunk/src/generate_report.cpp (original)
+++ trunk/src/generate_report.cpp Sun Jun  6 19:25:13 2010
@@ -366,10 +366,10 @@
                                nattacks = swarm_min_attacks + 
(swarm_max_attacks - swarm_min_attacks) * hitp / mhitp;
                        }
 
-                       str << span_color(font::weapon_color);
-                       str << damage << '-' << nattacks;
-                       str << ' ' << at.name() << ' ' << 
at.accuracy_parry_description();
-                       str << "</span>\n";
+                       str << span_color(font::weapon_color)
+                               << damage << '-' << nattacks
+                               << ' ' << at.name()
+                               << "</span>\n";
 
                        tooltip << _("Weapon: ") << "<b>" << at.name() << 
"</b>\n"
                                << _("Damage: ") << "<b>" << damage << 
"</b>\n";
@@ -394,16 +394,6 @@
                                tooltip << "\t" << _("Base attacks: ") << 
base_nattacks << "\n";
                                int hp_ratio = u->hitpoints() * 100 / 
u->max_hitpoints();
                                tooltip << "\t" << _("Swarm: ") << "* "<< 
hp_ratio <<"%" << "\n";
-                       }
-
-                       int accuracy = at.accuracy();
-                       if(accuracy) {
-                               tooltip << _("Accuracy :") << "<b>" << 
accuracy << "</b>\n";
-                       }
-
-                       int parry = at.parry();
-                       if(parry) {
-                               tooltip << _("Parry :") << "<b>" << parry << 
"</b>\n";
                        }
 
                        res.add_text(flush(str), flush(tooltip));
@@ -451,6 +441,23 @@
 
                        res.add_text(flush(str), flush(tooltip));
 
+                       const std::string& accuracy_parry = 
at.accuracy_parry_description();
+                       if(!accuracy_parry.empty()){
+                               str << span_color(font::weapon_details_color)
+                                       << "  " << accuracy_parry << 
"</span>\n";
+                               int accuracy = at.accuracy();
+                               if(accuracy) {
+                                       tooltip << _("Accuracy :") << "<b>"
+                                               << signed_percent(accuracy) 
<< "</b>\n";
+                               }
+                               int parry = at.parry();
+                               if(parry) {
+                                       tooltip << _("Parry :") << "<b>"
+                                               << signed_percent(parry) << 
"</b>\n";
+                               }
+                               res.add_text(flush(str), flush(tooltip));
+                       }
+
                        const std::vector<t_string> &specials = 
at.special_tooltips();
 
                        if(! specials.empty()) {




Related Messages


Powered by MHonArc, Updated Sun Jun 06 19:40:09 2010