mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-02 18:43:30 +00:00
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:
parent
c402d4cc7e
commit
498581d412
@ -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");
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user