wesnoth-cvs-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Wesnoth-cvs-commits] wesnoth src/help.cpp data/units/Spearman.cfg


From: David White
Subject: [Wesnoth-cvs-commits] wesnoth src/help.cpp data/units/Spearman.cfg
Date: Sun, 22 May 2005 11:54:18 -0400

CVSROOT:        /cvsroot/wesnoth
Module name:    wesnoth
Branch:         
Changes by:     David White <address@hidden>    05/05/22 15:54:18

Modified files:
        src            : help.cpp 
        data/units     : Spearman.cfg 

Log message:
        added portrait support to help for units and set spearman portrait

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/help.cpp.diff?tr1=1.100&tr2=1.101&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/data/units/Spearman.cfg.diff?tr1=1.19&tr2=1.20&r1=text&r2=text

Patches:
Index: wesnoth/data/units/Spearman.cfg
diff -u wesnoth/data/units/Spearman.cfg:1.19 
wesnoth/data/units/Spearman.cfg:1.20
--- wesnoth/data/units/Spearman.cfg:1.19        Mon Mar 28 08:10:56 2005
+++ wesnoth/data/units/Spearman.cfg     Sun May 22 15:54:18 2005
@@ -4,6 +4,7 @@
 race=human
 image="human-spearman.png"
 image_defensive="human-spearman-defend-2.png"
+profile="portraits/core/Jason_Lutes/human-spearman.png"
 hitpoints=36
 movement_type=smallfoot
 movement=5
Index: wesnoth/src/help.cpp
diff -u wesnoth/src/help.cpp:1.100 wesnoth/src/help.cpp:1.101
--- wesnoth/src/help.cpp:1.100  Tue May 17 22:19:40 2005
+++ wesnoth/src/help.cpp        Sun May 22 15:54:18 2005
@@ -1027,9 +1027,23 @@
                ss << "<img>src='" << male_type.image() << "'</img> ";
 
                if (&female_type != &male_type)
-                       ss << "<img>src='" << female_type.image() << "'</img> ";
+                       ss << "<img>src='" << female_type.image() << "'</img> ";
+
                ss << "<format>font_size=" << font::relative_size(11) << " 
text=' " << escape(_("level"))
-                  << " " << type_.level() << "'</format>\n";
+                  << " " << type_.level() << "'</format>";
+
+               const std::string& male_portrait = male_type.image_profile();
+               const std::string& female_portrait = 
female_type.image_profile();
+
+               if (male_portrait.empty() == false) {
+                       ss << "<img>src='" << male_portrait << "' 
align='right'</img> ";
+               }
+
+               if (female_portrait.empty() == false && female_portrait != 
male_portrait) {
+                       ss << "<img>src='" << female_portrait << "' 
align='right'</img> ";
+               }
+
+               ss << "\n";
 
                // Print the units this unit can advance to. Cross reference
                // to the topics containing information about those units.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]