Exemplo n.º 1
0
//--------- 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;
	}
}
Exemplo n.º 2
0
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;
	}

}
Exemplo n.º 3
0
//--------- 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;
	}
}