示例#1
0
文件: OUNITIF.cpp 项目: AMDmi3/7kaa
//--------- Begin of function Unit::disp_info ---------//
//
void Unit::disp_info(int refreshFlag)
{
	if( sprite_recno != last_unit_recno )
	{
		unit_menu_mode  = UNIT_MENU_MAIN;
		last_unit_recno = sprite_recno;
	}

	switch( unit_menu_mode )
	{
		case UNIT_MENU_MAIN:
			switch( power.command_id )
			{
				case COMMAND_BUILD_FIRM:
					disp_build(refreshFlag);
					break;

				case COMMAND_SETTLE:
					disp_settle(refreshFlag);
					break;

				default:
					disp_main_menu(refreshFlag);
			}
			break;

		case UNIT_MENU_BUILD:
			disp_build_menu(refreshFlag);
			break;
	}
}
示例#2
0
文件: of_wari.cpp 项目: 112212/7k2
void FirmWar::put_info(int refreshFlag)
{
	if( refreshFlag==INFO_REPAINT )
	//if( refreshFlag==INFO_REPAINT && !disable_refresh )
		last_menu_mode = war_menu_mode = WAR_MENU_MAIN;
	else
	{
		if( last_menu_mode != war_menu_mode )		// if changing menu mode pass repaint to sub-menu
		{
			refreshFlag = INFO_REPAINT;
			last_menu_mode = war_menu_mode;
		}
	}

	switch( war_menu_mode )
	{
		case WAR_MENU_MAIN:
			disp_main_menu(refreshFlag);
			break;

		case WAR_MENU_BUILD:
			disp_build_menu(refreshFlag);
			break;
	}

}
示例#3
0
文件: OF_HARB.cpp 项目: Stummi/7kaa
//--------- Begin of function FirmHarbor::put_info ---------//
//
void FirmHarbor::put_info(int refreshFlag)
{
	if( refreshFlag==INFO_REPAINT && !disable_refresh )
		harbor_menu_mode = HARBOR_MENU_MAIN;

	switch( harbor_menu_mode )
	{
		case HARBOR_MENU_MAIN:
			disp_main_menu(refreshFlag);
			break;

		case HARBOR_MENU_BUILD:
			disp_build_menu(refreshFlag);
			break;
	}
}