more current_player() stuff

This commit is contained in:
Serge Martin 2006-10-28 20:44:28 +00:00
parent 5197c4e23d
commit d9fbe695fd
4 changed files with 8 additions and 16 deletions

View file

@ -218,15 +218,8 @@ namespace events{
//add player's name to title of dialog
std::stringstream str;
str << _("Statistics") << " (";
// Find leader (of viewing player) 's description
for (unit_map::const_iterator i = units_.begin(); i != units_.end(); ++i) {
if (i->second.side() != (gui_->viewing_team()+1))
continue;
if (i->second.can_recruit()){
str << i->second.description();
break;
}
}
// Current Player name
str << teams_[gui_->viewing_team()].current_player();
str << ")";
statistics_dialog stats_dialog(*gui_, str.str());

View file

@ -299,7 +299,7 @@ LEVEL_RESULT playsingle_controller::play_scenario(const std::vector<config*>& st
report << "\n";
}
report << font::BOLD_TEXT << i->save_id() << "\n";
report << font::BOLD_TEXT << i->current_player() << "\n";
}
report << _("Remaining gold: ")

View file

@ -209,12 +209,12 @@ turn_info::PROCESS_DATA_RESULT turn_info::process_network_data(const config& cfg
//if this is an ally of the dropping side and it is not us (choose local player
//if you want that) and not ai or empty and if it is not the dropping side itself,
//get this team in as well
options.push_back(_("Replace with ") + team->save_id());
options.push_back(_("Replace with ") + team->current_player());
allies.push_back(&(*team));
}
}
const std::string msg = leader->second.description() + " " + _("has left the game. What do you want to do?");
const std::string msg = teams_[side_index].current_player() + " " + _("has left the game. What do you want to do?");
action = gui::show_dialog2(gui_,NULL,"",msg,gui::OK_ONLY,&options);
}

View file

@ -312,7 +312,7 @@ Units cannot be killed by poison alone. The poison will not reduce it below 1 HP
{
const std::vector<Uint32>& old_rgb = u->second.team_rgb_range();
color_range new_rgb = team::get_side_color_range(u->second.side());
return report("",image::locator(u->second.absolute_image(), new_rgb, old_rgb),"");
}
case UNIT_PROFILE:
@ -450,8 +450,7 @@ Units cannot be killed by poison alone. The poison will not reduce it below 1 HP
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);
return report("",flag_image,u != units.end() ? u->second.description() : "");
return report("",flag_image,teams[playing_side-1].current_player());
}
case OBSERVERS: {
@ -494,7 +493,7 @@ Units cannot be killed by poison alone. The poison will not reduce it below 1 HP
sec = current_team.countdown_time() / 1000;
str << (current_side != playing_side ? font::GRAY_TEXT : font::NULL_MARKUP);
if(sec < 60)
str << "<200,0,0>";
else if(sec < 120)