示例#1
0
void tunit_attack::pre_show(CVideo& /*video*/, twindow& window)
{
	set_attacker_info(window, *attacker_itor_);
	set_defender_info(window, *defender_itor_);

	selected_weapon_ = -1;
	set_weapon_info(window, weapons_, best_weapon_);
}
示例#2
0
void tunit_attack::pre_show(CVideo& /*video*/, twindow& window)
{
	connect_signal_mouse_left_click(
			find_widget<tbutton>(&window, "attacker_profile", false),
			boost::bind(&tunit_attack::profile_button_callback, this, (*attacker_itor_).type_id()));

	connect_signal_mouse_left_click(
			find_widget<tbutton>(&window, "defender_profile", false),
			boost::bind(&tunit_attack::profile_button_callback, this, (*defender_itor_).type_id()));

	connect_signal_mouse_left_click(
			find_widget<tbutton>(&window, "damage_calculation", false),
			boost::bind(&tunit_attack::damage_calc_callback, this, boost::ref(window)));

	set_attacker_info(window, *attacker_itor_);
	set_defender_info(window, *defender_itor_);

	selected_weapon_ = -1;
	set_weapon_info(window, weapons_, best_weapon_);
}