help: automatically scale unit_type.profile in the absence of unit_type.small_profile

Prior to this, profile= was used in the absence of small_profile, but not scaled, requiring
the manual specification of a 'small_profile=profile~SCALE()' line in unit type files if no
unique small profile image was provided. Since it appears the help browser is the only place
that used small_profile, we move the scaling here.

The standard value of 205x205 is used.
This commit is contained in:
Charles Dang 2015-07-18 22:03:34 +11:00
parent db54a8dce5
commit 57ad85a17b

View file

@ -260,11 +260,11 @@ std::string unit_topic_generator::operator()() const {
const std::string &female_portrait = female_type.small_profile();
if (male_portrait.empty() == false && male_portrait != male_type.image()) {
ss << "<img>src='" << male_portrait << "~BG()' align='right'</img> ";
ss << "<img>src='" << male_portrait << "~SCALE(205,205)~BG()' align='right'</img> ";
}
if (female_portrait.empty() == false && female_portrait != male_portrait && female_portrait != female_type.image()) {
ss << "<img>src='" << female_portrait << "~BG()' align='right'</img> ";
ss << "<img>src='" << female_portrait << "~SCALE(205,205)~BG()' align='right'</img> ";
}
ss << "\n";