Unit: fixed hp and xp colors having 0 alpha
This commit is contained in:
parent
086de4a897
commit
721e2d7e9e
1 changed files with 9 additions and 9 deletions
|
@ -1044,7 +1044,7 @@ const std::string& unit::flag_rgb() const
|
|||
static color_t hp_color_impl(int hitpoints, int max_hitpoints)
|
||||
{
|
||||
double unit_energy = 0.0;
|
||||
color_t energy_color {0,0,0,0};
|
||||
color_t energy_color {0,0,0,255};
|
||||
|
||||
if(max_hitpoints > 0) {
|
||||
unit_energy = double(hitpoints)/double(max_hitpoints);
|
||||
|
@ -1091,14 +1091,14 @@ color_t unit::hp_color(int new_hitpoints) const
|
|||
|
||||
color_t unit::xp_color() const
|
||||
{
|
||||
const color_t near_advance_color {255,255,255,0};
|
||||
const color_t mid_advance_color {150,255,255,0};
|
||||
const color_t far_advance_color {0,205,205,0};
|
||||
const color_t normal_color {0,160,225,0};
|
||||
const color_t near_amla_color {225,0,255,0};
|
||||
const color_t mid_amla_color {169,30,255,0};
|
||||
const color_t far_amla_color {139,0,237,0};
|
||||
const color_t amla_color {170,0,255,0};
|
||||
const color_t near_advance_color {255,255,255,255};
|
||||
const color_t mid_advance_color {150,255,255,255};
|
||||
const color_t far_advance_color {0,205,205,255};
|
||||
const color_t normal_color {0,160,225,255};
|
||||
const color_t near_amla_color {225,0,255,255};
|
||||
const color_t mid_amla_color {169,30,255,255};
|
||||
const color_t far_amla_color {139,0,237,255};
|
||||
const color_t amla_color {170,0,255,255};
|
||||
|
||||
const bool near_advance = static_cast<int>(experience_to_advance()) <= game_config::kill_experience;
|
||||
const bool mid_advance = static_cast<int>(experience_to_advance()) <= game_config::kill_experience*2;
|
||||
|
|
Loading…
Add table
Reference in a new issue