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

TribesGUI.TribesIngameHUDScript


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
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
//================================================================
// Class: TribesIngameHUDScript
//
// The default Tribes HUD script implementation.
//
//================================================================

class TribesIngameHUDScript extends TribesEditableHUDScript;

// health & energy indicators
var HUDHealthBar health;
var HUDEnergyBar energy;

// radar & misc stuff
var HUDRadar radar;
var HUDObjectiveNotification objectiveNotify;

// full screen stuff
var HUDMarkerDisplay markerDisplay;
var HUDWeaponReticule weaponReticule;
var HUDDeployableReticule deployableReticule;
var HUDUseableMarker useableMarker;
var HUDDamageIndicator damageIndicator;

var HUDTargetInfo targetInfo;
var HUDThrowMeter throwMeter;

var HUDTalkingHead talkingHead;
var LabelElement promptLabel;

var HUDPersonalMessageWindow PersonalMessageWindow;
var HUDPersonalScores PersonalScores;

var HUDIcon redJackIcon;

//
// Initalises the component
//
overloaded function Construct()
{
	super.Construct();

	// marker display  - goes first so it renders first
	markerDisplay = HUDMarkerDisplay(AddElement("TribesGUI.HUDMarkerDisplay", "default_markerDisplay"));
	useableMarker = HUDUseableMarker(AddElement("TribesGUI.HUDUseableMarker", "default_useableMarker"));

	damageIndicator = HUDDamageIndicator(AddElement("TribesGUI.HUDDamageIndicator", "default_DamageIndicator"));

	// health & energy
	health					= HUDHealthBar(AddElement("TribesGUI.HUDHealthBar", "default_health"));
	energy					= HUDEnergyBar(AddElement("TribesGUI.HUDEnergyBar", "default_energy"));

	// radar
	radar = HUDRadar(AddElement("TribesGUI.HUDRadar", "default_radar"));
	objectiveNotify = HUDObjectiveNotification(AddElement("TribesGUI.HUDObjectiveNotification", "default_ObjectiveNotification"));

	// reticules
	weaponReticule = HUDWeaponReticule(AddElement("TribesGUI.HUDWeaponReticule", "default_weaponReticule"));
	deployableReticule = HUDDeployableReticule(AddElement("TribesGUI.HUDDeployableReticule", "default_deployableReticule"));

	// other things for the center of the screen
	targetInfo = HUDTargetInfo(AddElement("TribesGUI.HUDTargetInfo", "default_targetInfo"));
	throwMeter = HUDThrowMeter(AddElement("TribesGUI.HUDThrowMeter", "default_ThrowMeter"));

	talkingHead = HUDTalkingHead(AddElement("TribesGUI.HUDTalkingHead", "default_talkingHead"));

	promptLabel = LabelElement(AddElement("TribesGUI.LabelElement", "default_InGamePromptLabel"));

	redJackIcon = HUDIcon(AddElement("TribesGUI.HUDIcon", "default_redJackIcon"));

	PersonalMessageWindow = HUDPersonalMessageWindow(AddElement("TribesGui.HUDPersonalMessageWindow", "default_PersonalMessageWindow"));
	PersonalScores = HUDPersonalScores(AddElement("TribesGui.HUDPersonalScores", "default_PersonalScores"));
}


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

	// update the prompt text
	promptLabel.bVisible = c.promptText != "";
	if(promptLabel.bVisible)
	{
		promptLabel.SetText(c.promptText);
	}

	if (c.ping >= 255)
		redJackIcon.bVisible = true;
	else
		redJackIcon.bVisible = false;
}

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