// 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. //============================================================================= // GeoHUDMenu // Started using MyFirstHUD (FROM UDN) // // IMPORTANT: FOR LOADING SCREEN WHEN STARTING FROM THE MENU HANDLE HERE // FOR LOADING SCREEN WHEN SWITCHING LEVELS HANDLE GeoHUD.UC // //============================================================================= // Date Id Modification // 2006-09-18 gui New Menu HUD // 2006-10-26 The Shortened Dutch startup tip // 2006-12-04 bas Changed dutch loading message // 2006-12-12 gui Informations in Complete exercise // 2007-02-07 gui Image for single exercise // 2007-06-07 wsl Images are square and centred on screen // 2007-06-08 wsl Images accompanying tip 0 are centred // 2007-07-25 mcb Modified the level loading tips // 2008-02-12 wsl Corrected English texts //============================================================================= class GeoHUDMenu extends HUD; #exec OBJ LOAD FILE=GeoDelft.utx var GeoPlayerController PlayerOwner; var() Material TitleMaterial, BackPicture; var() Material KeysImage; var() Material Mouse; var Material LevelPreview; var string NL_LoadingMessage, EN_LoadingMessage, EN_Exercise, NL_Exercise; var array NL_Tip, EN_Tip; var int ColorNumber; var bool IsColorUp; //============================================================================= // Date Id Modification // 2006-10-26 The Created this header //============================================================================= simulated function PostBeginPlay() { Super.PostBeginPlay(); PlayerOwner = GeoPlayerController(Owner); SaveConfig(); } //============================================================================= // Redo Draw the Level Action for both languages // Date Id Modification // 2006-10-26 The Created this header // 2006-12-12 gui New information for loading in complete exercise //============================================================================= function bool DrawLevelAction( canvas C ) { local string BigMessage; local string TipMsg; local color WhiteColor; local float ImageX, ImageY; local float LevelImageScale, CPosX, CPosY; local GeoCompleteExercise GCE; local string ExerciseMessage; local int RandomTip; // local string DescriptionMessage; WhiteColor = class'Canvas'.static.MakeColor(255,255,255); if (Level.LevelAction == LEVACT_None ) { if ( (Level.Pauser != None) && (Level.TimeSeconds > Level.PauseDelay + 0.2) ) BigMessage = PausedMessage; // Add pauser name? else { BigMessage = ""; return false; } } // *************************************************************************** // THIS WILL LOAD ONLY ON THE FIRST MAP (in story) OR SCENARIO GENERATOR // FOR RESTART GAME OR TRAVELING BETWEEN LEVELS USE GEOHUD // *************************************************************************** else if ( Level.LevelAction == LEVACT_Loading ) { GCE = new class'GeoCompleteExercise'; RandomTip=Rand(NL_Tip.Length); if(PlayerOwner.Dutch) { BigMessage = NL_LoadingMessage; ExerciseMessage = NL_Exercise @GCE.CurrentLevelInfo() @"/" @GCE.TotalLevels(); TipMsg = NL_Tip[RandomTip]; } else { BigMessage = EN_LoadingMessage; ExerciseMessage = EN_Exercise @GCE.CurrentLevelInfo() @"/" @GCE.TotalLevels(); TipMsg = EN_Tip[RandomTip]; } // BACKGROUND ON LOADING SCREEN C.DrawColor = WhiteColor; C.SetPos(0.0, 0.0); // background image is 1024x1024 ImageX=C.ClipX / 1024.0; ImageY=C.ClipY / 1024.0; C.DrawTileScaled( BackPicture, ImageX, ImageY); // COMPLETE EXERCISE INFOS if(GCE.IsCompleteExercise) { C.SetPos(0.0,0.0); UseLargeFont(C); C.DrawTextJustified(ExerciseMessage, 1, 0, 0, C.ClipX, C.ClipY/3); } // LOADING IMAGE (LEVEL SCREENSHOT) SetLoadingImage(GCE); // level pictures are 512x512, picture width should be screen height/2.5 LevelImageScale = C.ClipY / 512.0 / 2.5; //LevelImageY = C.ClipY / 512.0 / 2.5; CPosX = (C.ClipX / 2) - (LevelImageScale * 512.0 / 2); CPosY = 0.22 * C.ClipY; C.SetPos(CPosX, CPosY); // draw the picture as a square, because the texture used is also square C.DrawTileScaled(LevelPreview, LevelImageScale, LevelImageScale); // TIPS C.SetPos(0.0, 0.0); if (C.ClipX < 1024) { UseSmallFont(C); } else { UseMediumFont(C); } C.DrawTextJustified(TipMsg, 1, 0, 0.45 * C.ClipY, C.ClipX, C.ClipY); // IMAGES FOR TIP 0 if(RandomTip==0) { // Keyboard and Mouse image; are 512x512 and will be 1/7 of screen height //ImageX=C.ClipX / 512.0 / 10.0; ImageY = C.ClipY / 512.0 / 7.0; CPosX = 2 * C.ClipX / 5 - (ImageY * 512.0 / 2); CPosY = 0.75 * C.ClipY; C.SetPos(CPosX, CPosY); C.DrawTileScaled( KeysImage, ImageY, ImageY); CPosX = 3 * C.ClipX / 5 - (ImageY * 512.0 / 2); C.SetPos(CPosX, CPosY); C.DrawTileScaled( Mouse, ImageY, ImageY); } } else if ( Level.LevelAction == LEVACT_Saving ) BigMessage = SavingMessage; else if ( Level.LevelAction == LEVACT_Connecting ) BigMessage = ConnectingMessage; else if ( Level.LevelAction == LEVACT_Precaching ) BigMessage = PrecachingMessage; if ( BigMessage != "" ) { C.Style = ERenderStyle.STY_Normal; UseLargeFont(C); PrintActionMessage(C, BigMessage); return true; } return false; } function SetLoadingImage(GeoCompleteExercise GeoCE) { local GeoLevelDetails GLD; GLD = new class'GeoLevelDetails'; if(GeoCE.IsCompleteExercise) { LevelPreview = GeoCE.GetCurrentLevelScreenshot(); } else { LevelPreview = GLD.CurrentLevelImage; } } //============================================================================= // Print a centered level action message with a drop shadow. // Date Id Modification // 2006-10-26 The Created this header //============================================================================= function PrintActionMessage( Canvas C, string BigMessage ) { local float XL, YL; if ( Len(BigMessage) > 10 ) UseLargeFont(C); else UseHugeFont(C); C.bCenter = false; C.StrLen( BigMessage, XL, YL ); C.SetPos(0.5 * (C.ClipX - XL) + 1, 0.96 * C.ClipY - YL * 0.95 + 1); C.SetDrawColor(0,0,0); C.DrawText( BigMessage, false ); C.SetPos(0.5 * (C.ClipX - XL), 0.96 * C.ClipY - YL * 0.95); C.SetDrawColor(255,0,0);; C.DrawText( BigMessage, false ); } //============================================================================= // Date Id Modification // 2006-10-26 The Created this header // 2006-10-26 The Shortened Dutch startup tip //============================================================================= defaultproperties { TitleMaterial=Material'GUIContent.SquareBoxA' BackPicture=Material'GeoDelft.BackGround0' KeysImage=Material'InGameMenuImagesT.ImageButtons.ArrowKeys' Mouse=Material'InGameMenuImagesT.ImageButtons.Mouse' LevelPreview=Material'GeoDelft.MapPreview.LevelPreview' SmallFont=Font'ExampleFonts_T.ExampleFont10' MedFont=Font'ExampleFonts_T.ExampleFont14' BigFont=Font'ExampleFonts_T.ExampleFont18' LargeFont=Font'ExampleFonts_T.ExampleFont22' FontArrayNames(0)="ExampleFonts_T.ExampleFont38" FontArrayNames(1)="ExampleFonts_T.ExampleFont38" FontArrayNames(2)="ExampleFonts_T.ExampleFont34" FontArrayNames(3)="ExampleFonts_T.ExampleFont30" FontArrayNames(4)="ExampleFonts_T.ExampleFont26" FontArrayNames(5)="ExampleFonts_T.ExampleFont22" FontArrayNames(6)="ExampleFonts_T.ExampleFont18" FontArrayNames(7)="ExampleFonts_T.ExampleFont14" FontArrayNames(8)="ExampleFonts_T.ExampleFont10" FontScreenWidthMedium(0)=1600 FontScreenWidthMedium(1)=1600 FontScreenWidthMedium(2)=1600 FontScreenWidthMedium(3)=1600 FontScreenWidthMedium(4)=1280 FontScreenWidthMedium(5)=1024 FontScreenWidthMedium(6)=800 FontScreenWidthMedium(7)=640 FontScreenWidthMedium(8)=0 ConsoleMessageCount=4 ConsoleFontSize=5 MessageFontOffset=0 EN_LoadingMessage="LOADING LEVEE PATROLLER..." NL_LoadingMessage="DIJK PATROUILLE LADEN..." EN_Exercise="Exercise" NL_Exercise="Oefening" // ********************************************************************************* // TIPS FOR TRAINING, SINGLE EXERC and FIRST LEVEL IN COMPLETE STORY // (see GeoHUD for other tips during complete exercise) // ********************************************************************************* NL_Tip[0]="TIP: Optimaal spelplezier met de linkerhand op de pijltjestoetsen en de rechterhand op de muis." EN_Tip[0]="HINT: For optimal game play, use your left hand on the arrow keys and right hand on the mouse." NL_Tip[1]="TIP: Je kan altijd op 'K' drukken om de kaart te bekijken." EN_Tip[1]="HINT: You can press 'M' at any time to see the map." NL_Tip[2]="TIP: Je kan niet over de slootjes springen, dus let goed op waar hekken en overgangen zijn." EN_Tip[2]="HINT: You cannot jump over ditches, so look out for gates and bridges." NL_Tip[3]="TIP: Het is niet toegestaan de schapen te voederen!" EN_Tip[3]="HINT: Do not feed the sheep!" NL_Tip[4]="TIP: Je kan ook de toetsen W S A D gebruiken om te bewegen." EN_Tip[4]="HINT: You can also use the keys W S A D instead of the arrow keys." NL_Tip[5]="TIP: Het makkelijkst is om te meten vóórdat je je rapport invult." EN_Tip[5]="HINT: The easiest way is to take measurements before you fill in a report." NL_Tip[6]="TIP: Eén Rapportpiket plaatsen per faalmechanisme is genoeg." EN_Tip[6]="HINT: One report maker for each failure mechanism is enough." NL_Tip[7]="TIP: Als je meerdere signalen dicht bij elkaar ziet, is de kans groot dat ze bij het zelfde mechanisme horen." EN_Tip[7]="HINT: If you see multiple signals close to each other, it's likely they belong to the same failure mechanism." NL_Tip[8]="TIP: Op de kaart kun je zien waar je bent en waar de Rapportpiketten zijn." EN_Tip[8]="HINT: You can use the map to determine your location and the location of report markers." NL_Tip[9]="TIP: Als een signaal is veranderd is het wijzigen van een eerdere observatie soms voldoende." EN_Tip[9]="HINT: Sometimes, changing an old observation is enough to report that a signal has changed." }