Game Development Community

Modifying the Editor

by RollerJesus · in Torque Game Builder · 05/16/2010 (9:43 am) · 4 replies

Is it possible to modify the GUI of the TBG editor? For instance, I've added Ben Versaw's mouse blocking resource and it would be nice to have it as an additional check box in the Scripting rollout next to the Use Mouse Events checkbox.

I searched for "Use Mouse Events" (and derivations of that) in Visual Studio, hoping to find where the checkbox was created but I only got back references to the use of it in t2dSceneObjects and the t2dSceneGraph where it's actually used in game, console methods, etc - not in the editor.

Thanks!
Pat

#1
05/16/2010 (10:17 am)
The editors are all scripted (.gui/.cs), so if you want to find controls in the script as reference points to add in new controls, you'll want to do a search in Torsion or something.
#2
05/16/2010 (10:56 am)
Hmmm... Thanks for the quick answer Ted but I searched through all the script files in a clean TGB install and can't find anything that resembles what I'm looking for.

I thought there would be some gui/cs file that contains the string "Use Mouse Events" that is the label for the checkbox in question. Toggling this would call the getter/setter console method for setting the mUseMouseEvents variable in source.

Am I way off here?
#3
05/16/2010 (12:52 pm)
Hehe... look at me sneakin' in here before I leave!

If you look in tgb/tools/levelEditor/scripts/forms/quickEditClasses/t2dSceneObject.ed.cs, you'll see a ::CreateContent function. You can add a checkbox here for blocking input. I'm almost certain it's tied by the persistent name, so you'll have to add it as "BlockInput" to the rollout you want to add it to.
#4
05/16/2010 (12:55 pm)
Haha. It's not vacation if you surf the forums! Thanks William! Talk later!