// 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. //============================================================================= // // ------------------------------------------------------------ // © 2006, Geodelft // // Date Id Modification // 2006-10-07 The Created this header // 2006-10-08 The Implemented Dutch translations // 2006-10-25 The Hide control InputMouseSmoothStr //============================================================================= class MenuHandBookLinkTab extends GUITabPanel; var GeoPlayerController GeoPC; var float ButtonWidth, ButtonTabWidth, ButtonHeight, ButtonHGap, ButtonVGapSmall, ButtonVGapLarge, BarHeight, BarVPos, SButtonSize, SButtonVGap, SButtonHGap, TitleLeftGap, LineHeight; var GuiComponent GuiOwner; var MenuHandBook MenuOwner;// in this case the MenuHandBook, where this tab is created. var string EN_General, NL_General, EN_Failures, NL_Failures, EN_Signals, NL_Signals; //============================================================================= // Date Id Modification // 2006-10-07 The Created this header //============================================================================= function InitComponent(GUIController MyController, GUIComponent MyOwner) { local int i; Super.Initcomponent(MyController, MyOwner); GuiOwner = MyOwner; GeoPC = GeoPlayerController(PlayerOwner()); MenuOwner = MenuHandbook(MyOwner.MenuOwner); // Menu Background Controls[0].WinWidth = MenuOwner.TabWidth; Controls[0].WinHeight = 0.9; Controls[0].WinLeft = MenuOwner.TabLeft; Controls[0].WinTop = 0 + SButtonHGap; Controls[0].bVisible = false; //Title Controls[1].WinLeft = Controls[0].WinLeft;// + ButtonHGap; Controls[1].WinTop = Controls[0].WinTop; Controls[1].WinWidth = Controls[0].WinWidth; Controls[1].WinHeight = 0;//ButtonHeight; //tab buttons Controls[2].WinWidth = Controls[0].WinWidth / 4; Controls[2].WinHeight = Controls[2].WinWidth*1.5; Controls[2].WinLeft = Controls[0].WinLeft + Controls[2].WinWidth/4; Controls[2].WinTop = Controls[0].WinHeight/2 - Controls[2].WinWidth / 1.5; Controls[3].WinLeft = Controls[2].WinLeft + Controls[2].WinWidth *1.25; Controls[3].WinTop = Controls[2].WinTop; Controls[3].WinHeight = Controls[2].WinHeight; Controls[3].WinWidth = Controls[2].WinWidth; Controls[4].WinLeft = Controls[3].WinLeft + Controls[3].WinWidth *1.25; Controls[4].WinTop = Controls[2].WinTop; Controls[4].WinHeight = Controls[2].WinHeight; Controls[4].WinWidth = Controls[2].WinWidth; //hide all controls when not active. for(i = 0; i< Controls.Length; i++) { Controls[i].wintop = Controls[i].wintop -2; } UpdateLanguage(); } //============================================================================= // Date Id Modification // 2006-10-07 The Created this function //============================================================================= function ShowPanel(bool bShow) { local int i; Super.ShowPanel(bShow); //log("ShowPanel MenuHandBookTab"); if(bShow) { for(i = 0; i< Controls.Length; i++) { Controls[i].wintop = Controls[i].wintop +2; } }else { for(i = 0; i< Controls.Length; i++) { Controls[i].wintop = Controls[i].wintop -2; } } UpdateLanguage(); } //============================================================================= // Date Id Modification // 2006-10-07 The Created this header //============================================================================= function UpdateLanguage() { if (GeoPC.Dutch) { log("UpdateLanguage1"); GUIGFxButton(Controls[2]).Caption = NL_General; log("UpdateLanguage2"@ GUIGFxButton(Controls[2]).Caption); GUIGFxButton(Controls[3]).Caption = NL_Failures; GUIGFxButton(Controls[4]).Caption = NL_Signals; MenuOwner.TitleBar.Caption = MenuOwner.NL_Title; } else { log("UpdateLanguage3"); GUIGFxButton(Controls[2]).Caption = EN_General; GUIGFxButton(Controls[3]).Caption = EN_Failures; GUIGFxButton(Controls[4]).Caption = EN_Signals; MenuOwner.TitleBar.Caption = MenuOwner.EN_Title; log("UpdateLanguage4"); } } function bool InternalOnClick(GUIComponent Sender) { local int i; for(i = 0; i < Controls.length; i++) { if(Sender == Controls[i]) { switch(i) { case 2: //General MenuOwner.TabC.ActivateTabByName("General",true); GeoPC.geoFb.logEvent("show_handbook_general"); break; case 3: //Failures MenuOwner.TabC.ActivateTabByName("Failures",true); GeoPC.geoFb.logEvent("show_handbook_failures"); break; case 4: //signals MenuOwner.TabC.ActivateTabByName("Signals",true); GeoPC.geoFb.logEvent("show_handbook_signals"); break; } } } return true; } //============================================================================= // Date Id Modification // 2006-10-07 The Created this header //============================================================================= defaultproperties { Begin Object Class=GUIButton name=Background bAcceptsInput=false bNeverFocus=true StyleName="GeoCallBar" End Object Controls(0)=GUIButton'Background' Begin Object class=GUILabel Name=TopicDesc Caption="" TextALign=TXTA_Center TextColor=(R=255,G=120,B=0,A=255) TextFont="HeaderFont" bVisible=false; End Object Controls(1)=GUILabel'TopicDesc' Begin Object Class=GUIGFxButton Name=General //Graphic=Material'InGameMenuImagesT.ImageButtons.FinalStats' Graphic=Material'InGameMenuImagesT.Handbook.GeneralFB'; Position="ICP_Scaled" Caption="***" StyleName="MidGameButton_Orange" OnClick=InternalOnClick End Object Controls(2)=GUIGFxButton'General' Begin Object Class=GUIGFxButton Name=Failures Graphic=Material'InGameMenuImagesT.Handbook.FailureFB'; Position="ICP_Scaled" Caption="***" StyleName="MidGameButton_Orange" OnClick=InternalOnClick End Object Controls(3)=GUIGFxButton'Failures' Begin Object Class=GUIGFxButton Name=Signals Graphic=Material'InGameMenuImagesT.Handbook.SignalsFB'; Position="ICP_Scaled" Caption="***" StyleName="MidGameButton_Orange" OnClick=InternalOnClick End Object Controls(4)=GUIGFxButton'Signals' //standard variables ButtonWidth=0.2 ButtonTabWidth=0.21 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 LineHeight=0.035 bFillHeight = true; EN_General="General"; NL_General="Algemeen"; EN_Failures="Failures"; NL_Failures="Faalmechanismen"; EN_Signals="Signals"; NL_Signals="Signalen"; }