// 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. //************************************************* // // Class for warning of NOT AVAILABLE // - 2 languages // //************************************************* class NotAvailable extends GUIPage config(GeoUser); var string EN_Message, NL_Message; var automated GUILabel but_NotAvail; var bool Dutch; var bool bIgnoreEsc; //************************************** //LANGUAGE: IF IT IS IN GAME OR IN MENU'S //************************************** function bool SetLanguage() { if(PlayerOwner().IsA('GeoPlayerController')) { return GeoPlayerController(PlayerOwner()).Dutch; } else { warn("THIS PLAYER CONTROLLER DOESN'T SUPPORT LANGUAGE"); return true; } } function bool MyKeyEvent(out byte Key,out byte State,float delta) { local PlayerController pc; local int SizeArray; pc = PlayerOwner(); //ESC if(Key == 0x1B){ if(bIgnoreEsc) { bIgnoreEsc=false; return true; } else { SizeArray = Controller.MenuStack.Length; if (SizeArray > 1){ MainMenuOptions(Controller.MenuStack[(SizeArray-2)]).ChangeAllow(true); } pc.ConsoleCommand("OutMenu"); Controller.CloseMenu(); return true; } } return false; } function bool InternalOnClick(GUIComponent Sender) { local int SizeArray; if (Sender==Controls[1]) { SizeArray = Controller.MenuStack.Length; if (SizeArray > 1) MainMenuOptions(Controller.MenuStack[(SizeArray-2)]).ChangeAllow(true); Controller.CloseMenu(false); } return true; } function MyOpenPage() { Dutch=SetLanguage(); UpdateLanguage(); } function UpdateLanguage() { if(Dutch) { GUILabel(Controls[2]).Caption=NL_Message; } else { GUILabel(Controls[2]).Caption=EN_Message; } } defaultproperties { Begin Object Class=GUIButton name=NotAvaiBackground WinWidth=1.0 WinHeight=1.0 WinTop=0 WinLeft=0 bAcceptsInput=false bNeverFocus=true StyleName="SquareBar" bBoundToParent=true bScaleToParent=true End Object Controls(0)=GUIButton'NotAvaiBackground' Begin Object Class=GUIButton Name=OkButton Caption="OK" WinWidth=0.3 WinHeight=0.04 WinLeft=0.35 WinTop=0.75 bBoundToParent=true OnClick=InternalOnClick bNeverFocus=true End Object Controls(1)=GUIButton'OkButton' Begin Object class=GUILabel Name=NotAvaiDesc Caption="***" TextALign=TXTA_Center TextColor=(R=220,G=180,B=0,A=255) TextFont="HeaderFont" WinWidth=1 WinLeft=0 WinTop=0.4 WinHeight=32 End Object Controls(2)=GUILabel'NotAvaiDesc' OnOpen=MyOpenPage WinLeft=0 WinTop=0.375 WinWidth=1 WinHeight=0.25 bRequire640x480=false bIgnoreEsc=true OnKeyEvent=MyKeyEvent EN_Message="THIS OPTION IS NOT AVAILABLE IN THIS VERSION" NL_Message="DEZE OPTIE IS NIET BESCHIKBAAR IN DEZE VERSIE" }