示例#1
0
文件: OUNITIF.cpp 项目: AMDmi3/7kaa
//--------- Begin of function Unit::detect_main_menu ---------//
//
void Unit::detect_main_menu()
{
	if( detect_basic_info() )
		return;

	if( detect_unit_profile() )
		return;

	if( is_own_spy() )
		detect_spy_menu(INFO_Y1+187);

	if( is_own() )
		detect_button();
}
示例#2
0
//--------- Begin of function Info::detect_nation ---------//
//
void Info::detect_nation()
{
	//------- detect nation browser ------//

	if( browse_nation.detect() )
	{
		browse_nation_recno = browse_nation.recno();
		return;
	}

	//------- detect report buttons --------//

	if( detect_button() )
		return;

	//--------- detect detail info -------//

	detect_detail();
}
示例#3
0
//-------- Begin of function Sys::detect --------//
//
void Sys::detect()
{
	//--- only detect at the even frames when in report mode ---//

	if( view_mode != MODE_NORMAL &&
		// ###### begin Gilbert 5/11 ######//
		 !report_disp_frame_no )
		// ###### end Gilbert 5/11 ######//
	{
		return;
	}

	//--------------------------------------//

	mouse.get_event();

	if( option_menu.is_active() )
	{
		option_menu.detect();
		return;
	}

	if( in_game_menu.is_active() )
	{
		in_game_menu.detect();
		return;
	}

	if( VBrowse::press_record )		// if the user is pulling the records of the browser up and down, calling detect() routines of other controls will confuse it
	{
		VBrowse::press_vbrowse_ptr->detect();
	}

	if( mouse.is_key_event() )
	{
		process_key(mouse.scan_code, mouse.event_skey_state);
	}

	detect_button();		// detect main buttons on the screen

	detect_view();
}
示例#4
0
文件: or_nat.cpp 项目: 112212/7k2
//--------- Begin of function Info::detect_nation ---------//
//
void Info::detect_nation()
{
	int hideNationBrowse = nation_report_mode == NATION_REPORT_CHAT
		&& hide_nation_browse;

	//------- detect nation browser ------//

	if( !hideNationBrowse && browse_nation.detect() )
	{
		browse_nation_recno = browse_nation.recno();
		return;
	}

	//------- detect report buttons --------//

	if( detect_button() )
		return;

	//--------- detect detail info -------//

	detect_detail();
}