Game Development Community

GUI Builder doesn't save dynamic fields

by Jordan Jeremy Wallet · in Torque Game Builder · 08/06/2010 (5:24 am) · 5 replies

Topic pretty much says it all: when a field is added to a control in the GUI Builder, and the GUI is saved, the field is not saved to the .gui file.

About the author

J. J. Wallet is a 20-something with an unhealthy obsession with game development and a relatively bare resumé.


#1
08/06/2010 (5:47 am)
try setting it dynamically through script...works for me
#2
08/06/2010 (7:05 am)

Make sure you have the "canSaveDynamicFields" property set to true for your controls.
#3
08/09/2010 (4:18 am)
Whoa whoa whoa hold the phone... There's an option that defaults to off for whether or not the GUI builder works? Where can I find this "doesWork" property? I can't find it anywhere.
#4
08/09/2010 (4:44 am)
When you click on a GUI element, one of the top options is "canSaveDynamicFields". It's way down in one of the base objects called SimObject.

It used to be that the GUI editor was accessible straight from the game (back in the TGE days). When you set "canSaveDynamicFields", your GUI's state was changed just because you decided to tweak a GUI. People tended to set the dynamic variables through the scripts, typically using the ::onWake() callback for the specific GUI.

As a matter of fact, "canSaveDynamicFields" defaults to true in the SimObject. The base GUI object called GuiControl overrides this behavior and sets the default to "false". I notice you have the Pro version of T2D. You can go into gui/core/guiControl.cc and delete the "mCanSaveFieldDictionary = false;" line if you want to set the default behavior to always save dynamic fields.
#5
08/09/2010 (4:54 am)
Thanks for the big write-up! I knew there had to be some reason - there always is - but it's more fun to wax incredulous. Found the flag and everything should be fine now. Thanks again!