mail[Wesnoth-commits] r43209 - in /trunk/src: dialogs.cpp generate_report.cpp marked-up_text.cpp marked-up_text.hpp


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

Header


Content

Posted by alinktomine on June 06, 2010 - 20:27:
Author: alink
Date: Sun Jun  6 20:27:10 2010
New Revision: 43209

URL: http://svn.gna.org/viewcvs/wesnoth?rev=43209&view=rev
Log:
Define in one place the separators used for weapon stats (8-3 and 
melee--blade)

Modified:
    trunk/src/dialogs.cpp
    trunk/src/generate_report.cpp
    trunk/src/marked-up_text.cpp
    trunk/src/marked-up_text.hpp

Modified: trunk/src/dialogs.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/dialogs.cpp?rev=43209&r1=43208&r2=43209&view=diff
==============================================================================
--- trunk/src/dialogs.cpp (original)
+++ trunk/src/dialogs.cpp Sun Jun  6 20:27:10 2010
@@ -792,11 +792,14 @@
 
                        // see generate_report() in generate_report.cpp
                        text << font::weapon
-                               << at_it->damage() << "-" << 
at_it->num_attacks()
+                               << at_it->damage()
+                               << font::weapon_numbers_sep
+                               << at_it->num_attacks()
                                << " " << at_it->name() << "\n";
                        text << font::weapon_details
                                << "  " << _(at_it->range().c_str())
-                               << "--" << _(at_it->type().c_str()) << "\n";
+                               << font::weapon_details_sep
+                               << _(at_it->type().c_str()) << "\n";
 
                        std::string accuracy_parry = 
at_it->accuracy_parry_description();
                        if(accuracy_parry.empty() == false) {

Modified: trunk/src/generate_report.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/generate_report.cpp?rev=43209&r1=43208&r2=43209&view=diff
==============================================================================
--- trunk/src/generate_report.cpp (original)
+++ trunk/src/generate_report.cpp Sun Jun  6 20:27:10 2010
@@ -367,7 +367,7 @@
                        }
 
                        str << span_color(font::weapon_color)
-                               << damage << '-' << nattacks
+                               << damage << font::weapon_numbers_sep << 
nattacks
                                << ' ' << at.name()
                                << "</span>\n";
 
@@ -402,7 +402,8 @@
                        std::string lang_type = gettext(at.type().c_str());
 
                        str << span_color(font::weapon_details_color) << "  "
-                               << range << "--" << lang_type << "</span>\n";
+                               << range << font::weapon_details_sep
+                               << lang_type << "</span>\n";
 
                        tooltip << _("Weapon range: ") << "<b>" << range << 
"</b>\n"
                                << _("Damage type: ")  << "<b>" << lang_type 
<< "</b>\n";

Modified: trunk/src/marked-up_text.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/marked-up_text.cpp?rev=43209&r1=43208&r2=43209&view=diff
==============================================================================
--- trunk/src/marked-up_text.cpp (original)
+++ trunk/src/marked-up_text.cpp Sun Jun  6 20:27:10 2010
@@ -39,16 +39,18 @@
            GREEN_TEXT='@', RED_TEXT='#',
            COLOR_TEXT='<', IMAGE='&';
 
-// some colors often used in UI
 const std::string weapon = "<245,230,193>",
                weapon_details = "<166,146,117>",
                unit_type = "<245,230,193>",
                race = "<166,146,117>";
+
 const SDL_Color
        weapon_color = { 245, 230, 193, 0 },
        weapon_details_color = { 166, 146, 117, 0 },
        unit_type_color = { 245, 230, 193, 0 },
        race_color = { 166, 146, 117, 0 };
+
+const std::string weapon_numbers_sep = "-", weapon_details_sep = "--";
 
 std::string::const_iterator parse_markup(std::string::const_iterator i1,
                                                                              
                  std::string::const_iterator i2,

Modified: trunk/src/marked-up_text.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/marked-up_text.hpp?rev=43209&r1=43208&r2=43209&view=diff
==============================================================================
--- trunk/src/marked-up_text.hpp (original)
+++ trunk/src/marked-up_text.hpp Sun Jun  6 20:27:10 2010
@@ -29,9 +29,13 @@
 extern const char LARGE_TEXT, SMALL_TEXT, BOLD_TEXT, NORMAL_TEXT, 
NULL_MARKUP, BLACK_TEXT, GRAY_TEXT,
                   GOOD_TEXT, BAD_TEXT, GREEN_TEXT, RED_TEXT, COLOR_TEXT, 
YELLOW_TEXT, IMAGE;
 
+// some colors often used in UI
 extern const std::string weapon, weapon_details, unit_type, race;
 
 extern const SDL_Color weapon_color, weapon_details_color, unit_type_color, 
race_color;
+
+// separator bewteen damage-hits and range--type
+extern const std::string weapon_numbers_sep, weapon_details_sep;
 
 /** Parses the markup-tags at the front of a string. */
 std::string::const_iterator parse_markup(std::string::const_iterator i1,




Related Messages


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