Example #1
0
void CMiscToolbar::OnClickedFiles() 
{
	if (RDialog::m_pView->m_currentpage != 0)							//RJS 29Oct00
 		return;															//RJS 29Oct00

	typedef	HideEdgeControl	EDGE; 
	CString	wildcard="*.bs";
	CFiling::selectedfile=Save_Data.lastsavegame;
	if (Todays_Packages.localplayer==NAT_RAF)
		wildcard+="R";
	else
		wildcard+="L";
//	CFiling::selectedfile="test.sav";
	if (!LoggedChild(FILES))
	{
		LogChild(FILES,
			RDialog::MakeTopDialog(Place(POSN_CENTRE,POSN_CENTRE),
								DialList(DialBox(FIL_NULL/*IDB_BBC3*/,new CFiling,Edges(EDGE::ALIGN_MIN,EDGE::ALIGN_MIN,EDGE::ALIGN_MAX + EDGE::OCCLUDE_INSIDE,EDGE::ALIGN_MAX + EDGE::OCCLUDE_INSIDE)), //rdh
									HTabBox(FIL_NULL,IdList(IDS_SAVE,IDS_LOAD),Edges(EDGE::ALIGN_MIN,EDGE::ALIGN_MIN,EDGE::ALIGN_MAX,EDGE::ALIGN_MAX), 
									DialBox(FIL_D_BLANK/*IDB_BBC3*/,new CLoad(IDDX_SAVE,LSD_SAVE,			FIL_SAVEGAMEDIR,wildcard,CFiling::selectedfile)),
			  						DialBox(FIL_D_BLANK/*IDB_BBC3*/,new CLoad(IDDX_LOAD,LSD_LOAD_DESELECT,FIL_SAVEGAMEDIR,wildcard,CFiling::selectedfile))
				)					)	)	);
	}
	else
		CloseLoggedChild(FILES);
	
}
Example #2
0
void CMiscToolbar::OpenRAFDirectiveResultsToggle(RAFDirectivesResults* dirres) 
{
			
	if (LoggedChild(DIRECTIVERESULTS))
		CloseLoggedChild(DIRECTIVERESULTS);
	LogChild(DIRECTIVERESULTS,RAFDirectiveResults::Make(dirres));

}
Example #3
0
void CMiscToolbar::OpenEmptyDirectiveResults() 
{
			
	if (LoggedChild(DIRECTIVERESULTS))
		CloseLoggedChild(DIRECTIVERESULTS);
	LogChild(DIRECTIVERESULTS,DirectivesNoResults::Make());

}
Example #4
0
void CMiscToolbar::OpenRAFDirectivetoggle(RAFDirectivesResults* dirres) 
{
	if (!LoggedChild(DIRECTIVES))
		LogChild(DIRECTIVES,RAFDirectives::Make(dirres)
							);
	else
		CloseLoggedChild(DIRECTIVES);

}
Example #5
0
void Dossier::OnClickedPhoto() 
{
#ifndef	BOB_DEMO_VER

	if (LUF_FighterLF2BAND==Persons2::GetBandFromUID(uid) && RFullPanelDial::gameside == RFullPanelDial::SIDE_LW)
	{
// launch fighters dialog

		int i=0;
		while (Node_Data.gruppe[i].squadron != SQ_ZERO)
		{
			if (Node_Data.gruppe[i].homeairfield == uid)
			{
				if (Node_Data.gruppe[i].AcType()<PT_LW_BOMBERS)
				{
					MainToolBar().OpenACDossier(Node_Data.gruppe[i].wadernum,
						Node_Data.gruppe[i].gruppennum);

					break;
				}
			}
			i++;
		}
	}
	else	
	{
 		if (ReconnRequired())
		{
			int packnum=Todays_Packages_NewPackage(uid,MMC.directives.lw.userprofiles[Directives::LW::RECON]);
			if (packnum < 0)
				RDialog::RMessageBox(IDS_WARNING, IDS_NOAIRCRAFTAVAIL,NULL,NULL,IDS_CONTINUE);
			else
			{
				Todays_Packages[packnum].CalcRoutePositionsAndTime();
				MainToolBar().OnClickedMissionfolder();
				Todays_Packages.InvalidateRoute(&Todays_Packages[packnum],true,true);

			}
		}else
		{
	#ifndef NDEBUG
	#define PLACEMENT	CRect(0,0,512,384)
	#else
	#define	PLACEMENT	Place(POSN_CENTRE,POSN_CENTRE, 0, 0)
	#endif
	//	#define PLACEMENT	CRect(0,0,512,384)
			UniqueID targID=UniqueID(uid);
			CString tname=GetTargName(targID);
			OverLay.SetTargName((char*)LPCTSTR(tname));
			OverLay.loader_art=FIL_LOADING;									//RJS 16Aug00
			LogChild(0,MakeTopDialog(PLACEMENT,DialBox(OverLay.loader_art,new Rtestsh1(UniqueID(uid)),EDGES_NOSCROLLBARS)));
			Rtestsh1::Start3d(Rtestsh1::S3D_DONEBACK);
		}
	}
#endif
}
Example #6
0
void CMiscToolbar::OnClickedZoomlevel() 
{
	if (RDialog::m_pView->m_currentpage != 0)							//RJS 29Oct00
 		return;															//RJS 29Oct00

 	if (!LoggedChild(ZOOMLEVEL))
		LogChild(ZOOMLEVEL,ZoomLevel::Make()
						);
	else
		CloseLoggedChild(ZOOMLEVEL);


}
Example #7
0
void CMiscToolbar::OnClickedMapfilters() 
{
	if (RDialog::m_pView->m_currentpage != 0)							//RJS 29Oct00
 		return;															//RJS 29Oct00

	if (!LoggedChild(MAPFILTERS))
		LogChild(MAPFILTERS,MapFiltersTop::Make()
						);
	else
		CloseLoggedChild(MAPFILTERS);

	
}
Example #8
0
void CMiscToolbar::OpenSaveOnly(bool quitafter) 
{
	typedef	HideEdgeControl	EDGE;
	CString	wildcard="*.sav";
	CFiling::selectedfile=Save_Data.lastsavegame;
	if (!LoggedChild(FILES))
		LogChild(FILES,
			RDialog::MakeTopDialog(Place(POSN_CENTRE,POSN_CENTRE),
								DialList(DialBox(FIL_NULL/*IDB_BBC3*/,new CFiling(true),Edges(EDGE::ALIGN_MIN,EDGE::ALIGN_MIN,EDGE::ALIGN_MAX + EDGE::OCCLUDE_INSIDE,EDGE::ALIGN_MAX + EDGE::OCCLUDE_INSIDE)), //rdh
									HTabBox(FIL_NULL,IdList(IDS_QUITSAVE),Edges(EDGE::ALIGN_MIN,EDGE::ALIGN_MIN,EDGE::ALIGN_MAX,EDGE::ALIGN_MAX), 
									DialBox(FIL_MAP_PLAYER_LOG/*IDB_BBC3*/,new CLoad(IDD_SAVE,LSD_SAVE,			FIL_SAVEGAMEDIR,wildcard,CFiling::selectedfile))
				)					)	)	);
	else
		;//bring to front...
}
Example #9
0
void CMiscToolbar::OnClickedThumbnail() 
{
	typedef	HideEdgeControl	EDGE;
	if (!LoggedChild(THUMBNAIL))
	{
		CMIGView::m_thumbnail=new CThumbnail;
		LogChild(THUMBNAIL,
			RDialog::MakeTopDialog(
			//CRect(140,140,0,0),
			Place(POSN_MIN,POSN_MIN),
								DialBox(FIL_NULL,CMIGView::m_thumbnail,Edges(EDGE::ALIGN_MIN + EDGE::ACTIONS_SPLITTER,EDGE::ALIGN_MIN,EDGE::ALIGN_MAX + EDGE::OCCLUDE_INSIDE,EDGE::ALIGN_MAX + EDGE::OCCLUDE_INSIDE))
				)					);
	}
	else
		CloseLoggedChild(THUMBNAIL);
}
Example #10
0
void CMiscToolbar::OnClickedFiles() 
{
	typedef	HideEdgeControl	EDGE; 
	CString	wildcard="*.sav";
	CFiling::selectedfile=Save_Data.lastsavegame;
//	CFiling::selectedfile="test.sav";
	if (!LoggedChild(FILES))
	{
		LogChild(FILES,
			RDialog::MakeTopDialog(Place(POSN_CENTRE,POSN_CENTRE),
								DialList(DialBox(FIL_NULL/*IDB_BBC3*/,new CFiling,Edges(EDGE::ALIGN_MIN,EDGE::ALIGN_MIN,EDGE::ALIGN_MAX + EDGE::OCCLUDE_INSIDE,EDGE::ALIGN_MAX + EDGE::OCCLUDE_INSIDE)), //rdh
									HTabBox(FIL_NULL,IdList(IDS_SAVE,IDS_LOAD),Edges(EDGE::ALIGN_MIN,EDGE::ALIGN_MIN,EDGE::ALIGN_MAX,EDGE::ALIGN_MAX), 
									DialBox(FIL_MAP_PLAYER_LOG/*IDB_BBC3*/,new CLoad(IDD_SAVE,LSD_SAVE,			FIL_SAVEGAMEDIR,wildcard,CFiling::selectedfile)),
			  						DialBox(FIL_MAP_PLAYER_LOG/*IDB_BBC3*/,new CLoad(IDD_LOAD,LSD_LOAD_DESELECT,FIL_SAVEGAMEDIR,wildcard,CFiling::selectedfile))
				)					)	)	);
	}
	else
		CloseLoggedChild(FILES);
	
}
Example #11
0
void AirfieldDetails::OnClickedPhoto() 
{
#ifndef	BOB_DEMO_VER

 	{
#ifndef NDEBUG
#define PLACEMENT	CRect(0,0,512,384)
#else
#define	PLACEMENT	Place(POSN_CENTRE,POSN_CENTRE, 0, 0)
#endif
//	#define PLACEMENT	CRect(0,0,512,384)
		UniqueID targID=UniqueID(afuid);
		CString tname=GetTargName(targID);
		OverLay.SetTargName((char*)LPCTSTR(tname));
		OverLay.loader_art=FIL_LOADING;									//RJS 16Aug00
		LogChild(0,MakeTopDialog(PLACEMENT,DialBox(OverLay.loader_art,new Rtestsh1(UniqueID(afuid)),EDGES_NOSCROLLBARS)));
		Rtestsh1::Start3d(Rtestsh1::S3D_DONEBACK);
	}
#endif
	
}
Example #12
0
void CDirects2::OnClickedDirectivebutton() 
{
	if (CComit_e::This->dir_ctrl.directives[linenum].type != SupplyTree::D_RESTING)
	{
		if (LoggedChild(0))
		{
 			CRTabs* tab=(CRTabs*)LoggedChild(0)->fchild->fchild->GetDlgItem(IDJ_TABCTRL);
			tab->SelectTab(CComit_e::This->dir_ctrl.directives[linenum].type);
			//delete tab;
		
		}else
		{
			typedef	HideEdgeControl	EDGE; 
			RDialog* d=MakeTopDialog(CRect(500,450,0,0),
				DialList(DialBox(FIL_NULL,new CCamplist,Edges(EDGE::ALIGN_MIN,EDGE::ALIGN_MIN,EDGE::ALIGN_MAX + EDGE::OCCLUDE_INSIDE,EDGE::ALIGN_MAX + EDGE::OCCLUDE_INSIDE)),
									HTabBox(FIL_NULL,IdList(IDS_AIRSUP,IDS_CHOKE_L, IDS_SUPPLY,IDS_AIRFIELDS,IDS_RAIL, IDS_ROAD,IDS_ARMY),Edges(EDGE::ALIGN_MIN,EDGE::ALIGN_MIN,EDGE::ALIGN_MAX,EDGE::ALIGN_MAX), 
		  								DialBox(FIL_MAP_MIGCAP,new CSelectionResults(SupplyTree::D_AIRSUPERIORITY)),
		  								DialBox(FIL_MAP_CHOKEPOINTS,new CSelectionResults(SupplyTree::D_CHOKE)), 
										DialBox(FIL_MAP_SUPPLY,new CSelectionResults(SupplyTree::D_SUPPLY)),
										DialBox(FIL_MAP_AIRFIELD,new CSelectionResults(SupplyTree::D_AIRFIELDS)),
		  								DialBox(FIL_MAP_TRAFFIC,new CSelectionResults( SupplyTree::D_RAIL)),
										DialBox(FIL_MAP_TRAFFIC,new CSelectionResults(SupplyTree::D_ROAD)),
		  								DialBox(FIL_MAP_ARMY,new CSelectionResults(SupplyTree::D_ARMY))
		  								
		  								
									)														  							

					  			)
							 );	
			LogChild(0,d);
			CRTabs* tab=(CRTabs*)d->fchild->GetDlgItem(IDJ_TABCTRL);
			tab->SelectTab(CComit_e::This->dir_ctrl.directives[linenum].type);
			//delete tab;
		}
	}	
}