Game Development Community

TGEA 1.7.1 - Gui Profiles Broken

by Gareth Fouche · in Torque Game Engine Advanced · 07/02/2008 (1:15 pm) · 3 replies

Hi,

I'm experiencing an odd issue with a fresh install of TGEA 1.7.1. Gui Profiles are fubar. Instead of a pop up list when I click on an existing gui object, like a text control, it acts like a text field, ie I can just edit the profile...except editing it and applying doesn't do anything. When I create a new text ctrl the profile field is blank, although it does seem to have some default profile since I can see the text that I enter. Again, changing the profile field does nothing.

I'm investigating now, but if anyone has run into this feel free to jump in. :)

#1
07/02/2008 (2:46 pm)
It appears to be because the "initPersistFields()" function in guiControl.cpp has changed, instead of exposing the actual guiProfile it is exposing a string representing that profile.

From what I can see the code that dynamically populates the fields in the inspector pane queries the type of the field to determine how to create the field, since it is a string and not a datablock (profile) if treats it as a normal text edit field. By changing the initPersistFields() lines from :

addField("Profile",          TypeString,       Offset(mProfileName, GuiControl));

to

addProtectedField("Profile",  TypeGuiProfile,   Offset(mProfile, GuiControl), &setProfileProt, &defaultProtectedGetFn, "");

and


addField("tooltipprofile",    TypeString,       Offset(mTooltipProfileName, GuiControl));

to

addField("tooltipprofile",    TypeGuiProfile,   Offset(mTooltipProfile, GuiControl));

The problem seems to be fixed.

Note that all I did was compare TGEA 1.7.1 to TGEA 1.7.0 to get that fix. Since this seems to have been purposefully changed for 1.7.1 I suspect that the proper way might involve fixing it somehow for those strings? It looks like they wanted to restrict access to those private member variables? I'm not sure, but this doesn't seem to break anything else, sooo...

:)
#2
03/12/2009 (11:02 pm)
I test on TGEA 1.8.1,it seems to working fine.
Thanks!
#3
06/04/2010 (9:07 pm)
I know this resource is old, but I just want to tell anyone who is having this issue this post is still relevant. TGEA 1.8 has this problem as well.

:) Good Luck!