Game Development Community

Bug in the GuiEditor and Fix

by Jean-louis Amadi · in Torque Game Builder · 06/07/2012 (3:53 pm) · 0 replies

In the inspector

When we select a new profile in the inspector, the target gui is not updated.

The fix proposed:
in the file source/gui/editor/guiInspectorTypes.cc
Search the function void GuiInspectorTypeEnum::setData( StringTableEntry data )
Replace the content with
if( mField == NULL || mTarget == NULL )
      return;

   mTarget->inspectPreApply();//Fix, Synchronization between the inspector and the view in the editor JL.A

   mTarget->setDataField( mField->pFieldname, NULL, data );

   // Force our edit to update
   updateValue( data );

   mTarget->inspectPostApply();//Fix, Synchronization between the inspector and the view in the editor JL.A

The rollout

When we want used the rollout Gui with a custom bitmap, we have to select a predefined profile that contain the path of the custom bitmap. But even if the profile is correct the rollout is not showed with the custom bitmap.

The Fix proposed:
In the file source/gui/containers/guiRolloutCtrl.cc
Search the method bool GuiRolloutCtrl::onWake()
Just After
if (! Parent::onWake())
      return false;

Add the code below
mHasTexture = ( mProfile ? mProfile->constructBitmapArray() : false );
   if( mHasTexture )
      mBitmapBounds = mProfile->mBitmapArrayRects.address();

   // Calculate Heights for this control
   calculateHeights();

Be careful

You have to delete the *.dso file before relaunch with the modifications seen above.

Feel free to confirm or add info or correction on this. ;)