示例#1
0
void game_display::scroll_to_leader(int side, SCROLL_TYPE scroll_type,bool force)
{
	unit_map::const_iterator leader = dc_->units().find_leader(side);

	if(leader.valid() && leader->is_visible_to_team(dc_->get_team(viewing_side()), false)) {
		scroll_to_tile(leader->get_location(), scroll_type, true, force);
	}
}
示例#2
0
void game_display::scroll_to_leader(int side, SCROLL_TYPE scroll_type,bool force)
{
	unit_map::const_iterator leader = dc_->units().find_leader(side);

	if(leader.valid()) {
		// YogiHH: I can't see why we need another key_handler here,
		// therefore I will comment it out :
		/*
		const hotkey::basic_handler key_events_handler(gui_);
		*/
		scroll_to_tile(leader->get_location(), scroll_type, true, force);
	}
}
示例#3
0
void game_display::scroll_to_leader(unit_map& units, int side, SCROLL_TYPE scroll_type,bool force)
{
	const unit_map::iterator leader = find_leader(units,side);

	if(leader != units_.end()) {
		// YogiHH: I can't see why we need another key_handler here,
		// therefore I will comment it out :
		/*
		const hotkey::basic_handler key_events_handler(gui_);
		*/
		scroll_to_tile(leader->first, scroll_type,true,force);
	}
}