Add a slighlty dark background (black with alpha 0.3) to hp/xp bars.

This helps bug #11030 (lower the risk of confusion with colors under
the bars, caused by terrains or by the unit, like the drake burner's
wing or the elvish fighter'sword (who always look near AMLA). Also
useful on snow terrains.  Maybe the 0.3 value must be tuned. This also
compensate a little the change of the alpha of bars from the previous
commit (brighter bar but darker background)
This commit is contained in:
Ali El Gariani 2008-02-14 00:08:05 +00:00
parent a69ada3bc6
commit 1e4653f20b
3 changed files with 4 additions and 4 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 164 B

After

Width:  |  Height:  |  Size: 190 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 235 B

After

Width:  |  Height:  |  Size: 238 B

View file

@ -930,10 +930,10 @@ void game_display::float_label(const gamemap::location& loc, const std::string&
}
struct is_energy_colour {
bool operator()(Uint32 colour) const { return (colour&0xFF000000) < 0x50000000 &&
(colour&0x00FF0000) > 0x00990000 &&
(colour&0x0000FF00) > 0x00009900 &&
(colour&0x000000FF) > 0x00000099; }
bool operator()(Uint32 colour) const { return (colour&0xFF000000) > 0x10000000 &&
(colour&0x00FF0000) < 0x00100000 &&
(colour&0x0000FF00) < 0x00001000 &&
(colour&0x000000FF) < 0x00000010; }
};
const SDL_Rect& game_display::calculate_energy_bar(surface surf)