use TColor for status bar flags
This commit is contained in:
parent
d5b09524ae
commit
0efec7c308
3 changed files with 22 additions and 4 deletions
|
@ -89,6 +89,7 @@ SVN trunk (1.1+svn):
|
||||||
* added many level 2 units and the Ancient Wose as leaders in AoH but not
|
* added many level 2 units and the Ancient Wose as leaders in AoH but not
|
||||||
as random_leader
|
as random_leader
|
||||||
* added Stalwart and Necrophage as leaders in the classic era
|
* added Stalwart and Necrophage as leaders in the classic era
|
||||||
|
* flags in status bar are now properly team colored
|
||||||
* user interface
|
* user interface
|
||||||
* added new image in advancement tag that is displayed in advancement dialog
|
* added new image in advancement tag that is displayed in advancement dialog
|
||||||
and changed old image to icon in advancement tag.
|
and changed old image to icon in advancement tag.
|
||||||
|
|
|
@ -54,7 +54,7 @@ namespace game_config
|
||||||
std::string partmoved_ball_image = "misc/ball-partmoved.png";
|
std::string partmoved_ball_image = "misc/ball-partmoved.png";
|
||||||
std::string enemy_ball_image = "misc/ball-enemy.png";
|
std::string enemy_ball_image = "misc/ball-enemy.png";
|
||||||
std::string ally_ball_image = "misc/ball-ally.png";
|
std::string ally_ball_image = "misc/ball-ally.png";
|
||||||
std::string flag_image = "terrain/flag-team%d-1.png:150,terrain/flag-team%d-2.png:150";
|
std::string flag_image = "terrain/flag-1.png:150,terrain/flag-2.png:150";
|
||||||
std::vector<Uint32> flag_rgb;
|
std::vector<Uint32> flag_rgb;
|
||||||
|
|
||||||
std::string dot_image = "misc/dot.png";
|
std::string dot_image = "misc/dot.png";
|
||||||
|
|
|
@ -425,11 +425,28 @@ Units cannot be killed by poison alone. The poison will not reduce it below 1 HP
|
||||||
}
|
}
|
||||||
|
|
||||||
case SIDE_PLAYING: {
|
case SIDE_PLAYING: {
|
||||||
char buf[50];
|
|
||||||
snprintf(buf,sizeof(buf),"terrain/flag-team%d-1.png",team::get_side_colour_index(playing_side));
|
|
||||||
|
|
||||||
|
std::string flag;
|
||||||
|
color_range new_rgb;
|
||||||
|
std::vector<Uint32> old_rgb;
|
||||||
|
|
||||||
|
if(current_team.flag().empty()) {
|
||||||
|
flag = game_config::flag_image;
|
||||||
|
old_rgb = game_config::flag_rgb;
|
||||||
|
new_rgb = team::get_side_color_range(playing_side);
|
||||||
|
} else {
|
||||||
|
flag = current_team.flag();
|
||||||
|
}
|
||||||
|
|
||||||
|
//must recolor flag image
|
||||||
|
animated<image::locator> temp_anim;
|
||||||
|
|
||||||
|
// remove animation stuff we don't care about
|
||||||
|
const std::vector<std::string> items = utils::split(flag);
|
||||||
|
const std::vector<std::string> sub_items = utils::split(items[0], ':');
|
||||||
|
image::locator flag_image(sub_items[0], new_rgb, old_rgb);
|
||||||
u = find_leader(units,playing_side);
|
u = find_leader(units,playing_side);
|
||||||
return report("",buf,u != units.end() ? u->second.description() : "");
|
return report("",flag_image,u != units.end() ? u->second.description() : "");
|
||||||
}
|
}
|
||||||
|
|
||||||
case OBSERVERS: {
|
case OBSERVERS: {
|
||||||
|
|
Loading…
Add table
Reference in a new issue