Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

KFMod.KFSPObjectiveBoard


00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
// This will be used by the story gametype.
// you can toggle the menu on and off and it will display your pending objectives.

class KFSPObjectiveBoard extends KFScoreBoard;

var localized string TitleString,NoObjString;
var KFSGameReplicationInfo SPRep;

simulated function PostBeginPlay()
{
	Super.PostBeginPlay();
	SPRep = KFSGameReplicationInfo(Level.GRI);
}
simulated event UpdateScoreBoard(Canvas Canvas)
{
	if( Level.NetMode!=NM_StandAlone )
		Super.UpdateScoreBoard(Canvas);
	RenderObjectivedBoard(Canvas);
}
simulated event RenderObjectivedBoard(Canvas Canvas)
{
	local float XL,YL,Dummy;
	local string S;

	Canvas.Font = GetSmallerFontFor(Canvas,4);
	Canvas.TextSize(TitleString, XL, YL);
	Canvas.SetPos(Canvas.ClipX-XL-5,5);

	Canvas.DrawColor = HUDClass.default.WhiteColor;
	Canvas.DrawText(TitleString,true);

	if( SPRep!=None && SPRep.KFPLevel!=None )
	{
		if( SPRep.CurrentObjectiveNum>=SPRep.KFPLevel.MissionObjectives.Length )
			S = NoObjString;
		else S = SPRep.KFPLevel.MissionObjectives[SPRep.CurrentObjectiveNum];
		Canvas.Font = GetSmallerFontFor(Canvas,3);
		Canvas.TextSize(S, XL, Dummy);
		Canvas.SetPos(Canvas.ClipX-XL-5,YL+7);
		Canvas.DrawText(S,true);
	}
}
simulated function SetGRI(GameReplicationInfo GRI)
{
	SPRep = KFSGameReplicationInfo(GRI);
}

defaultproperties
{
     titlestring="Current Objective:"
     NoObjString="No Objectives"
     HudClass=Class'KFMod.HUDKillingFloorSP'
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: Fri 13-10-2023 03:17:26.000 - Creation time: Fri 13-10-2023 03:19:04.140 - Created with UnCodeX