Game Development Community

Trouble with my HUD - short question

by Milan Rancic · in Torque Game Builder · 03/12/2008 (12:10 pm) · 3 replies

I am trying to build my game HUD, but i have a trouble with GUI interface.

The problem is, when i put GuiTextCtrl - text fields on my HUD (so they are not efected by camera movements) they should display (each one in every corner) health, ammo, exp, and character level.

And they do, but the trouble is that i dont know how to change font, color and font size of those text fields since gui doesnt provide options for GuiTextCtrl?

Anyone had experience with that kind of stuff?

#1
03/13/2008 (12:42 pm)
You'll want to create your own custom GUI profiles. To do that, go to your /game/gamescripts directory within your project. Locate the guiProfiles.cs file and open that up.

Inside you'll see four pre-existing profiles that serve as examples. I believe there is also a reference around that explains all of the properties you can set within a GUI profile (but don't ask me to find it for ya!). It is pretty straight forward stuff, all the same, so you shouldn't have too much difficulty from there.
#2
03/13/2008 (2:23 pm)
I am using TGB v1.5.0 and i found it in: common/gui/profiles.cs
Is that it?

Ok, ill play with it a little bit. I hope it wont take me too long to figure out. Thnx for starter instructions.
#3
03/13/2008 (3:04 pm)
That is likely it in v1.5, though I can't confirm it 100% and your version may also have more than four profiles in it, though I honestly can't recall what the default profiles were like in an earlier version. You should be on the right foot, or close to it, regardless.