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

Gameplay.Action_DrawHUDMaterial


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
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
//Draw a texture on the local player's HUD
class Action_DrawHUDMaterial extends LatentScriptedAction;

var(Action) Material HUDMaterial;
var(Action) float PosX, PosY, Width, Height; //scaled to screen resolution if <= 1
var(Action) float DisplayTime;
var ScriptedHudOverlay Overlay;

function bool InitActionFor(ScriptedController C)
{
	local PlayerController PC;

	PC = C.Level.GetLocalPlayerController();
	if (PC == None)
	{
		Warn("No local player!");
		return false;
	}

	if (PC.myHUD == None)
	{
		Warn("Local player has no HUD!");
		return false;
	}

	Overlay = C.spawn(class'ScriptedHudOverlay', PC);
	Overlay.HUDMaterial = HUDMaterial;
	Overlay.PosX = PosX;
	Overlay.PosY = PosY;
	Overlay.Width = Width;
	Overlay.Height = Height;
	PC.myHUD.AddHudOverlay(Overlay);

	C.CurrentAction = self;
	C.SetTimer(DisplayTime, false);

	return true;
}

function ActionCompleted()
{
	Overlay.Destroy();
}

function bool CompleteWhenTriggered()
{
	return true;
}

function bool CompleteWhenTimer()
{
	return true;
}

defaultproperties
{
     PosX=0.400000
     PosY=0.400000
     Width=0.200000
     Height=0.200000
     DisplayTime=1.000000
     ActionString="draw HUD texture"
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: pr 5-2-2018 12:35:50.000 - Creation time: sk 18-3-2018 09:50:02.439 - Created with UnCodeX