fix colors for unit restitance

previously they used named colors which depend on the pango version
used. Specially it could happen that a dark green was used for very good
resitances which was hard to read on the black/brown background of the
ingame ui.
This commit is contained in:
gfgtdf 2016-01-28 02:02:39 +01:00
parent c402d4cc7e
commit 498581d412

View File

@ -36,15 +36,15 @@ bool will_certainly_advance(const unit_map::iterator &u)
std::string resistance_color(const int resistance)
{
if (resistance < 0)
return std::string("red");
return std::string("#FF0000");
if (resistance <= 20)
return std::string("yellow");
return std::string("#FFFF00");
if (resistance <= 40)
return std::string("white");
return std::string("#FFFFFF");
return std::string("green");
return std::string("#00FF00");
}
}