// September 2015 // Levee Patroller / Dijk Patrouille // This source file is (c) by Deltares. This source file is open source but only available to select users. Do not redistribute without written permission of Stichting Deltares, Delft, The Netherlands. // This header has been automatically generated. //============================================================================= // Menu that shows up when you are close to a marker on training // And Whant to take actions on that marker // ------------------------------------------------------------ // Created by Rui Guimaraes // © 2006, Geodelft // // Date Id Modification //============================================================================= class MenuTrainingMarker extends MenuMarker; var GeoPlayerControllerTraining GeoPCTrain; function InitComponent(GUIController MyController, GUIComponent MyOwner) { local int i; Super.InitComponent(MyController, MyOwner); // ***************************** // // 5 Location // 6 Obser // 7 action center // 8 Diagnoes // 9 Measure // 10 Remove // // ***************************** // TODO - REMOVE comments - ALMAR (JLN) - this way we can test the trainingslevel without going through all steps. for(i=5; i<11; i++) { Controls[i].MenuState=MSAT_Disabled; } GeoPCTrain=GeoPlayerControllerTraining(PlayerOwner()); Controls[10].MenuState=MSAT_Blurry; if(GeoPCTrain.TrainStep==6 && GeoPCTrain.TrainSubStep==2) { Controls[5].MenuState=MSAT_Blurry; } else if(GeoPCTrain.TrainStep==6 && GeoPCTrain.TrainSubStep==3) { Controls[6].MenuState=MSAT_Blurry; Controls[7].MenuState=MSAT_Blurry; Controls[10].MenuState=MSAT_Disabled; } else if(GeoPCTrain.TrainStep==6 && GeoPCTrain.TrainSubStep==4) { Controls[8].MenuState=MSAT_Blurry; Controls[9].MenuState=MSAT_Blurry; Controls[10].MenuState=MSAT_Disabled; } } //============================================================================= // Date Id Modification // 2006-08-15 The Fixed error on selection Diagnosis //============================================================================= function bool InternalOnClick(GUIComponent Sender) { local int i; local Marker TempMarker; for(i=0; i<11; i++) { if(Sender==Controls[i]) { switch(i) { case 1: GeoPCTrain.InMenu(false); Controller.CloseMenu(); // Close _all_ menus break; case 2: //HELP Controller.ReplaceMenu("GeoSimulator.HelpMenuTrainingMarker"); break; case 3: Controller.OpenMenu("GeoInterface.NotAvailable"); break; case 4: Controller.OpenMenu("GeoInterface.NotAvailable"); break; case 5: Controller.ReplaceMenu("GeoSimulator.MenuTrainingRedMarkerLocation"); break; case 6: GeoPC.ResetNewSignal(); Controller.ReplaceMenu("GeoSimulator.MenuTrainingObservationMain"); break; case 7: Controller.ReplaceMenu("GeoSimulator.MenuTrainingActionCenter"); break; case 8: Controller.ReplaceMenu("GeoSimulator.MenuTrainingDiagnosis"); break; case 9: Controller.ReplaceMenu("GeoSimulator.MenuTrainingMeasure"); break; case 10: TempMarker = GeoPC.NearByMarker; GeoPC.AwayFromMarker(TempMarker, true); TempMarker.Destroy(); GeoPC.InMenu(false); Controller.CloseMenu(); break; } } } return true; } defaultproperties { }