Use 72x72 blank hexes for padding in the add-ons download list...

...when their icons are not provided/the image cannot be resolved.

In debug mode, the 72x72 working peasant from the image system does the
job instead.
This commit is contained in:
Ignacio R. Morelle 2009-09-25 01:31:49 +00:00
parent 95f8f416dc
commit 19c1b0e26e

View file

@ -1022,6 +1022,9 @@ namespace {
sizes.push_back(-atoi(size.c_str()));
std::string icon = c["icon"];
if(icon.empty() || image::get_image(icon).null()) {
icon = "misc/blank-hex.png";
}
if(icon.find("units/") != std::string::npos &&
icon.find_first_of('~') == std::string::npos) {
//a hack to prevent magenta icons, because they look awful