// 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. //============================================================================= // Extension of class for training level // ------------------------------------------------------------ // Created by Rui Guimaraes // © 2006, Geodelft // // Date Id Modification // 2006-09-21 Gui Created class // 2006-09-28 Gui Updated for new map menu // 2007-06-10 gui Maps sizes can now be editable individually in GeoMapDetails //============================================================================= class MenuTrainingMap extends MenuMap; function bool InternalOnClick(GUIComponent Sender) { local int i; local PlayerController pc; pc = PlayerOwner(); for(i=0; i<11; i++) { if(Sender==Controls[i]) { switch(i) { case 1: GeoPC.InMenu(false); Controller.CloseMenu(); // Close _all_ menus break; case 2: //HELP Controller.ReplaceMenu("GeoSimulator.HelpMenuTrainingMap"); break; case 3: Controller.OpenMenu("GeoInterface.NotAvailable"); break; } } } return true; } function bool MoveOnClick(GUIComponent Sender) { local GeoPlayerControllerTraining GeoPCT; local bool returner; returner = super.MoveOnClick(Sender); GeoPCT = GeoPlayerControllerTraining(PlayerOwner()); /*for(i=6; i< MAX_MARKERS_POS + 1; i++) { if(Sender==Controls[i]) { log("Rot:" @ArrayPositions[i].Rotation.Yaw); TempSin=sin(pi * (ArrayPositions[i].Rotation.Yaw / 65536.0) * 2.0); TempCos=cos(pi * (ArrayPositions[i].Rotation.Yaw / 65536.0) * 2.0); log("Sin:" @TempSin); log("Cos:" @TempSin); TempLocation.x=ArrayPositions[i].Location.x - GeoPlayerController(pc).PlacementOfMarkerXY * TempCos; TempLocation.y=ArrayPositions[i].Location.y - GeoPlayerController(pc).PlacementOfMarkerXY * TempSin; TempLocation.z=ArrayPositions[i].Location.z + GeoPlayerController(pc).PlacementOfMarkerZ; if(!(pc.Pawn.SetLocation(TempLocation))) warn("New Location not possible"); if(!(pc.Pawn.SetRotation(ArrayPositions[i].Rotation))) warn("New Location not possible"); if(!(pc.Pawn.SetRotation(ArrayPositions[i].Rotation))) warn("New Location not possible"); GeoPCT = GeoPlayerControllerTraining(pc); GeoPCT.IsNextStepAllowed=true; } }*/ GeoPCT.IsNextStepAllowed=returner; return returner; } defaultproperties { }