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

TribesGUI.HUDMarkerDisplay


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
//
// class: HUDMarkerDisplay
//
// Element to paint markers on the screen over enemies & allies, & to
// mark out where objectives are, etc.
//
class HUDMarkerDisplay extends HUDRadarBase;

var ClientSideCharacter currentData;

function UpdateData(ClientSideCharacter c)
{
	super.UpdateData(c);

	bVisible = true;

	currentData = c;
}

function RenderElement(Canvas c)
{
	local int i;
	local Class<RadarInfo> radarInfoClass;
	local HUDMaterial material;
	//local ObjectiveInfo.ClientObjectiveActorInfo nextActorInfo;

	super.RenderElement(c);

	for(i = 0; i < currentData.markers.Length; i++)
	{
		radarInfoClass = currentData.markers[i].Type;

		if( radarInfoClass != None && radarInfoClass.default.bDisplayViewport &&
			currentData.markers[i].ScreenX > 0 && currentData.markers[i].ScreenX < Width &&
			currentData.markers[i].ScreenY > 0 && currentData.markers[i].ScreenY < Height)
		{
			if(currentData.markers[i].Team != None)
				material = GetHUDMaterial(radarInfoClass, currentData.markers[i].State, currentData.markers[i].Friendly, ICON_Viewport, currentData.markers[i].Team.default.TeamColor, currentData.UserPrefColorType);
			else
				material = GetHUDMaterial(radarInfoClass, currentData.markers[i].State, currentData.markers[i].Friendly, ICON_Viewport, currentData.ownTeamColor, currentData.UserPrefColorType);
			c.SetPos(currentData.markers[i].ScreenX - (material.Coords.UL / 2), 
				currentData.markers[i].ScreenY - material.Coords.UL);
			if(material.bFading)
				material.fadeProgress = FClamp((TimeSeconds % material.fadeDuration) / material.fadeDuration, 0.f, 1.f);
			RenderHUDMaterial(c, material, material.Coords.UL, material.Coords.VL);
		}
	}
}

defaultproperties
{
//	enemyMarkerMaterial = (material=Texture'HUD.Tags',style=1,drawColor=(R=255,G=0,B=0,A=255),Coords=(U=0,V=24,UL=11,VL=8))
//	allyMarkerMaterial = (material=Texture'HUD.Tags',style=1,drawColor=(R=0,G=255,B=0,A=255),Coords=(U=12,V=24,UL=11,VL=8))
//	objectiveMarkerMaterial = (material=Texture'HUD.Tags',style=1,drawColor=(R=0,G=0,B=255,A=255),Coords=(U=12,V=24,UL=11,VL=8))
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: st 16.4.2014 10:20:44.000 - Creation time: st 23.5.2018 00:10:44.357 - Created with UnCodeX