Game Development Community

Source edit for changing the profile box to a string?

by Orion the Hunter · in Torque Game Builder · 01/04/2013 (7:21 am) · 9 replies

Hello,

I was wondering if there was a .cc file I could change in T2D's source that would allow me to change the drop-down box that defines the profile of a gui to a string to avoid the issue where when I save the box resets to "GuiDefualtProfile" no matter what I do. Currently the file that we might want to invest in to is "guiInspectorTypes.cc." I saw the field but I just didn't want to screw up the engine.

Thanks a lot!

#1
01/07/2013 (9:37 am)
Still having trouble and I'm stumpped. Help!
#2
01/07/2013 (9:53 am)
There is no reason to edit the source. The GUI editor is just a GUI, edit the GUI. Then in your script assign the name of the profile as the text in the edit box and assign the text in the edit box to the profile field of the selected gui control when the gui saves.

The scripts for the TGB editor are in <T2D install folder>/tgb/Tools and the Torsion project is in <T2D install folder>/tgb/Torsion.
#3
01/08/2013 (10:27 am)
Thanks, but which control do I edit? I'm assuming the file that has the right control is: /tgb/tools/guiEditor/gui/guiEditor.ed.gui

Right?

#4
01/08/2013 (12:02 pm)
That should be the right file - and you'll probably want to look at the associated scripts to see where the system is getting the list of available profiles assembled to add to that drop-down.

Then just search for GuiPopUpMenuCtrl.... There aren't that many of them on that page....
#5
01/09/2013 (7:58 am)
No, I just checked. The only popups where for the resolution thing and the gui selection on the top right. Are you sure it's there? Are you sure there is no need to do source edits?
#6
01/09/2013 (1:54 pm)
I'm not as sure as I was - most of the panes and roll-outs are dynamic and are created in script somewhere and the tools are a big chunk of script, but I've looked at the guiInspector class in source and nowhere does it appear to determine the actual control used to display a given field (though it does set the control profiles).
#7
01/10/2013 (6:14 am)
That's why I think it was hard-coded in to the engine itself. After all, when I was working on a "loop" option (right above the "done" button) for Theora controls for the gui editor, I had to edit the source to add it. Let me dig something up...
#8
01/10/2013 (6:31 am)
Okay, I tried to do it through the source. This is from guiInspectorTypes.cc… Go to line 23. See this?
retCtrl->setField( "profile", "InspectorTypeEnumProfile" );

I changed it to:

menu->setField( "profile", "InspectorTypeEnumProfile" );
But after building it (successfuly) and trying it out with no results, I think there is some work to do in "GuiInspectorTypes.h" as well. Maybe even in GuiInspector.cc/.h.

Thanks!
#9
01/15/2013 (3:39 pm)
Any more help?