Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |
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 |
class TribesCharacterHUDScript extends TribesInGameHUDScript; // weapons var HUDWeaponIcon fallbackWeapon; var HUDWeaponIcon weapons[3]; var HUDDeployableIcon deployable; var HUDCarryableIcon carryable; // other items var HUDHealthKitIcon healthKit; var HUDPackIcon pack; var HUDGrenadesIcon grenades; var HUDLoadoutMenu loadoutMenu; var HUDContainer loadoutMenuContainer; var LoadoutMenu rootLoadoutMenuObject; var String rootLoadoutMenuObjectName; var bool bOldLoadoutSelection; var PlayerProfile ActiveProfile; // // Initalises the component // overloaded function Construct() { super.Construct(); // weapon bar fallbackWeapon = HUDWeaponIcon(AddElement("TribesGUI.HUDWeaponIcon", "default_FallbackWeapon")); fallbackWeapon.weaponIdx = -1; weapons[0] = HUDWeaponIcon(AddElement("TribesGUI.HUDWeaponIcon", "default_weapon0")); weapons[0].weaponIdx = 0; weapons[1] = HUDWeaponIcon(AddElement("TribesGUI.HUDWeaponIcon", "default_weapon1")); weapons[1].weaponIdx = 1; weapons[2] = HUDWeaponIcon(AddElement("TribesGUI.HUDWeaponIcon", "default_weapon2")); weapons[2].weaponIdx = 2; deployable = HUDDeployableIcon(AddElement("TribesGUI.HUDDeployableIcon", "default_deployable")); carryable = HUDCarryableIcon(AddElement("TribesGUI.HUDCarryableIcon", "default_Carryable")); // item bar pack = HUDPackIcon(AddElement("TribesGUI.HUDPackIcon", "default_pack")); grenades = HUDGrenadesIcon(AddElement("TribesGUI.HUDGrenadesIcon", "default_grenades")); loadoutMenuContainer = HUDContainer(AddElement("TribesGUI.HUDContainer", "default_LoadoutMenuContainer")); loadoutMenu = HUDLoadoutMenu(loadoutMenuContainer.AddElement("TribesGUI.HUDLoadoutMenu", "default_LoadoutMenu")); RegisterKeyEventReceptor(loadoutMenu); // load up the root menu (only once!) rootLoadoutMenuObject = LoadoutMenu(FindObject("RootLoadoutMenu", class'TribesGUI.LoadoutMenu')); if(rootLoadoutMenuObject == None) { rootLoadoutMenuObject = new (None, "RootLoadoutMenu") class'TribesGUI.LoadoutMenu'; rootLoadoutMenuObject.InitMenu(); loadoutMenu.InitMenu(rootLoadoutMenuObject, None, loadoutMenuContainer); } } function UpdateData(ClientSideCharacter c) { super.UpdateData(c); // always cancel the menu if we are not enabled if(! c.bLoadoutSelection) loadoutMenu.CancelAll(); else if(bOldLoadoutSelection != c.bLoadoutSelection) { rootLoadoutMenuObject.RefreshMenu(c.loadoutNames, c.loadoutEnabled); loadoutMenu.OpenMenu(); } bOldLoadoutSelection = c.bLoadoutSelection; } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |