Skip to content

Commit

Permalink
fix colors for unit restitance
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
gfgtdf committed Jan 28, 2016
1 parent c402d4c commit 498581d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/unit_helper.cpp
Expand Up @@ -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");
}

}

0 comments on commit 498581d

Please sign in to comment.