// 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. //============================================================================= // Training measure menu // // ------------------------------------------------------------ // Created by Tom The // © 2006, GeoDelft // // 2006-10-09 The Created //============================================================================= class MenuTrainingMeasure extends GUIPage; var float ButtonWidth; var float ButtonHeight; var float ButtonHGap; var float ButtonVGapSmall; var float ButtonVGapLarge; var float BarHeight; var float BarVPos; var float SButtonSize; var float SButtonVGap; var float SButtonHGap; var float TitleLeftGap; var GeoPlayerController GeoPC; var localized string NL_Title, EN_Title, NL_OK, EN_OK, NL_Message, EN_Message; //============================================================================= // Date Id Modification // 2006-10-09 The Created this header //============================================================================= function UpdateLanguage() { if (GeoPC.Dutch) { GUIButton(Controls[3]).Caption = NL_OK; GUILabel(Controls[4]).Caption = NL_Title; GUILabel(Controls[5]).Caption = NL_Message; } else { GUIButton(Controls[3]).Caption = EN_OK; GUILabel(Controls[4]).Caption = EN_Title; GUILabel(Controls[5]).Caption = EN_Message; } } //============================================================================= // Date Id Modification // 2006-10-03 The Created //============================================================================= function InitComponent(GUIController MyController, GUIComponent MyOwner) { Super.InitComponent(MyController, MyOwner); GeoPC = GeoPlayerController(PlayerOwner()); UpdateLanguage(); // Menu Background Controls[0].WinLeft = (1 - Controls[0].WinWidth) / 2; Controls[0].WinTop = (1 - Controls[0].WinHeight) / 2; // QuitButton Controls[1].WinTop = 0.5 - (Controls[0].WinHeight / 2) + SButtonVGap; Controls[1].WinLeft = 0.5 + (Controls[0].WinWidth / 2) - SButtonSize - SButtonHGap; Controls[1].WinWidth = SButtonSize; Controls[1].WinHeight = SButtonSize; // HelpButton Controls[2].WinTop = Controls[1].WinTop; Controls[2].WinLeft = Controls[1].WinLeft - SButtonSize - SButtonHGap; Controls[2].WinWidth = SButtonSize; Controls[2].WinHeight = SButtonSize; // NextButton (OK-Button) Controls[3].WinTop = Controls[0].WinTop + Controls[0].WinHeight - SButtonSize - SButtonVGap; Controls[3].WinLeft = Controls[1].WinLeft-(SButtonSize +SButtonHGap); Controls[3].WinWidth = 2*SButtonSize + SButtonHGap; Controls[3].WinHeight = SButtonSize; // Menu Title Controls[4].WinTop = Controls[1].WinTop; Controls[4].WinLeft = 0.5 - (Controls[0].WinWidth / 2) + TitleLeftGap; Controls[4].WinWidth = 0.4; Controls[4].WinHeight = 0.1; } //============================================================================= // Date Id Modification // 2006-04-05 Zmr Created this header //============================================================================= Event Opened(GUIComponent Sender) { Super.Opened(Sender); bVisible = true; } //============================================================================= // Date Id Modification // 2006-10-09 The Created this header // 2006-11-27 Zmr //============================================================================= function bool InternalOnClick(GUIComponent Sender) { local int i; local PlayerController pc; pc = PlayerOwner(); for(i = 0; i < Controls.length; i++) { if(Sender == Controls[i]) { switch(i) { case 1: // Quit Button Controller.ReplaceMenu("GeoSimulator.MenuTrainingMarker"); break; case 2: // Help Button Controller.OpenMenu("GeoSimulator.HelpMenuTrainingMeasure"); bVisible = false; break; case 3: // Ok Button Controller.ReplaceMenu("GeoSimulator.MenuTrainingMarker"); break; } } } return true; } //============================================================================= // Date Id Modification // 2006-10-09 The Created this header //============================================================================= defaultproperties { //standard variables ButtonWidth=0.2 ButtonHeight=0.04 ButtonHGap=0.025 ButtonVGapLarge=0.03 ButtonVGapSmall=0.02 BarHeight=0.21 BarVPos=0.5 SButtonSize=0.06 SButtonHGap=0.02 SButtonVGap=0.02 TitleLeftGap=0.05 Begin Object Class=GUIButton name=Background WinWidth=0.75 WinHeight=0.5 bAcceptsInput=false bNeverFocus=true StyleName="GeoCallBar" End Object Controls(0)=GUIButton'Background' Begin Object Class=GUIGFxButton Name=QuitButton Caption="" Graphic=Material'InGameMenuImagesT.NoBackgroundButtons.Closed' Position=ICP_Scaled StyleName="MidGameButton_Orange" OnClick=InternalOnClick bNeverFocus=true End Object Controls(1)=GUIButton'QuitButton' Begin Object Class=GUIGFxButton Name=HelpButton Caption="" Graphic=Material'InGameMenuImagesT.NoBackgroundButtons.Questionmark' Position=ICP_Scaled StyleName="MidGameButton" bNeverFocus=true OnClick=InternalOnClick End Object Controls(2)=GUIButton'HelpButton' Begin Object Class=GUIButton Name=Ok Caption="Ok" StyleName="MidGameButton" bNeverFocus=true OnClick=InternalOnClick End Object Controls(3)=GUIButton'Ok' Begin Object class=GUILabel Name=MenuTitle Caption="***" TextAlign=TXTA_Center TextColor=(R=255,G=120,B=0,A=255) TextFont="HeaderFont" bMultiLine=true End Object Controls(4)=GUILabel'MenuTitle' Begin Object class=GUILabel Name=MenuMessage Caption="***" WinLeft=0.2 WinTop=0.46 TextAlign=TXTA_Left TextColor=(R=255,G=255,B=255,A=255) TextFont="MidGameFont" bMultiLine=true End Object Controls(5)=GUILabel'MenuMessage' bRequire640x480=false bAllowedAsLast=true NL_Title="Maatregel menu" NL_OK="OK" NL_Message="Je bent niet bevoegd om maatregelen te nemen." EN_Title="Measure menu" EN_OK="OK" EN_Message="You are not authorized to take measures." }