Game Development Community

Control profile always resets

by Koen Van Baelen · in Torque Game Builder · 06/05/2007 (11:09 am) · 2 replies

I have created a gui with some text controls. I also created a gui profile in game.cs, like this:

new GuiControlProfile (GuiTextGreenRight : GuiTextProfile)
{
fontSize = 24;
fontColor = "0 255 0";
justify = "right";
};

When I set the control profile to this, save everything, exit TGB and start it up again, the profile is always reset to GuiDefaultProfile, even though I have saved everything. What am I doing wrong?

#1
06/06/2007 (1:03 am)
It could be an ordering issue. I.e. is your guiTextGreenRight profile setup before the gui that needs it is called?

Try adding the profile to the default profiles (cant remember the directory, but there should be a defaultprofiles.cs somewhere).
#2
06/06/2007 (10:26 am)
I have moved the code from game.cs to profiles.cs, wich is in the common/gui folder and it seems to work now. Thanks for the help!