Initializing GUI classes

Raza.Raza. Join Date: 2004-01-24 Member: 25663Members, Constellation
<div class="IPBDescription">Where to create them?</div>Hey everyone, I'm currently trying to mod the HUD.
I've had a look at the GUI***.lua files and adding a plasma resource display was easy.

Now instead of adding code to existing class files, I want to create my own.
However, I have no idea where the GUI objects are created.

Does anyone know where the alien, marine and spectator* HUDs get initialized?

*(I'm not sure there is a spectator HUD.)

Comments

  • Raza.Raza. Join Date: 2004-01-24 Member: 25663Members, Constellation
    edited November 2010
    Ok I finally discovered the "Find in files" option and can now answer my own question. :D

    The basic HUD elements are created by Player:OnInitLocalClient() of Player_Client.
    The alien and marine specific HUDs are created by the OnInitLocalClient() functions of Alien_Client and Marine_Client.

    I'm still searching for the spectator HUD though...
  • fsfodfsfod uk Join Date: 2004-04-09 Member: 27810Members, NS2 Developer, Constellation, NS2 Playtester, Squad Five Blue, Squad Five Silver, Squad Five Gold, Subnautica Playtester, NS2 Community Developer, Pistachionauts
    i've also been messing about making a res display <img src="http://img19.imageshack.us/img19/631/resdisplay.jpg" border="0" class="linked-image" />
    its fully movable as well and i haven't got round to doing all the creation and destruction logic that you working on yet.
  • DY357LXDY357LX Playing since day 1. Still can&#39;t Comm. England Join Date: 2002-10-27 Member: 1651Members, Constellation
    Ohhhhhh nice work.

    If you get the time, could you make something similar that displays your reserve ammo?

    (The rifle simply displays 14/50 etc. Nothing about what's left so I can plan a return trip the armoury.)
  • Raza.Raza. Join Date: 2004-01-24 Member: 25663Members, Constellation
    Reserve ammo is displayed on the weapons.
    One bar per magazine.
Sign In or Register to comment.