Browse Source

GuiInspector

-Updates to the inspector types and fields.
marauder2k7 4 years ago
parent
commit
4dd47569b3

+ 6 - 6
engine/source/gui/editor/guiEditCtrl.cc

@@ -444,7 +444,7 @@ void GuiEditCtrl::drawNuts(RectI &box, ColorI &outlineColor, ColorI &nutColor)
    if(rx < extent.x && ty < extent.y)
    if(rx < extent.x && ty < extent.y)
       dglDrawLine(rx, ty, extent.x, ty, lightGreenLine);
       dglDrawLine(rx, ty, extent.x, ty, lightGreenLine);
 
 
-   // adjust nuts, so they dont straddle the controlslx -= NUT_SIZE;
+   // adjust nuts, so they dont straddle the controls
    lx -= NUT_SIZE;
    lx -= NUT_SIZE;
    ty -= NUT_SIZE;
    ty -= NUT_SIZE;
    rx += NUT_SIZE;
    rx += NUT_SIZE;
@@ -489,15 +489,15 @@ void GuiEditCtrl::onRender(Point2I offset, const RectI &updateRect)
          RectI box(ctOffset.x, ctOffset.y, cext.x, cext.y);
          RectI box(ctOffset.x, ctOffset.y, cext.x, cext.y);
 
 
             box.inset(-5, -5);
             box.inset(-5, -5);
-         dglDrawRect(box, ColorI(50, 101, 152,160));
+         dglDrawRect(box, ColorI(0, 101, 0,160));
             box.inset(1,1);
             box.inset(1,1);
-         dglDrawRect(box, ColorI(50, 101, 152,170));
+         dglDrawRect(box, ColorI(0, 101, 0,170));
             box.inset(1,1);
             box.inset(1,1);
-         dglDrawRect(box, ColorI(50, 101, 152,180));
+         dglDrawRect(box, ColorI(0, 101, 0,180));
             box.inset(1,1);
             box.inset(1,1);
-         dglDrawRect(box, ColorI(50, 101, 152,190));
+         dglDrawRect(box, ColorI(0, 101, 0,190));
             box.inset(1,1);
             box.inset(1,1);
-            dglDrawRect(box, ColorI(50, 101, 152,200));
+            dglDrawRect(box, ColorI(0, 101, 0,200));
       }
       }
       Vector<GuiControl *>::iterator i;
       Vector<GuiControl *>::iterator i;
       bool multisel = mSelectedControls.size() > 1;
       bool multisel = mSelectedControls.size() > 1;

+ 64 - 116
engine/source/gui/editor/guiInspector.cc

@@ -37,8 +37,10 @@ GuiInspector::GuiInspector()
 {
 {
    mGroups.clear();
    mGroups.clear();
    mTarget = NULL;
    mTarget = NULL;
+   setField("ChildSpacing", "4");
 }
 }
 
 
+
 GuiInspector::~GuiInspector()
 GuiInspector::~GuiInspector()
 {
 {
    clearGroups();
    clearGroups();
@@ -49,6 +51,9 @@ bool GuiInspector::onAdd()
    if( !Parent::onAdd() )
    if( !Parent::onAdd() )
       return false;
       return false;
 
 
+   // we only need to worry about the width.
+   setWidth(getExtent().x);
+
    return true;
    return true;
 }
 }
 
 
@@ -138,7 +143,10 @@ void GuiInspector::inspectObject( SimObject *object )
    {
    {
       general->registerObject();
       general->registerObject();
       mGroups.push_back( general );
       mGroups.push_back( general );
+      general->setPosition(Point2I(10, 0));
+      general->setExtent(Point2I((getExtent().x - 20), 20));
       addObject( general );
       addObject( general );
+      
    }
    }
 
 
    // Grab this objects field list
    // Grab this objects field list
@@ -155,6 +163,8 @@ void GuiInspector::inspectObject( SimObject *object )
          {
          {
             group->registerObject();
             group->registerObject();
             mGroups.push_back( group );
             mGroups.push_back( group );
+            group->setPosition(Point2I(10, 0));
+            group->setExtent(Point2I((getExtent().x - 20), 20));
             addObject( group );
             addObject( group );
          }            
          }            
       }
       }
@@ -166,7 +176,10 @@ void GuiInspector::inspectObject( SimObject *object )
    {
    {
       dynGroup->registerObject();
       dynGroup->registerObject();
       mGroups.push_back( dynGroup );
       mGroups.push_back( dynGroup );
+      dynGroup->setPosition(Point2I(10, 0));
+      dynGroup->setExtent(Point2I((getExtent().x - 20), 20));
       addObject( dynGroup );
       addObject( dynGroup );
+      
    }
    }
 
 
    // If the general group is still empty at this point, kill it.
    // If the general group is still empty at this point, kill it.
@@ -260,8 +273,6 @@ GuiInspectorField::GuiInspectorField( GuiInspectorGroup* parent, SimObjectPtr<Si
    mField      = field;
    mField      = field;
    mCanSave    = false;
    mCanSave    = false;
    mFieldArrayIndex = NULL;
    mFieldArrayIndex = NULL;
-   mBounds.set(0,0,100,18);
-
 }
 }
 
 
 GuiInspectorField::GuiInspectorField()
 GuiInspectorField::GuiInspectorField()
@@ -271,7 +282,6 @@ GuiInspectorField::GuiInspectorField()
    mTarget        = NULL;
    mTarget        = NULL;
    mField         = NULL;
    mField         = NULL;
    mFieldArrayIndex = NULL;
    mFieldArrayIndex = NULL;
-   mBounds.set(0,0,100,18);
    mCanSave       = false;
    mCanSave       = false;
 }
 }
 
 
@@ -335,7 +345,7 @@ StringTableEntry GuiInspectorField::getFieldName()
    {
    {
       S32 frameTempSize = dStrlen( mField->pFieldname ) + 32;
       S32 frameTempSize = dStrlen( mField->pFieldname ) + 32;
       FrameTemp<char> valCopy( frameTempSize );
       FrameTemp<char> valCopy( frameTempSize );
-      dSprintf( (char *)valCopy, frameTempSize, "%s%s", mField->pFieldname, mFieldArrayIndex );
+      dSprintf( (char *)valCopy, frameTempSize, "%s%s:", mField->pFieldname, mFieldArrayIndex );
 
 
       // Return formatted element
       // Return formatted element
       return StringTable->insert( valCopy );
       return StringTable->insert( valCopy );
@@ -356,7 +366,7 @@ GuiControl* GuiInspectorField::constructEditControl()
       return retCtrl;
       return retCtrl;
 
 
    // Let's make it look pretty.
    // Let's make it look pretty.
-   retCtrl->setField( "profile", "GuiInspectorTextEditProfile" );
+   retCtrl->setField( "profile", "GuiTextEditProfile" );
 
 
    // Don't forget to register ourselves
    // Don't forget to register ourselves
    registerEditControl( retCtrl );
    registerEditControl( retCtrl );
@@ -365,7 +375,7 @@ GuiControl* GuiInspectorField::constructEditControl()
    dSprintf( szBuffer, 512, "%d.apply(%d.getText());",getId(), retCtrl->getId() );
    dSprintf( szBuffer, 512, "%d.apply(%d.getText());",getId(), retCtrl->getId() );
    retCtrl->setField("AltCommand", szBuffer );
    retCtrl->setField("AltCommand", szBuffer );
    retCtrl->setField("Validate", szBuffer );
    retCtrl->setField("Validate", szBuffer );
-
+   retCtrl->setExtent(Point2I((getExtent().x / 2) - 40, 30));
 
 
    return retCtrl;
    return retCtrl;
 }
 }
@@ -384,36 +394,6 @@ void GuiInspectorField::registerEditControl( GuiControl *ctrl )
 
 
 void GuiInspectorField::onRender(Point2I offset, const RectI &updateRect)
 void GuiInspectorField::onRender(Point2I offset, const RectI &updateRect)
 {
 {
-   if(mCaption && mCaption[0])
-   {
-      // Calculate Caption Rect
-      RectI captionRect( offset , Point2I((S32) mFloor( mBounds.extent.x * (F32)( (F32)GuiInspectorField::smCaptionWidth / 100.0f ) ), (S32)mBounds.extent.y ) );
-      // Calculate Y Offset to center vertically the caption
-      U32 captionYOffset = (U32)mFloor( (F32)( captionRect.extent.y - mProfile->mFont->getHeight() ) / 2 );
-
-      RectI clipRect = dglGetClipRect();
-
-      if( clipRect.intersect( captionRect ) )
-      {
-         // Backup Bitmap Modulation
-         ColorI currColor;
-         dglGetBitmapModulation( &currColor );
-
-         dglSetBitmapModulation( mProfile->mFontColor );
-
-         dglSetClipRect( RectI( clipRect.point, Point2I( captionRect.extent.x, clipRect.extent.y ) ));
-         // Draw Caption ( Vertically Centered )
-         U32 textY = captionRect.point.y + captionYOffset;
-         U32 textX = captionRect.point.x + captionRect.extent.x - mProfile->mFont->getStrWidth(mCaption) - 6;
-         Point2I textPT(textX, textY);
-
-         dglDrawText( mProfile->mFont, textPT, mCaption, &mProfile->mFontColor );
-
-         dglSetBitmapModulation( currColor );
-
-         dglSetClipRect( clipRect );
-      }
-   }
 
 
    Parent::onRender( offset, updateRect );
    Parent::onRender( offset, updateRect );
 }
 }
@@ -431,20 +411,21 @@ bool GuiInspectorField::onAdd()
    if( mEdit == NULL )
    if( mEdit == NULL )
       return false;
       return false;
 
 
+   GuiControl* capCtrl = new GuiControl();
+   capCtrl->setField("position", "0 0");
+   capCtrl->setExtent(Point2I((getExtent().x / 2) - 10, 30));
+   capCtrl->setField("profile", "GuiTextProfile");
+   capCtrl->setField("text", mCaption);
+
+   mEdit->setPosition(Point2I((getExtent().x / 2), 0));
+   addObject(capCtrl);
+   setExtent(Point2I(getExtent().x, (mEdit->getExtent().y) + 10));
    // Add our edit as a child
    // Add our edit as a child
    addObject( mEdit );
    addObject( mEdit );
 
 
-   // Calculate Caption Rect
-   RectI captionRect( mBounds.point , Point2I( (S32)mFloor( mBounds.extent.x * (F32)( (F32)GuiInspectorField::smCaptionWidth / 100.0 ) ), (S32)mBounds.extent.y ) );
-
-   // Calculate Edit Field Rect
-   RectI editFieldRect( Point2I( captionRect.extent.x + 1, 1 ) , Point2I( mBounds.extent.x - ( captionRect.extent.x + 5 ) , mBounds.extent.y - 1) );
-
-   // Resize to fit properly in allotted space
-   mEdit->resize( editFieldRect.point, editFieldRect.extent );
+   //
+   setField( "profile", "GuiDefaultProfile" );
 
 
-   // Prefer GuiInspectorFieldProfile
-   setField( "profile", "GuiInspectorFieldProfile" );
 
 
    // Force our editField to set it's value
    // Force our editField to set it's value
    updateValue( getData() );
    updateValue( getData() );
@@ -465,20 +446,11 @@ ConsoleMethod( GuiInspectorField, apply, void, 3,3, "(newValue) Applies the give
    object->setData( argv[2] );
    object->setData( argv[2] );
 }
 }
 
 
-void GuiInspectorField::resize( const Point2I &newPosition, const Point2I &newExtent )
+void GuiInspectorField::resize(const Point2I &newPosition, const Point2I &newExtent)
 {
 {
-   Parent::resize( newPosition, newExtent );
-
-   if( mEdit != NULL )
-   {
-      // Calculate Caption Rect
-      RectI captionRect( mBounds.point , Point2I( (S32)mFloor( mBounds.extent.x * (F32)( (F32)GuiInspectorField::smCaptionWidth / 100.0f ) ), (S32)mBounds.extent.y ) );
-
-      // Calculate Edit Field Rect
-      RectI editFieldRect( Point2I( captionRect.extent.x + 1, 1 ) , Point2I( mBounds.extent.x - ( captionRect.extent.x + 5 ) , mBounds.extent.y - 1) );
+   
+   Parent::resize(newPosition, newExtent);
 
 
-      mEdit->resize( editFieldRect.point, editFieldRect.extent );
-   }
 }
 }
 
 
 //////////////////////////////////////////////////////////////////////////
 //////////////////////////////////////////////////////////////////////////
@@ -496,7 +468,6 @@ IMPLEMENT_CONOBJECT(GuiInspectorGroup);
 
 
 GuiInspectorGroup::GuiInspectorGroup()
 GuiInspectorGroup::GuiInspectorGroup()
 {
 {
-   mBounds.set(0,0,200,20);
 
 
    mChildren.clear();
    mChildren.clear();
 
 
@@ -510,11 +481,10 @@ GuiInspectorGroup::GuiInspectorGroup()
 
 
 GuiInspectorGroup::GuiInspectorGroup( SimObjectPtr<SimObject> target, StringTableEntry groupName, SimObjectPtr<GuiInspector> parent )
 GuiInspectorGroup::GuiInspectorGroup( SimObjectPtr<SimObject> target, StringTableEntry groupName, SimObjectPtr<GuiInspector> parent )
 {
 {
-   mBounds.set(0,0,200,20);
 
 
    mChildren.clear();
    mChildren.clear();
 
 
-   mCaption             = StringTable->insert(groupName);
+   mText                = StringTable->insert(groupName);
    mTarget              = target;
    mTarget              = target;
    mParent              = parent;
    mParent              = parent;
    mCanSave             = false;
    mCanSave             = false;
@@ -535,7 +505,7 @@ GuiInspectorGroup::~GuiInspectorGroup()
 //////////////////////////////////////////////////////////////////////////
 //////////////////////////////////////////////////////////////////////////
 bool GuiInspectorGroup::onAdd()
 bool GuiInspectorGroup::onAdd()
 {
 {
-   setField( "profile", "GuiInspectorGroupProfile" );
+   setField( "profile", "GuiPanelProfile" );
 
 
    if( !Parent::onAdd() )
    if( !Parent::onAdd() )
       return false;
       return false;
@@ -552,16 +522,19 @@ bool GuiInspectorGroup::onAdd()
 bool GuiInspectorGroup::createContent()
 bool GuiInspectorGroup::createContent()
 {
 {
    // Create our field stack control
    // Create our field stack control
-   mStack = new GuiGridCtrl();
+   mStack = new GuiChainCtrl();
    if( !mStack )
    if( !mStack )
       return false;
       return false;
 
 
+   setWidth(mParent->getExtent().x);
+
    // Prefer GuiTransperantProfile for the stack.
    // Prefer GuiTransperantProfile for the stack.
-   mStack->setField( "profile", "GuiTransparentProfile" );
+   mStack->setField( "profile", "GuiDefaultProfile" );
    mStack->registerObject();
    mStack->registerObject();
-
+   mStack->setExtent(Point2I(getExtent().x - 20, 10));
+   mStack->setField("position", "0 30");
    addObject( mStack );
    addObject( mStack );
-   mStack->setField( "padding", "0" );
+   
 
 
    return true;
    return true;
 }
 }
@@ -571,11 +544,8 @@ bool GuiInspectorGroup::createContent()
 //////////////////////////////////////////////////////////////////////////
 //////////////////////////////////////////////////////////////////////////
 void GuiInspectorGroup::animateToContents()
 void GuiInspectorGroup::animateToContents()
 {
 {
-   calculateHeights();
-   if(size() > 0)
-      animateTo( mExpanded.extent.y );
-   else
-      animateTo( mHeader.extent.y );
+   setExpanded(0);
+   setExpanded(1);
 }
 }
 
 
 GuiInspectorField* GuiInspectorGroup::constructField( S32 fieldType )
 GuiInspectorField* GuiInspectorGroup::constructField( S32 fieldType )
@@ -643,7 +613,7 @@ bool GuiInspectorGroup::inspectGroup()
    bool bNoGroup = false;
    bool bNoGroup = false;
 
 
    // Un-grouped fields are all sorted into the 'general' group
    // Un-grouped fields are all sorted into the 'general' group
-   if ( dStricmp( mCaption, "General" ) == 0 )
+   if ( dStricmp( mText, "General" ) == 0 )
       bNoGroup = true;
       bNoGroup = true;
 
 
    AbstractClassRep::FieldList &fieldList = mTarget->getModifiableFieldList();
    AbstractClassRep::FieldList &fieldList = mTarget->getModifiableFieldList();
@@ -659,7 +629,7 @@ bool GuiInspectorGroup::inspectGroup()
          // If we're dealing with general fields, always set grabItems to true (to skip them)
          // If we're dealing with general fields, always set grabItems to true (to skip them)
          if( bNoGroup == true )
          if( bNoGroup == true )
             bGrabItems = true;
             bGrabItems = true;
-         else if( itr->pGroupname != NULL && dStricmp( itr->pGroupname, mCaption ) == 0 )
+         else if( itr->pGroupname != NULL && dStricmp( itr->pGroupname, mText ) == 0 )
             bGrabItems = true;
             bGrabItems = true;
          continue;
          continue;
       }
       }
@@ -668,7 +638,7 @@ bool GuiInspectorGroup::inspectGroup()
          // If we're dealing with general fields, always set grabItems to false (to grab them)
          // If we're dealing with general fields, always set grabItems to false (to grab them)
          if( bNoGroup == true )
          if( bNoGroup == true )
             bGrabItems = false;
             bGrabItems = false;
-         else if( itr->pGroupname != NULL && dStricmp( itr->pGroupname, mCaption ) == 0 )
+         else if( itr->pGroupname != NULL && dStricmp( itr->pGroupname, mText ) == 0 )
             bGrabItems = false;
             bGrabItems = false;
          continue;
          continue;
       }
       }
@@ -712,15 +682,16 @@ bool GuiInspectorGroup::inspectGroup()
                if( field == NULL )
                if( field == NULL )
                {
                {
                   field = new GuiInspectorField( this, mTarget, itr );
                   field = new GuiInspectorField( this, mTarget, itr );
+                  field->setExtent(Point2I(this->getExtent().x,30));
                   field->setInspectorField( itr, intToStr );
                   field->setInspectorField( itr, intToStr );
                }
                }
                else
                else
                {
                {
+                  field->setExtent(Point2I(this->getExtent().x, 30));
                   field->setTarget( mTarget );
                   field->setTarget( mTarget );
                   field->setParent( this );
                   field->setParent( this );
                   field->setInspectorField( itr, intToStr );
                   field->setInspectorField( itr, intToStr );
                }
                }
-
                field->registerObject();
                field->registerObject();
                mChildren.push_back( field );
                mChildren.push_back( field );
                mStack->addObject( field );
                mStack->addObject( field );
@@ -747,7 +718,7 @@ bool GuiInspectorGroup::inspectGroup()
                field->setParent( this );
                field->setParent( this );
                field->setInspectorField( itr );
                field->setInspectorField( itr );
             }
             }
-
+            field->setExtent(Point2I(this->getExtent().x, 30));
             field->registerObject();
             field->registerObject();
             mChildren.push_back( field );
             mChildren.push_back( field );
             mStack->addObject( field );
             mStack->addObject( field );
@@ -755,14 +726,12 @@ bool GuiInspectorGroup::inspectGroup()
          }       
          }       
       }
       }
    }
    }
-   //mStack->freeze(false);
-   //mStack->updatePanes();
 
 
    // If we've no new items, there's no need to resize anything!
    // If we've no new items, there's no need to resize anything!
    if( bNewItems == false && !mChildren.empty() )
    if( bNewItems == false && !mChildren.empty() )
       return true;
       return true;
 
 
-   sizeToContents();
+   //sizeToContents();
 
 
    setUpdate();
    setUpdate();
 
 
@@ -783,29 +752,28 @@ bool GuiInspectorDynamicGroup::createContent()
    // add a button that lets us add new dynamic fields.
    // add a button that lets us add new dynamic fields.
    GuiButtonCtrl* addFieldBtn = new GuiButtonCtrl();
    GuiButtonCtrl* addFieldBtn = new GuiButtonCtrl();
    {
    {
-      //addFieldBtn->setBitmap("tools/gui/images/iconAdd");
-
       SimObject* profilePtr = Sim::findObject("EditorButton");
       SimObject* profilePtr = Sim::findObject("EditorButton");
       if( profilePtr != NULL )
       if( profilePtr != NULL )
          addFieldBtn->setControlProfile( dynamic_cast<GuiControlProfile*>(profilePtr) );
          addFieldBtn->setControlProfile( dynamic_cast<GuiControlProfile*>(profilePtr) );
 
 
       char commandBuf[64];
       char commandBuf[64];
       dSprintf(commandBuf, 64, "%d.addDynamicField();", this->getId());
       dSprintf(commandBuf, 64, "%d.addDynamicField();", this->getId());
+      addFieldBtn->setField("profile", "GuiButtonDynProfile");
       addFieldBtn->setField("command", commandBuf);
       addFieldBtn->setField("command", commandBuf);
-      addFieldBtn->setSizing(horizResizeLeft,vertResizeCenter);
-      //addFieldBtn->setField("buttonMargin", "2 2");
-      addFieldBtn->resize(Point2I(mBounds.extent.x - 20,2), Point2I(16, 16));
+      addFieldBtn->setField("text", "+");
+      addFieldBtn->setExtent(Point2I(30, 30));
       addFieldBtn->registerObject("zAddButton");
       addFieldBtn->registerObject("zAddButton");
    }
    }
 
 
    // encapsulate the button in a dummy control.
    // encapsulate the button in a dummy control.
    GuiControl* shell = new GuiControl();
    GuiControl* shell = new GuiControl();
-   shell->setField( "profile", "GuiTransparentProfile" );
+   shell->setField( "profile", "GuiTextProfile" );
    shell->registerObject();
    shell->registerObject();
+   shell->setField("text", "Add Field");
 
 
-   shell->resize(Point2I(0,0), Point2I(mBounds.extent.x, 28));
+   shell->setExtent(Point2I(getExtent().x - 30,30 + 10));
+   addFieldBtn->setPosition(Point2I((shell->getExtent().x) - 30, 0));
    shell->addObject(addFieldBtn);
    shell->addObject(addFieldBtn);
-
    // save off the shell control, so we can push it to the bottom of the stack in inspectGroup()
    // save off the shell control, so we can push it to the bottom of the stack in inspectGroup()
    mAddCtrl = shell;
    mAddCtrl = shell;
    mStack->addObject(shell);
    mStack->addObject(shell);
@@ -851,6 +819,7 @@ bool GuiInspectorDynamicGroup::inspectGroup()
       GuiInspectorField *field = new GuiInspectorDynamicField( this, mTarget, entry );
       GuiInspectorField *field = new GuiInspectorDynamicField( this, mTarget, entry );
       if( field != NULL )
       if( field != NULL )
       {
       {
+         field->setExtent(Point2I(this->getExtent().x, 30));
          field->registerObject();
          field->registerObject();
          mChildren.push_back( field );
          mChildren.push_back( field );
          mStack->addObject( field );
          mStack->addObject( field );
@@ -944,7 +913,6 @@ GuiInspectorDynamicField::GuiInspectorDynamicField( GuiInspectorGroup* parent, S
    mParent     = parent;
    mParent     = parent;
    mTarget     = target;
    mTarget     = target;
    mDynField   = field;
    mDynField   = field;
-   mBounds.set(0,0,100,20);
    mRenameCtrl = NULL;
    mRenameCtrl = NULL;
 }
 }
 
 
@@ -1024,6 +992,7 @@ void GuiInspectorDynamicField::renameField( StringTableEntry newFieldName )
    // Lastly we need to reassign our Command and AltCommand fields for our value edit control
    // Lastly we need to reassign our Command and AltCommand fields for our value edit control
    char szBuffer[512];
    char szBuffer[512];
    dSprintf( szBuffer, 512, "%d.%s = %d.getText();",mTarget->getId(), getFieldName(), mEdit->getId() );
    dSprintf( szBuffer, 512, "%d.%s = %d.getText();",mTarget->getId(), getFieldName(), mEdit->getId() );
+   mEdit->setExtent(Point2I((getExtent().x / 2) - 20, 30));
    mEdit->setField("AltCommand", szBuffer );
    mEdit->setField("AltCommand", szBuffer );
    mEdit->setField("Validate", szBuffer );
    mEdit->setField("Validate", szBuffer );
 }
 }
@@ -1054,7 +1023,7 @@ GuiControl* GuiInspectorDynamicField::constructRenameControl()
       return retCtrl;
       return retCtrl;
 
 
    // Let's make it look pretty.
    // Let's make it look pretty.
-   retCtrl->setField( "profile", "GuiInspectorTextEditRightProfile" );
+   retCtrl->setField( "profile", "GuiTextEditProfile" );
 
 
    // Don't forget to register ourselves
    // Don't forget to register ourselves
    char szName[512];
    char szName[512];
@@ -1070,19 +1039,11 @@ GuiControl* GuiInspectorDynamicField::constructRenameControl()
    char szBuffer[512];
    char szBuffer[512];
    dSprintf( szBuffer, 512, "if( %d.getText() !$= \"\" ) %d.renameField(%d.getText());",retCtrl->getId(), getId(), retCtrl->getId() );
    dSprintf( szBuffer, 512, "if( %d.getText() !$= \"\" ) %d.renameField(%d.getText());",retCtrl->getId(), getId(), retCtrl->getId() );
    dynamic_cast<GuiTextEditCtrl*>(retCtrl)->setText( getFieldName() );
    dynamic_cast<GuiTextEditCtrl*>(retCtrl)->setText( getFieldName() );
+   retCtrl->setExtent(Point2I((getExtent().x / 2) - 20, 30));
    retCtrl->setField("AltCommand", szBuffer );
    retCtrl->setField("AltCommand", szBuffer );
-   retCtrl->setField("Validate", szBuffer );
-
-   // Calculate Caption Rect (Adjust for 16 pixel wide delete button)
-   RectI captionRect( Point2I(mBounds.point.x,0) , Point2I( (S32)mFloor( mBounds.extent.x * (F32)( (F32)GuiInspectorField::smCaptionWidth / 100.0f ) ), (S32)mBounds.extent.y ) );
-   RectI valueRect(mEdit->mBounds.point, mEdit->mBounds.extent - Point2I(20, 0));
-   RectI deleteRect( Point2I( mBounds.point.x + mBounds.extent.x - 20,2), Point2I( 16, mBounds.extent.y - 4));
+   retCtrl->setField("Validate", szBuffer);
    addObject( retCtrl );
    addObject( retCtrl );
 
 
-   // Resize the name control to fit in our caption rect (tricksy!)
-   retCtrl->resize( captionRect.point, captionRect.extent );
-   // resize the value control to leave space for the delete button
-   mEdit->resize(valueRect.point, valueRect.extent);
 
 
    // Finally, add a delete button for this field
    // Finally, add a delete button for this field
    GuiButtonCtrl * delButt = new GuiButtonCtrl();
    GuiButtonCtrl * delButt = new GuiButtonCtrl();
@@ -1090,14 +1051,13 @@ GuiControl* GuiInspectorDynamicField::constructRenameControl()
    {
    {
       dSprintf(szBuffer, 512, "%d.%s = \"\";%d.inspectGroup();", mTarget->getId(), getFieldName(), mParent->getId());
       dSprintf(szBuffer, 512, "%d.%s = \"\";%d.inspectGroup();", mTarget->getId(), getFieldName(), mParent->getId());
 
 
-      delButt->setField("Bitmap", "^modules/gui/images/iconDelete");
+      delButt->setField("profile", "GuiButtonDynProfile");
       delButt->setField("Text", "X");
       delButt->setField("Text", "X");
+      delButt->setPosition(Point2I((getExtent().x - 40), 0));
+      delButt->setField("extent", "30 30");
       delButt->setField("Command", szBuffer);
       delButt->setField("Command", szBuffer);
-      delButt->setSizing(horizResizeLeft,vertResizeCenter);
       delButt->registerObject();
       delButt->registerObject();
 
 
-      delButt->resize( deleteRect.point,deleteRect.extent);
-
       addObject(delButt);
       addObject(delButt);
    }
    }
 
 
@@ -1107,18 +1067,6 @@ GuiControl* GuiInspectorDynamicField::constructRenameControl()
 void GuiInspectorDynamicField::resize( const Point2I &newPosition, const Point2I &newExtent )
 void GuiInspectorDynamicField::resize( const Point2I &newPosition, const Point2I &newExtent )
 {
 {
    Parent::resize( newPosition, newExtent );
    Parent::resize( newPosition, newExtent );
-
-   // If we don't have a field rename control, bail!
-   if( mRenameCtrl == NULL )
-      return;
-
-   // Calculate Caption Rect
-   RectI captionRect( Point2I(mBounds.point.x,0) , Point2I( (S32)mFloor( mBounds.extent.x * (F32)( (F32)GuiInspectorField::smCaptionWidth / 100.0f ) ), (S32)mBounds.extent.y ) );
-   RectI valueRect(mEdit->mBounds.point, mEdit->mBounds.extent - Point2I(20, 0));
-
-   // Resize the edit control to fit in our caption rect (tricksy!)
-   mRenameCtrl->resize( captionRect.point, captionRect.extent );
-   mEdit->resize( valueRect.point, valueRect.extent);
 }
 }
 
 
 //////////////////////////////////////////////////////////////////////////
 //////////////////////////////////////////////////////////////////////////
@@ -1171,7 +1119,7 @@ GuiControl* GuiInspectorDatablockField::constructEditControl()
    GuiPopUpMenuCtrl *menu = dynamic_cast<GuiPopUpMenuCtrl*>(retCtrl);
    GuiPopUpMenuCtrl *menu = dynamic_cast<GuiPopUpMenuCtrl*>(retCtrl);
 
 
    // Let's make it look pretty.
    // Let's make it look pretty.
-   retCtrl->setField( "profile", "InspectorTypeEnumProfile" );
+   retCtrl->setField( "profile", "GuiPopUpMenuProfile2" );
 
 
    menu->setField("text", getData());
    menu->setField("text", getData());
 
 

+ 10 - 10
engine/source/gui/editor/guiInspector.h

@@ -54,11 +54,11 @@
 #include "gui/guiPopUpCtrl.h"
 #include "gui/guiPopUpCtrl.h"
 #endif
 #endif
 
 
-#ifndef _GUIGRIDCTRL_H_
-#include "gui/containers/guiGridCtrl.h"
+#ifndef _GUICHAINCTRL_H_
+#include "gui/containers/guiChainCtrl.h"
 #endif
 #endif
 
 
-#include "gui/containers/guiRolloutCtrl.h"
+#include "gui/containers/guiPanelCtrl.h"
 
 
 
 
 // Forward Declare GuiInspectorGroup
 // Forward Declare GuiInspectorGroup
@@ -68,10 +68,10 @@ class GuiInspectorField;
 // Forward Declare GuiInspectorDatablockField
 // Forward Declare GuiInspectorDatablockField
 class GuiInspectorDatablockField;
 class GuiInspectorDatablockField;
 
 
-class GuiInspector : public GuiGridCtrl
+class GuiInspector : public GuiChainCtrl
 {
 {
 private:
 private:
-   typedef GuiGridCtrl Parent;
+   typedef GuiChainCtrl Parent;
 public:
 public:
    // Members
    // Members
    Vector<GuiInspectorGroup*>    mGroups;
    Vector<GuiInspectorGroup*>    mGroups;
@@ -131,16 +131,16 @@ public:
    virtual void onRender(Point2I offset, const RectI &updateRect);
    virtual void onRender(Point2I offset, const RectI &updateRect);
 };
 };
 
 
-class GuiInspectorGroup : public GuiRolloutCtrl
+class GuiInspectorGroup : public GuiPanelCtrl
 {
 {
 private:
 private:
-   typedef GuiRolloutCtrl Parent;
+   typedef GuiPanelCtrl Parent;
 public:
 public:
    // Members
    // Members
    SimObjectPtr<SimObject>             mTarget;
    SimObjectPtr<SimObject>             mTarget;
    SimObjectPtr<GuiInspector>          mParent;
    SimObjectPtr<GuiInspector>          mParent;
    Vector<GuiInspectorField*>          mChildren;
    Vector<GuiInspectorField*>          mChildren;
-   GuiGridCtrl*						   mStack;
+   GuiChainCtrl*						      mStack;
 
 
    // Constructor/Destructor/Conobject Declaration
    // Constructor/Destructor/Conobject Declaration
    GuiInspectorGroup();
    GuiInspectorGroup();
@@ -152,7 +152,7 @@ public:
    virtual GuiInspectorField* findField( StringTableEntry fieldName );
    virtual GuiInspectorField* findField( StringTableEntry fieldName );
 
 
    // Publicly Accessible Information about this group
    // Publicly Accessible Information about this group
-   StringTableEntry getGroupName() { return mCaption; };
+   StringTableEntry getGroupName() { return mText; };
    SimObjectPtr<SimObject> getGroupTarget() { return mTarget; };
    SimObjectPtr<SimObject> getGroupTarget() { return mTarget; };
    SimObjectPtr<GuiInspector> getContentCtrl() { return mParent; };
    SimObjectPtr<GuiInspector> getContentCtrl() { return mParent; };
 
 
@@ -205,7 +205,7 @@ private:
 public:
 public:
    DECLARE_CONOBJECT(GuiInspectorDynamicGroup);
    DECLARE_CONOBJECT(GuiInspectorDynamicGroup);
    GuiInspectorDynamicGroup() { /*mNeedScroll=false;*/ };
    GuiInspectorDynamicGroup() { /*mNeedScroll=false;*/ };
-   GuiInspectorDynamicGroup( SimObjectPtr<SimObject> target, StringTableEntry groupName, SimObjectPtr<GuiInspector> parent ) : GuiInspectorGroup( target, groupName, parent) { /*mNeedScroll=false;*/};
+   GuiInspectorDynamicGroup(SimObjectPtr<SimObject> target, StringTableEntry groupName, SimObjectPtr<GuiInspector> parent) : GuiInspectorGroup(target, groupName, parent) {};
    
    
    //////////////////////////////////////////////////////////////////////////
    //////////////////////////////////////////////////////////////////////////
    // inspectGroup is overridden in GuiInspectorDynamicGroup to inspect an 
    // inspectGroup is overridden in GuiInspectorDynamicGroup to inspect an 

+ 700 - 70
engine/source/gui/editor/guiInspectorTypes.cc

@@ -37,8 +37,8 @@ GuiControl* GuiInspectorTypeEnum::constructEditControl()
    GuiPopUpMenuCtrl *menu = dynamic_cast<GuiPopUpMenuCtrl*>(retCtrl);
    GuiPopUpMenuCtrl *menu = dynamic_cast<GuiPopUpMenuCtrl*>(retCtrl);
 
 
    // Let's make it look pretty.
    // Let's make it look pretty.
-   retCtrl->setField( "profile", "InspectorTypeEnumProfile" );
-
+   retCtrl->setField( "profile", "GuiPopUpMenuProfile2" );
+   retCtrl->setExtent(Point2I((mParent->getWidth() / 2) - 20, 18));
    menu->setField("text", getData());
    menu->setField("text", getData());
 
 
    registerEditControl( retCtrl );
    registerEditControl( retCtrl );
@@ -104,8 +104,9 @@ GuiControl* GuiInspectorTypeCheckBox::constructEditControl()
    GuiCheckBoxCtrl *check = dynamic_cast<GuiCheckBoxCtrl*>(retCtrl);
    GuiCheckBoxCtrl *check = dynamic_cast<GuiCheckBoxCtrl*>(retCtrl);
 
 
    // Let's make it look pretty.
    // Let's make it look pretty.
-   retCtrl->setField( "profile", "InspectorTypeCheckboxProfile" );
+   retCtrl->setField( "profile", "GuiCheckBoxProfile" );
    retCtrl->setField( "text", "" );
    retCtrl->setField( "text", "" );
+   retCtrl->setExtent(Point2I(20, 30));
 
 
    //check->mIndent = 4;
    //check->mIndent = 4;
 
 
@@ -159,8 +160,8 @@ GuiControl* GuiInspectorTypeGuiProfile::constructEditControl()
    GuiPopUpMenuCtrl *menu = dynamic_cast<GuiPopUpMenuCtrl*>(retCtrl);
    GuiPopUpMenuCtrl *menu = dynamic_cast<GuiPopUpMenuCtrl*>(retCtrl);
 
 
    // Let's make it look pretty.
    // Let's make it look pretty.
-   retCtrl->setField( "profile", "InspectorTypeEnumProfile" );
-
+   retCtrl->setField( "profile", "GuiPopUpMenuProfile2" );
+   retCtrl->setExtent(Point2I((mParent->getWidth() / 2) - 20, 18));
    menu->setField("text", getData());
    menu->setField("text", getData());
 
 
    registerEditControl( retCtrl );
    registerEditControl( retCtrl );
@@ -182,14 +183,68 @@ GuiControl* GuiInspectorTypeGuiProfile::constructEditControl()
       }
       }
    }
    }
 
 
+   menu->sort();
    // sort the entries
    // sort the entries
-   dQsort(entries.address(), entries.size(), sizeof(StringTableEntry), stringCompare);
+   //dQsort(entries.address(), entries.size(), sizeof(StringTableEntry), stringCompare);
    for(U32 j = 0; j < (U32)entries.size(); j++)
    for(U32 j = 0; j < (U32)entries.size(); j++)
       menu->addEntry(entries[j], 0);
       menu->addEntry(entries[j], 0);
 
 
    return retCtrl;
    return retCtrl;
 }
 }
 
 
+//////////////////////////////////////////////////////////////////////////
+// GuiInspectorTypeGuiBorderProfile 
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_CONOBJECT(GuiInspectorTypeGuiBorderProfile);
+
+void GuiInspectorTypeGuiBorderProfile::consoleInit()
+{
+   Parent::consoleInit();
+
+   ConsoleBaseType::getType(TypeGuiBorderProfile)->setInspectorFieldType("GuiInspectorTypeGuiBorderProfile");
+}
+
+GuiControl* GuiInspectorTypeGuiBorderProfile::constructEditControl()
+{
+   GuiControl* retCtrl = new GuiPopUpMenuCtrl();
+
+   // If we couldn't construct the control, bail!
+   if (retCtrl == NULL)
+      return retCtrl;
+
+   GuiPopUpMenuCtrl *menu = dynamic_cast<GuiPopUpMenuCtrl*>(retCtrl);
+
+   // Let's make it look pretty.
+   retCtrl->setField("profile", "GuiPopUpMenuProfile2");
+   retCtrl->setExtent(Point2I((mParent->getWidth() / 2) - 20, 18));
+   menu->setField("text", getData());
+
+   registerEditControl(retCtrl);
+
+   // Configure it to update our value when the popup is closed
+   char szBuffer[512];
+   dSprintf(szBuffer, 512, "%d.apply(%d.getText());", getId(), menu->getId());
+   menu->setField("Command", szBuffer);
+
+   Vector<StringTableEntry> entries;
+
+   SimGroup * grp = Sim::getGuiDataGroup();
+   for (SimGroup::iterator i = grp->begin(); i != grp->end(); i++)
+   {
+      GuiBorderProfile * profile = dynamic_cast<GuiBorderProfile *>(*i);
+      if (profile)
+      {
+         entries.push_back(profile->getName());
+      }
+   }
+
+   menu->sort();
+   for (U32 j = 0; j < (U32)entries.size(); j++)
+      menu->addEntry(entries[j], 0);
+
+   return retCtrl;
+}
+
 
 
 //////////////////////////////////////////////////////////////////////////
 //////////////////////////////////////////////////////////////////////////
 // GuiInspectorTypeFileName 
 // GuiInspectorTypeFileName 
@@ -205,14 +260,14 @@ void GuiInspectorTypeFileName::consoleInit()
 
 
 GuiControl* GuiInspectorTypeFileName::constructEditControl()
 GuiControl* GuiInspectorTypeFileName::constructEditControl()
 {
 {
-   GuiControl* retCtrl = new GuiTextEditCtrl();
+   GuiControl* retCtrl = new GuiControl();
 
 
    // If we couldn't construct the control, bail!
    // If we couldn't construct the control, bail!
    if( retCtrl == NULL )
    if( retCtrl == NULL )
       return retCtrl;
       return retCtrl;
 
 
    // Let's make it look pretty.
    // Let's make it look pretty.
-   retCtrl->setField( "profile", "GuiInspectorTextEditProfile" );
+   retCtrl->setField( "profile", "GuiTextProfile" );
 
 
    // Don't forget to register ourselves
    // Don't forget to register ourselves
    registerEditControl( retCtrl );
    registerEditControl( retCtrl );
@@ -221,22 +276,23 @@ GuiControl* GuiInspectorTypeFileName::constructEditControl()
    dSprintf( szBuffer, 512, "%d.apply(%d.getText());",getId(),retCtrl->getId() );
    dSprintf( szBuffer, 512, "%d.apply(%d.getText());",getId(),retCtrl->getId() );
    retCtrl->setField("AltCommand", szBuffer );
    retCtrl->setField("AltCommand", szBuffer );
    retCtrl->setField("Validate", szBuffer );
    retCtrl->setField("Validate", szBuffer );
+   retCtrl->setExtent(Point2I((mParent->getExtent().x / 2) - 20, 25));
 
 
    mBrowseButton = new GuiButtonCtrl();
    mBrowseButton = new GuiButtonCtrl();
 
 
    if( mBrowseButton != NULL )
    if( mBrowseButton != NULL )
    {
    {
-      RectI browseRect( Point2I( ( mBounds.point.x + mBounds.extent.x) - 26, mBounds.point.y + 2), Point2I(20, mBounds.extent.y - 4) );
+      
       char szBuffer[512];
       char szBuffer[512];
       dSprintf( szBuffer, 512, "getLoadFilename(\"*.*\", \"%d.apply\", \"%s\");",getId(), getData());
       dSprintf( szBuffer, 512, "getLoadFilename(\"*.*\", \"%d.apply\", \"%s\");",getId(), getData());
       mBrowseButton->setField( "Command", szBuffer );
       mBrowseButton->setField( "Command", szBuffer );
       mBrowseButton->setField( "text", "..." );
       mBrowseButton->setField( "text", "..." );
-      mBrowseButton->setField( "Profile", "GuiInspectorTypeFileNameProfile" );
+      mBrowseButton->setField( "Profile", "GuiButtonDynProfile" );
       mBrowseButton->registerObject();
       mBrowseButton->registerObject();
-      addObject( mBrowseButton );
+      mBrowseButton->setExtent(Point2I(30, 25));
+      mBrowseButton->setPosition(Point2I(((mParent->getExtent().x / 2) - 20) - 30, 0));
+      retCtrl->addObject( mBrowseButton );
 
 
-      // Position
-      mBrowseButton->resize( browseRect.point, browseRect.extent );
    }
    }
 
 
    return retCtrl;
    return retCtrl;
@@ -245,125 +301,699 @@ GuiControl* GuiInspectorTypeFileName::constructEditControl()
 void GuiInspectorTypeFileName::resize( const Point2I &newPosition, const Point2I &newExtent )
 void GuiInspectorTypeFileName::resize( const Point2I &newPosition, const Point2I &newExtent )
 {
 {
    Parent::resize( newPosition, newExtent );
    Parent::resize( newPosition, newExtent );
+}
 
 
-   if( mEdit != NULL )
-   {
-      // Calculate Caption Rect
-      RectI captionRect( mBounds.point , Point2I( (S32)mFloor( mBounds.extent.x * (F32)( (F32)GuiInspectorField::smCaptionWidth / 100.0f ) ) - 2, (S32)mBounds.extent.y ) );
+//////////////////////////////////////////////////////////////////////////
+// GuiInspectorTypeColor (Base for ColorI/ColorF) 
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_CONOBJECT(GuiInspectorTypeColor);
+
+GuiControl* GuiInspectorTypeColor::constructEditControl()
+{
+   GuiControl* retCtrl = new GuiColorPickerCtrl();
+
+   // If we couldn't construct the control, bail!
+   if( retCtrl == NULL )
+      return retCtrl;
+
+   // Don't forget to register ourselves
+   registerEditControl( retCtrl );
+
+   retCtrl->setExtent(Point2I((getExtent().x / 2) - 30, 30));
+   const char* mCol = getData();
+   retCtrl->setField("BaseColor", mCol);
+   char szBuffer[512];
+   dSprintf(szBuffer, 512, "%s(\"%s\", \"%d.apply\");", mColorFunction, getData(), getId());
+   retCtrl->setField("Command", szBuffer);
+
+   return retCtrl;
+}
+
+void GuiInspectorTypeColor::updateValue(StringTableEntry newValue)
+{
+   GuiColorPickerCtrl *ctrl = dynamic_cast<GuiColorPickerCtrl*>(mEdit);
+   if (ctrl != NULL)
+      ctrl->setField("BaseColor", newValue);
+}
 
 
-      // Calculate Edit Field Rect
-      RectI editFieldRect( Point2I( captionRect.extent.x + 1, 0 ) , Point2I( mBounds.extent.x - ( captionRect.extent.x + 25 ) , mBounds.extent.y ) );
+//////////////////////////////////////////////////////////////////////////
+// GuiInspectorTypeColorI
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_CONOBJECT(GuiInspectorTypeColorI);
 
 
-      mEdit->resize( editFieldRect.point, editFieldRect.extent );
+void GuiInspectorTypeColorI::consoleInit()
+{
+   Parent::consoleInit();
 
 
-      if( mBrowseButton != NULL )
+   ConsoleBaseType::getType(TypeColorI)->setInspectorFieldType("GuiInspectorTypeColorI");
+}
+
+GuiInspectorTypeColorI::GuiInspectorTypeColorI()
+{
+   mColorFunction = StringTable->insert("getColorI");
+}
+
+//////////////////////////////////////////////////////////////////////////
+// GuiInspectorTypeColorF
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_CONOBJECT(GuiInspectorTypeColorF);
+
+void GuiInspectorTypeColorF::consoleInit()
+{
+   Parent::consoleInit();
+
+   ConsoleBaseType::getType(TypeColorF)->setInspectorFieldType("GuiInspectorTypeColorF");
+}
+
+GuiInspectorTypeColorF::GuiInspectorTypeColorF()
+{
+   mColorFunction = StringTable->insert("getColorF");
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+// TypeSimObjectPtr GuiInspectorField Class
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_CONOBJECT(GuiInspectorTypeSimObjectPtr);
+
+void GuiInspectorTypeSimObjectPtr::consoleInit()
+{
+   Parent::consoleInit();
+
+   ConsoleBaseType::getType(TypeSimObjectPtr)->setInspectorFieldType("GuiInspectorTypeSimObjectPtr");
+}
+
+GuiControl * GuiInspectorTypeSimObjectPtr::constructEditControl()
+{
+   GuiControl* retCtrl = new GuiControl();
+
+   // If we couldn't construct the control, bail!
+   if (retCtrl == NULL)
+      return retCtrl;
+
+   retCtrl->setField("profile", "GuiTextProfile");
+   retCtrl->setExtent(Point2I((mParent->getWidth() / 2) - 20, 25));
+   retCtrl->setField("text", getData());
+
+   return retCtrl;
+
+}
+
+StringTableEntry GuiInspectorTypeSimObjectPtr::getData()
+{
+   if (mField == NULL || mTarget == NULL)
+      return "";
+
+   return mTarget->getDataField(mField->pFieldname, NULL);
+}
+
+//////////////////////////////////////////////////////////////////////////
+// TypeS32 GuiInspectorField Class
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_CONOBJECT(GuiInspectorTypeS32);
+
+void GuiInspectorTypeS32::consoleInit()
+{
+   Parent::consoleInit();
+
+   ConsoleBaseType::getType(TypeS32)->setInspectorFieldType("GuiInspectorTypeS32");
+}
+
+GuiControl * GuiInspectorTypeS32::constructEditControl()
+{
+   
+   GuiControl* retCtrl;
+   const char* mData = getData();
+   const char* mName = mField->pFieldname; 
+   U32 mCount = 1;
+   if (mName == StringTable->insert("CollisionGroups") || mName == StringTable->insert("CollisionLayers"))
+   {
+      mCount = 32;
+   }
+
+   // this is just here for Collision layers and groups, needs to be swapped over to a different type.
+   if (mCount == 32)
+   {
+      retCtrl = new GuiGridCtrl();
+      registerEditControl(retCtrl);
+      retCtrl->setField("CellSizeX","35");
+      retCtrl->setField("CellSizeY","30");
+      retCtrl->setExtent(Point2I(mParent->getExtent().x / 2, 10));
+
+      for (U32 i = 0; i < mCount; i++)
       {
       {
-         RectI browseRect( Point2I( ( mBounds.point.x + mBounds.extent.x) - 26, 2), Point2I(20, mBounds.extent.y - 4) );
-         mBrowseButton->resize( browseRect.point, browseRect.extent );
+         char szName[32];
+         dSprintf(szName, 32, "%d", i);
+         // create our elemnts.
+         GuiControl* mCont = new GuiControl;
+         registerEditControl(mCont);
+         GuiControl* mLabel = new GuiControl;
+         registerEditControl(mLabel);
+         GuiCheckBoxCtrl* mCheck = new GuiCheckBoxCtrl;
+         registerEditControl(mCheck);
+         // collision group and layer default to on.
+         const char* val = StringUnit::getUnit(mData, i, " ");
+         if (StringTable->insert(szName) == StringTable->insert(val))
+         {
+            mCheck->setStateOn(true);
+         }
+         // say hello to my really big friend.
+         char szBuffer[512];
+         dSprintf(szBuffer, 512, "CollisionArrayUpdate(%d,\"%s\", \"%s\", %d, \"%d.apply\");",
+            mTarget->getId(), mName,szName,mCheck->getId(),getId());
+
+         mCheck->setField("Command", szBuffer);
+         // minimum size required for 2 numbers to show up and a checkbox.
+         mCont->setExtent(Point2I(35, 30));
+         mLabel->setText(szName);
+         mLabel->setExtent(Point2I(15, 30));
+         mCheck->setExtent(Point2I(20, 30));
+         mCont->addObject(mLabel);
+         mLabel->setPosition(Point2I(0, 0));
+         mCont->addObject(mCheck);
+         mCheck->setPosition(Point2I(15, 0));
+
+         retCtrl->addObject(mCont);
       }
       }
+
+      GuiButtonCtrl* mAll = new GuiButtonCtrl;
+      registerEditControl(mAll);
+      GuiButtonCtrl* mNone = new GuiButtonCtrl;
+      registerEditControl(mNone);
+
+      mAll->setText("All");
+      mNone->setText("None");
+
+      char szBufferAll[512];
+      dSprintf(szBufferAll, 512, "%d.apply(\"all\");", getId());
+      mAll->setField("Command", szBufferAll);
+      mAll->setField("profile", "GuiButtonDynProfile");
+      dSprintf(szBufferAll, 512, "%d.apply(\"none\");", getId());
+      mNone->setField("Command", szBufferAll);
+      mNone->setField("profile", "GuiButtonDynProfile");
+
+      retCtrl->addObject(mAll);
+      retCtrl->addObject(mNone);
+
+   }
+   else
+   {
+      // everything else should do fine under an ordinary text edit.
+      retCtrl = new GuiTextEditCtrl();
+
+      // If we couldn't construct the control, bail!
+      if (retCtrl == NULL)
+         return retCtrl;
+
+      // Let's make it look pretty.
+      retCtrl->setField("profile", "GuiNumberEditProfile");
+
+      // Don't forget to register ourselves
+      registerEditControl(retCtrl);
+
+      char szBuffer[512];
+      dSprintf(szBuffer, 512, "%d.apply(%d.getText());", getId(), retCtrl->getId());
+      retCtrl->setField("AltCommand", szBuffer);
+      retCtrl->setField("Validate", szBuffer);
+      retCtrl->setExtent(Point2I((getExtent().x / 2) - 40, 30));
+
    }
    }
+
+   
+
+   return retCtrl;
+}
+
+const char* GuiInspectorTypeS32::getData()
+{
+   if (mField == NULL || mTarget == NULL)
+      return "";
+
+   return mTarget->getDataField(mField->pFieldname, NULL);
 }
 }
 
 
 //////////////////////////////////////////////////////////////////////////
 //////////////////////////////////////////////////////////////////////////
-// GuiInspectorTypeColor (Base for ColorI/ColorF) 
+// TypePoint2I GuiInspectorField Class
 //////////////////////////////////////////////////////////////////////////
 //////////////////////////////////////////////////////////////////////////
-IMPLEMENT_CONOBJECT(GuiInspectorTypeColor);
+IMPLEMENT_CONOBJECT(GuiInspectorTypePoint2I);
 
 
-GuiControl* GuiInspectorTypeColor::constructEditControl()
+void GuiInspectorTypePoint2I::consoleInit()
 {
 {
-   GuiControl* retCtrl = new GuiTextEditCtrl();
+   Parent::consoleInit();
+
+   ConsoleBaseType::getType(TypePoint2I)->setInspectorFieldType("GuiInspectorTypePoint2I");
+}
+
+GuiControl * GuiInspectorTypePoint2I::constructEditControl()
+{
+   // Do everything in a simple way first.
+   // then complicate it.
+   GuiControl* retCtrl = new GuiControl();
 
 
    // If we couldn't construct the control, bail!
    // If we couldn't construct the control, bail!
-   if( retCtrl == NULL )
+   if (retCtrl == NULL)
       return retCtrl;
       return retCtrl;
 
 
-   // Let's make it look pretty.
-   retCtrl->setField( "profile", "GuiInspectorTextEditProfile" );
+   // get our data.
+   const char* mData = mTarget->getDataField(mField->pFieldname, NULL);
+   // Don't forget to register ourselves
+   retCtrl->setCanSaveDynamicFields(true);
+   registerEditControl(retCtrl);
+   // we want 2 controls in this one.
+   retCtrl->setExtent(Point2I(mParent->getExtent().x / 2, 60));
+   // make our x fields.
+   GuiTextEditCtrl* mXctrl = new GuiTextEditCtrl();
+   GuiControl* mXLabel = new GuiControl();
+   // make our y fields.
+   GuiTextEditCtrl* mYctrl = new GuiTextEditCtrl();
+   GuiControl* mYLabel = new GuiControl();
 
 
    // Don't forget to register ourselves
    // Don't forget to register ourselves
-   registerEditControl( retCtrl );
+   registerEditControl(mXctrl);
+   registerEditControl(mYctrl);
 
 
-   char szBuffer[512];
-   dSprintf( szBuffer, 512, "%d.apply(%d.getText());",getId(), retCtrl->getId() );
-   retCtrl->setField("AltCommand", szBuffer );
-   retCtrl->setField("Validate", szBuffer );
+   mXctrl->setField("profile", "GuiNumberEditProfile");
+   mYctrl->setField("profile", "GuiNumberEditProfile");
 
 
-   mBrowseButton = new GuiButtonCtrl();
+   U32 mCount = StringUnit::getUnitCount(mData, " ");
 
 
-   if( mBrowseButton != NULL )
+   for (U32 i = 0; i < mCount; i++)
    {
    {
-      RectI browseRect( Point2I( ( mBounds.point.x + mBounds.extent.x) - 26, mBounds.point.y + 2), Point2I(20, mBounds.extent.y - 4) );
-      char szBuffer[512];
-      dSprintf( szBuffer, 512, "%s(\"%s\", \"%d.apply\");", mColorFunction, getData(), getId());
-      mBrowseButton->setField( "Command", szBuffer );
-      mBrowseButton->setField( "text", "..." );
-      mBrowseButton->setField( "Profile", "GuiInspectorTypeFileNameProfile" );
-      mBrowseButton->registerObject();
-      addObject( mBrowseButton );
+      const char* mVal = StringUnit::getUnit(mData, i, " ");
 
 
-      // Position
-      mBrowseButton->resize( browseRect.point, browseRect.extent );
+      if (i == 0)
+      {
+         mXctrl->setText(mVal);
+      }
+      else
+      {
+         mYctrl->setText(mVal);
+      }
    }
    }
 
 
+   // make and position our controls.
+   mXLabel->setExtent(Point2I(15, 30));
+   mYLabel->setExtent(Point2I(15, 30));
+   mXLabel->setField("text","X:");
+   mYLabel->setField("text", "Y:");
+   mYLabel->setPosition(Point2I(0, 30));
+
+   mXLabel->setField("profile", "GuiTextProfile");
+   mYLabel->setField("profile", "GuiTextProfile");
+   
+   mXctrl->setExtent(Point2I((mParent->getExtent().x / 2) - 25 - 20, 30));
+   mYctrl->setExtent(Point2I((mParent->getExtent().x / 2) - 25 - 20, 30));
+
+   char szCommand[512];
+
+   dSprintf(szCommand, 512, "ApplyPoint2Value(\"%d.apply\",%d,%d);", getId(), mXctrl->getId(), mYctrl->getId());
+
+   mXctrl->setPosition(Point2I(10, 0));
+   mYctrl->setPosition(Point2I(10, 30));
+
+   // they can share the same command.
+   // set altCommand instead.
+   mXctrl->setField("AltCommand", szCommand);
+   mYctrl->setField("AltCommand", szCommand);
+
+   retCtrl->addObject(mXLabel);
+   retCtrl->addObject(mYLabel);
+   retCtrl->addObject(mXctrl);
+   retCtrl->addObject(mYctrl);
+   char szBuffX[512];
+   char szBuffY[512];
+   dSprintf(szBuffX, 512, "%d", mXctrl->getId());
+   dSprintf(szBuffY, 512, "%d", mYctrl->getId());
+   retCtrl->setDataField(StringTable->insert("fieldX"),NULL, StringTable->insert(szBuffX));
+   retCtrl->setDataField(StringTable->insert("fieldY"),NULL, StringTable->insert(szBuffY));
+
    return retCtrl;
    return retCtrl;
 }
 }
 
 
-void GuiInspectorTypeColor::resize( const Point2I &newPosition, const Point2I &newExtent )
+void GuiInspectorTypePoint2I::updateValue(StringTableEntry newValue)
 {
 {
-   Parent::resize( newPosition, newExtent );
+   GuiControl *ctrl = dynamic_cast<GuiControl*>(mEdit);
+   if (ctrl != NULL)
+   {
+      const char* xField = ctrl->getDataField(StringTable->insert("fieldX"), NULL);
+      const char* yField = ctrl->getDataField(StringTable->insert("fieldY"), NULL);
+      Con::evaluatef("UpdatePoint2Value(\"%s\",\"%s\",\"%s\");", newValue, xField, yField);
+
+   }
+
+}
+
+//////////////////////////////////////////////////////////////////////////
+// TypePoint2F GuiInspectorField Class
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_CONOBJECT(GuiInspectorTypePoint2F);
+
+void GuiInspectorTypePoint2F::consoleInit()
+{
+   Parent::consoleInit();
+
+   ConsoleBaseType::getType(TypePoint2F)->setInspectorFieldType("GuiInspectorTypePoint2F");
+}
+
+GuiControl * GuiInspectorTypePoint2F::constructEditControl()
+{
+   GuiControl* retCtrl = new GuiControl();
+
+   // If we couldn't construct the control, bail!
+   if (retCtrl == NULL)
+      return retCtrl;
+
+   // get our data.
+   const char* mData = mTarget->getDataField(mField->pFieldname, NULL);
+   // Don't forget to register ourselves
+   retCtrl->setCanSaveDynamicFields(true);
+   registerEditControl(retCtrl);
+   // we want 2 controls in this one.
+   retCtrl->setExtent(Point2I(mParent->getExtent().x / 2, 60));
+   // make our x fields.
+   GuiTextEditCtrl* mXctrl = new GuiTextEditCtrl();
+   GuiControl* mXLabel = new GuiControl();
+   // make our y fields.
+   GuiTextEditCtrl* mYctrl = new GuiTextEditCtrl();
+   GuiControl* mYLabel = new GuiControl();
+
+   // Don't forget to register ourselves
+   registerEditControl(mXctrl);
+   registerEditControl(mYctrl);
+
+   // the only difference between point2i and 2f
+   // keeping them separate just incase changes to textEdit.
+   mXctrl->setField("profile", "GuiTextEditProfile");
+   mYctrl->setField("profile", "GuiTextEditProfile");
+
+   U32 mCount = StringUnit::getUnitCount(mData, " ");
+
+   for (U32 i = 0; i < mCount; i++)
+   {
+      const char* mVal = StringUnit::getUnit(mData, i, " ");
+
+      if (i == 0)
+      {
+         mXctrl->setText(mVal);
+      }
+      else
+      {
+         mYctrl->setText(mVal);
+      }
+   }
+
+   // make and position our controls.
+   mXLabel->setExtent(Point2I(15, 30));
+   mYLabel->setExtent(Point2I(15, 30));
+   mXLabel->setField("text", "X:");
+   mYLabel->setField("text", "Y:");
+   mYLabel->setPosition(Point2I(0, 30));
+
+   mXLabel->setField("profile", "GuiTextProfile");
+   mYLabel->setField("profile", "GuiTextProfile");
+
+   mXctrl->setExtent(Point2I((mParent->getExtent().x / 2) - 25 - 20, 30));
+   mYctrl->setExtent(Point2I((mParent->getExtent().x / 2) - 25 - 20, 30));
+
+   char szCommand[512];
+
+   dSprintf(szCommand, 512, "ApplyPoint2Value(\"%d.apply\",%d,%d);", getId(), mXctrl->getId(), mYctrl->getId());
+
+   mXctrl->setPosition(Point2I(10, 0));
+   mYctrl->setPosition(Point2I(10, 30));
+
+   // they can share the same command.
+   // set altCommand instead.
+   mXctrl->setField("AltCommand", szCommand);
+   mYctrl->setField("AltCommand", szCommand);
 
 
-   if( mEdit != NULL )
+   retCtrl->addObject(mXLabel);
+   retCtrl->addObject(mYLabel);
+   retCtrl->addObject(mXctrl);
+   retCtrl->addObject(mYctrl);
+   char szBuffX[512];
+   char szBuffY[512];
+   dSprintf(szBuffX, 512, "%d", mXctrl->getId());
+   dSprintf(szBuffY, 512, "%d", mYctrl->getId());
+   retCtrl->setDataField(StringTable->insert("fieldX"), NULL, StringTable->insert(szBuffX));
+   retCtrl->setDataField(StringTable->insert("fieldY"), NULL, StringTable->insert(szBuffY));
+
+   return retCtrl;
+}
+
+void GuiInspectorTypePoint2F::updateValue(StringTableEntry newValue)
+{
+   GuiControl *ctrl = dynamic_cast<GuiControl*>(mEdit);
+   if (ctrl != NULL)
    {
    {
-      // Calculate Caption Rect
-      RectI captionRect( mBounds.point , Point2I( (S32)mFloor( mBounds.extent.x * (F32)( (F32)GuiInspectorField::smCaptionWidth / 100.0f ) ) - 2, (S32)mBounds.extent.y ) );
+      const char* xField = ctrl->getDataField(StringTable->insert("fieldX"), NULL);
+      const char* yField = ctrl->getDataField(StringTable->insert("fieldY"), NULL);
+      Con::evaluatef("UpdatePoint2Value(\"%s\",\"%s\",\"%s\");", newValue, xField, yField);
+
+   }
+
+}
+
+//////////////////////////////////////////////////////////////////////////
+// TypeVector2 GuiInspectorField Class
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_CONOBJECT(GuiInspectorTypeVector2);
 
 
-      // Calculate Edit Field Rect
-      RectI editFieldRect( Point2I( captionRect.extent.x + 1, 0 ) , Point2I( mBounds.extent.x - ( captionRect.extent.x + 25 ) , mBounds.extent.y ) );
+void GuiInspectorTypeVector2::consoleInit()
+{
+   Parent::consoleInit();
 
 
-      mEdit->resize( editFieldRect.point, editFieldRect.extent );
+   ConsoleBaseType::getType(TypeVector2)->setInspectorFieldType("GuiInspectorTypeVector2");
+}
 
 
-      if( mBrowseButton != NULL )
+GuiControl * GuiInspectorTypeVector2::constructEditControl()
+{
+   // yes vector2 is the same as point2f as well. 
+   // all of these could be done similarly to color. but testing need test.
+   GuiControl* retCtrl = new GuiControl();
+
+   // If we couldn't construct the control, bail!
+   if (retCtrl == NULL)
+      return retCtrl;
+
+   // get our data.
+   const char* mData = mTarget->getDataField(mField->pFieldname, NULL);
+   // Don't forget to register ourselves
+   retCtrl->setCanSaveDynamicFields(true);
+   registerEditControl(retCtrl);
+   // we want 2 controls in this one.
+   retCtrl->setExtent(Point2I(mParent->getExtent().x / 2, 60));
+   // make our x fields.
+   GuiTextEditCtrl* mXctrl = new GuiTextEditCtrl();
+   GuiControl* mXLabel = new GuiControl();
+   // make our y fields.
+   GuiTextEditCtrl* mYctrl = new GuiTextEditCtrl();
+   GuiControl* mYLabel = new GuiControl();
+
+   // Don't forget to register ourselves
+   registerEditControl(mXctrl);
+   registerEditControl(mYctrl);
+
+   // the only difference between point2i and 2f
+   // keeping them separate just incase changes to textEdit.
+   mXctrl->setField("profile", "GuiTextEditProfile");
+   mYctrl->setField("profile", "GuiTextEditProfile");
+
+   U32 mCount = StringUnit::getUnitCount(mData, " ");
+
+   for (U32 i = 0; i < mCount; i++)
+   {
+      const char* mVal = StringUnit::getUnit(mData, i, " ");
+
+      if (i == 0)
       {
       {
-         RectI browseRect( Point2I( ( mBounds.point.x + mBounds.extent.x) - 26, 2), Point2I(20, mBounds.extent.y - 4) );
-         mBrowseButton->resize( browseRect.point, browseRect.extent );
+         mXctrl->setText(mVal);
+      }
+      else
+      {
+         mYctrl->setText(mVal);
       }
       }
    }
    }
+
+   // make and position our controls.
+   mXLabel->setExtent(Point2I(15, 30));
+   mYLabel->setExtent(Point2I(15, 30));
+   mXLabel->setField("text", "X:");
+   mYLabel->setField("text", "Y:");
+   mYLabel->setPosition(Point2I(0, 30));
+
+   mXLabel->setField("profile", "GuiTextProfile");
+   mYLabel->setField("profile", "GuiTextProfile");
+
+   mXctrl->setExtent(Point2I((mParent->getExtent().x / 2) - 25 - 20, 30));
+   mYctrl->setExtent(Point2I((mParent->getExtent().x / 2) - 25 - 20, 30));
+
+   char szCommand[512];
+
+   dSprintf(szCommand, 512, "ApplyPoint2Value(\"%d.apply\",%d,%d);", getId(), mXctrl->getId(), mYctrl->getId());
+
+   mXctrl->setPosition(Point2I(10, 0));
+   mYctrl->setPosition(Point2I(10, 30));
+
+   // they can share the same command.
+   // set altCommand instead.
+   mXctrl->setField("AltCommand", szCommand);
+   mYctrl->setField("AltCommand", szCommand);
+
+   retCtrl->addObject(mXLabel);
+   retCtrl->addObject(mYLabel);
+   retCtrl->addObject(mXctrl);
+   retCtrl->addObject(mYctrl);
+   char szBuffX[512];
+   char szBuffY[512];
+   dSprintf(szBuffX, 512, "%d", mXctrl->getId());
+   dSprintf(szBuffY, 512, "%d", mYctrl->getId());
+   retCtrl->setDataField(StringTable->insert("fieldX"), NULL, StringTable->insert(szBuffX));
+   retCtrl->setDataField(StringTable->insert("fieldY"), NULL, StringTable->insert(szBuffY));
+
+   return retCtrl;
 }
 }
 
 
+void GuiInspectorTypeVector2::updateValue(StringTableEntry newValue)
+{
+   GuiControl *ctrl = dynamic_cast<GuiControl*>(mEdit);
+   if (ctrl != NULL)
+   {
+      const char* xField = ctrl->getDataField(StringTable->insert("fieldX"), NULL);
+      const char* yField = ctrl->getDataField(StringTable->insert("fieldY"), NULL);
+      Con::evaluatef("UpdatePoint2Value(\"%s\",\"%s\",\"%s\");", newValue, xField, yField);
+
+   }
+
+}
 
 
 //////////////////////////////////////////////////////////////////////////
 //////////////////////////////////////////////////////////////////////////
-// GuiInspectorTypeColorI
+// TypeAsset GuiInspectorField Class Base for Assets
 //////////////////////////////////////////////////////////////////////////
 //////////////////////////////////////////////////////////////////////////
-IMPLEMENT_CONOBJECT(GuiInspectorTypeColorI);
+IMPLEMENT_CONOBJECT(GuiInspectorTypeAsset);
 
 
-void GuiInspectorTypeColorI::consoleInit()
+GuiControl* GuiInspectorTypeAsset::constructEditControl()
+{
+   // we don't need a custom update for this.
+   // the object is a guicontrol and therefore 
+   // just needs the text value of the asset.
+   GuiControl* retCtrl = new GuiControl();
+
+   // If we couldn't construct the control, bail!
+   if (retCtrl == NULL)
+      return retCtrl;
+
+   // Let's make it look pretty.
+   retCtrl->setField("profile", "GuiTextProfile");
+
+   // Don't forget to register ourselves
+   registerEditControl(retCtrl);
+
+   retCtrl->setExtent(Point2I((getExtent().x / 2), 30));
+   retCtrl->setText(getData());
+
+   mBrowseButton = new GuiButtonCtrl();
+
+   if (mBrowseButton != NULL)
+   {
+
+      char szBuffer[512];
+      dSprintf(szBuffer, 512, "getAsset(\"%d.apply\", \"%s\", \"%s\");", getId(), getData(), mAssetType);
+      mBrowseButton->setField("Command", szBuffer);
+      mBrowseButton->setField("text", "...");
+      mBrowseButton->setField("Profile", "GuiButtonDynProfile");
+      mBrowseButton->registerObject();
+      mBrowseButton->setExtent(Point2I(30, 25));
+      mBrowseButton->setPosition(Point2I(((getExtent().x / 2) - 30) - 30, 0));
+      retCtrl->addObject(mBrowseButton);
+
+   }
+
+   return retCtrl;
+}
+
+//////////////////////////////////////////////////////////////////////////
+// TypeImageAssetPtr GuiInspectorField Class
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_CONOBJECT(GuiInspectorTypeImageAssetPtr);
+
+GuiInspectorTypeImageAssetPtr::GuiInspectorTypeImageAssetPtr()
+{
+   mAssetType = StringTable->insert("ImageAsset");
+}
+
+void GuiInspectorTypeImageAssetPtr::consoleInit()
 {
 {
    Parent::consoleInit();
    Parent::consoleInit();
 
 
-   ConsoleBaseType::getType(TypeColorI)->setInspectorFieldType("GuiInspectorTypeColorI");
+   ConsoleBaseType::getType(TypeImageAssetPtr)->setInspectorFieldType("GuiInspectorTypeImageAssetPtr");
 }
 }
 
 
-GuiInspectorTypeColorI::GuiInspectorTypeColorI()
+//////////////////////////////////////////////////////////////////////////
+// TypeAnimationAssetPtr GuiInspectorField Class
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_CONOBJECT(GuiInspectorTypeAnimationAssetPtr);
+
+GuiInspectorTypeAnimationAssetPtr::GuiInspectorTypeAnimationAssetPtr()
 {
 {
-   mColorFunction = StringTable->insert("getColorI");
+   mAssetType = StringTable->insert("AnimationAsset");
+}
+
+void GuiInspectorTypeAnimationAssetPtr::consoleInit()
+{
+   Parent::consoleInit();
+
+   ConsoleBaseType::getType(TypeAnimationAssetPtr)->setInspectorFieldType("GuiInspectorTypeAnimationAssetPtr");
 }
 }
 
 
 //////////////////////////////////////////////////////////////////////////
 //////////////////////////////////////////////////////////////////////////
-// GuiInspectorTypeColorF
+// TypeAudioAssetPtr GuiInspectorField Class
 //////////////////////////////////////////////////////////////////////////
 //////////////////////////////////////////////////////////////////////////
-IMPLEMENT_CONOBJECT(GuiInspectorTypeColorF);
+IMPLEMENT_CONOBJECT(GuiInspectorTypeAudioAssetPtr);
 
 
-void GuiInspectorTypeColorF::consoleInit()
+GuiInspectorTypeAudioAssetPtr::GuiInspectorTypeAudioAssetPtr()
+{
+   mAssetType = StringTable->insert("AudioAsset");
+}
+
+void GuiInspectorTypeAudioAssetPtr::consoleInit()
 {
 {
    Parent::consoleInit();
    Parent::consoleInit();
 
 
-   ConsoleBaseType::getType(TypeColorF)->setInspectorFieldType("GuiInspectorTypeColorF");
+   ConsoleBaseType::getType(TypeAudioAssetPtr)->setInspectorFieldType("GuiInspectorTypeAudioAssetPtr");
 }
 }
 
 
-GuiInspectorTypeColorF::GuiInspectorTypeColorF()
+//////////////////////////////////////////////////////////////////////////
+// TypeFontAssetPtr GuiInspectorField Class
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_CONOBJECT(GuiInspectorTypeFontAssetPtr);
+
+GuiInspectorTypeFontAssetPtr::GuiInspectorTypeFontAssetPtr()
 {
 {
-   mColorFunction = StringTable->insert("getColorF");
+   mAssetType = StringTable->insert("FontAsset");
+}
+
+void GuiInspectorTypeFontAssetPtr::consoleInit()
+{
+   Parent::consoleInit();
+
+   ConsoleBaseType::getType(TypeFontAssetPtr)->setInspectorFieldType("GuiInspectorTypeFontAssetPtr");
+}
+
+//////////////////////////////////////////////////////////////////////////
+// TypeParticleAssetPtr GuiInspectorField Class
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_CONOBJECT(GuiInspectorTypeParticleAssetPtr);
+
+GuiInspectorTypeParticleAssetPtr::GuiInspectorTypeParticleAssetPtr()
+{
+   mAssetType = StringTable->insert("ParticleAsset");
 }
 }
 
 
+void GuiInspectorTypeParticleAssetPtr::consoleInit()
+{
+   Parent::consoleInit();
 
 
+   ConsoleBaseType::getType(TypeParticleAssetPtr)->setInspectorFieldType("GuiInspectorTypeParticleAssetPtr");
+}
 
 

+ 220 - 3
engine/source/gui/editor/guiInspectorTypes.h

@@ -26,6 +26,19 @@
 #include "gui/editor/guiInspector.h"
 #include "gui/editor/guiInspector.h"
 #endif
 #endif
 
 
+#ifndef _ANIMATION_ASSET_H_
+#include "2d/assets/AnimationAsset.h"
+#endif
+
+#ifndef _FONT_ASSET_H_
+#include "2d/assets/FontAsset.h"
+#endif // !_FONT_ASSET_H_
+
+#ifndef _PARTICLE_ASSET_H_
+#include "2d/assets/ParticleAsset.h"
+#endif // !_PARTICLE_ASSET_H_
+
+
 #ifndef _GUICONTROL_H_
 #ifndef _GUICONTROL_H_
 #include "gui/guiControl.h"
 #include "gui/guiControl.h"
 #endif
 #endif
@@ -46,10 +59,19 @@
 #include "gui/guiPopUpCtrl.h"
 #include "gui/guiPopUpCtrl.h"
 #endif
 #endif
 
 
+#ifndef _GUIGRIDCTRL_H_
+#include "gui/containers/guiGridCtrl.h"
+#endif
+
 #ifndef _GUICHECKBOXCTRL_H_
 #ifndef _GUICHECKBOXCTRL_H_
 #include "gui/buttons/guiCheckBoxCtrl.h"
 #include "gui/buttons/guiCheckBoxCtrl.h"
 #endif
 #endif
 
 
+#ifndef _GUICOLORPICKERCTRL_H_
+#include "gui/guiColorPicker.h"
+#endif // !_GUICOLORPICKERCTRL_H_
+
+
 
 
 //////////////////////////////////////////////////////////////////////////
 //////////////////////////////////////////////////////////////////////////
 // TypeEnum GuiInspectorField Class
 // TypeEnum GuiInspectorField Class
@@ -106,6 +128,23 @@ public:
    virtual GuiControl* constructEditControl();
    virtual GuiControl* constructEditControl();
 };
 };
 
 
+//////////////////////////////////////////////////////////////////////////
+// GuiInspectorTypeGuiBorderProfile Class
+//////////////////////////////////////////////////////////////////////////
+class GuiInspectorTypeGuiBorderProfile : public GuiInspectorTypeEnum
+{
+private:
+   typedef GuiInspectorTypeEnum Parent;
+public:
+   DECLARE_CONOBJECT(GuiInspectorTypeGuiBorderProfile);
+   static void consoleInit();
+
+   //////////////////////////////////////////////////////////////////////////
+   // Override able methods for custom edit fields (Both are REQUIRED)
+   //////////////////////////////////////////////////////////////////////////
+   virtual GuiControl* constructEditControl();
+};
+
 
 
 //////////////////////////////////////////////////////////////////////////
 //////////////////////////////////////////////////////////////////////////
 // TypeFileName GuiInspectorField Class
 // TypeFileName GuiInspectorField Class
@@ -139,13 +178,12 @@ public:
    DECLARE_CONOBJECT(GuiInspectorTypeColor);
    DECLARE_CONOBJECT(GuiInspectorTypeColor);
 
 
    StringTableEntry  mColorFunction;
    StringTableEntry  mColorFunction;
-   SimObjectPtr<GuiButtonCtrl>   mBrowseButton;
 
 
    //////////////////////////////////////////////////////////////////////////
    //////////////////////////////////////////////////////////////////////////
    // Override able methods for custom edit fields
    // Override able methods for custom edit fields
    //////////////////////////////////////////////////////////////////////////
    //////////////////////////////////////////////////////////////////////////
    virtual GuiControl*        constructEditControl();
    virtual GuiControl*        constructEditControl();
-   virtual void               resize(const Point2I &newPosition, const Point2I &newExtent);
+   virtual void               updateValue(StringTableEntry newValue);
 };
 };
 
 
 //////////////////////////////////////////////////////////////////////////
 //////////////////////////////////////////////////////////////////////////
@@ -176,4 +214,183 @@ public:
    static void consoleInit();
    static void consoleInit();
 };
 };
 
 
-#endif
+//////////////////////////////////////////////////////////////////////////
+// TypeSimObjectPtr GuiInspectorField Class
+//////////////////////////////////////////////////////////////////////////
+class GuiInspectorTypeSimObjectPtr : public GuiInspectorField
+{
+private:
+   typedef GuiInspectorField Parent;
+public:
+   DECLARE_CONOBJECT(GuiInspectorTypeSimObjectPtr);
+   static void consoleInit();
+
+   //////////////////////////////////////////////////////////////////////////
+   // Override able methods for custom edit fields
+   //////////////////////////////////////////////////////////////////////////
+   virtual GuiControl*        constructEditControl();
+   virtual StringTableEntry   getData();
+};
+
+//////////////////////////////////////////////////////////////////////////
+// TypeS32 GuiInspectorField Class
+//////////////////////////////////////////////////////////////////////////
+class GuiInspectorTypeS32 : public GuiInspectorField
+{
+private:
+   typedef GuiInspectorField Parent;
+public:
+   DECLARE_CONOBJECT(GuiInspectorTypeS32);
+   static void consoleInit();
+
+   //////////////////////////////////////////////////////////////////////////
+   // Override able methods for custom edit fields
+   //////////////////////////////////////////////////////////////////////////
+   virtual GuiControl*        constructEditControl();
+   virtual const char*        getData();
+};
+
+//////////////////////////////////////////////////////////////////////////
+// TypePoint2I GuiInspectorField Class
+//////////////////////////////////////////////////////////////////////////
+class GuiInspectorTypePoint2I : public GuiInspectorField
+{
+private:
+   typedef GuiInspectorField Parent;
+public:
+   DECLARE_CONOBJECT(GuiInspectorTypePoint2I);
+   static void consoleInit();
+
+   //////////////////////////////////////////////////////////////////////////
+   // Override able methods for custom edit fields
+   //////////////////////////////////////////////////////////////////////////
+   virtual GuiControl*        constructEditControl();
+   virtual void               updateValue(StringTableEntry newValue);
+};
+
+//////////////////////////////////////////////////////////////////////////
+// TypePoint2F GuiInspectorField Class
+//////////////////////////////////////////////////////////////////////////
+class GuiInspectorTypePoint2F : public GuiInspectorField
+{
+private:
+   typedef GuiInspectorField Parent;
+public:
+   DECLARE_CONOBJECT(GuiInspectorTypePoint2F);
+   static void consoleInit();
+
+   //////////////////////////////////////////////////////////////////////////
+   // Override able methods for custom edit fields
+   //////////////////////////////////////////////////////////////////////////
+   virtual GuiControl*        constructEditControl();
+   virtual void               updateValue(StringTableEntry newValue);
+};
+
+//////////////////////////////////////////////////////////////////////////
+// TypeVector2 GuiInspectorField Class
+//////////////////////////////////////////////////////////////////////////
+class GuiInspectorTypeVector2 : public GuiInspectorField
+{
+private:
+   typedef GuiInspectorField Parent;
+public:
+   DECLARE_CONOBJECT(GuiInspectorTypeVector2);
+   static void consoleInit();
+
+   //////////////////////////////////////////////////////////////////////////
+   // Override able methods for custom edit fields
+   //////////////////////////////////////////////////////////////////////////
+   virtual GuiControl*        constructEditControl();
+   virtual void               updateValue(StringTableEntry newValue);
+};
+
+//////////////////////////////////////////////////////////////////////////
+// TypeAsset GuiInspectorField Class Base for Assets
+//////////////////////////////////////////////////////////////////////////
+class GuiInspectorTypeAsset : public GuiInspectorField
+{
+private:
+   typedef GuiInspectorField Parent;
+public:
+   DECLARE_CONOBJECT(GuiInspectorTypeAsset);
+
+   StringTableEntry mAssetType;
+
+   SimObjectPtr<GuiButtonCtrl>   mBrowseButton;
+   //////////////////////////////////////////////////////////////////////////
+   // Override able methods for custom edit fields
+   //////////////////////////////////////////////////////////////////////////
+   virtual GuiControl*        constructEditControl();
+};
+
+//////////////////////////////////////////////////////////////////////////
+// TypeImageAssetPtr GuiInspectorField Class
+//////////////////////////////////////////////////////////////////////////
+class GuiInspectorTypeImageAssetPtr : public GuiInspectorTypeAsset
+{
+private:
+   typedef GuiInspectorTypeAsset Parent;
+public:
+   GuiInspectorTypeImageAssetPtr();
+
+   DECLARE_CONOBJECT(GuiInspectorTypeImageAssetPtr);
+   static void consoleInit();
+};
+
+//////////////////////////////////////////////////////////////////////////
+// TypeAnimationAssetPtr GuiInspectorField Class
+//////////////////////////////////////////////////////////////////////////
+class GuiInspectorTypeAnimationAssetPtr : public GuiInspectorTypeAsset
+{
+private:
+   typedef GuiInspectorTypeAsset Parent;
+public:
+   GuiInspectorTypeAnimationAssetPtr();
+
+   DECLARE_CONOBJECT(GuiInspectorTypeAnimationAssetPtr);
+   static void consoleInit();
+};
+
+//////////////////////////////////////////////////////////////////////////
+// TypeAudioAssetPtr GuiInspectorField Class
+//////////////////////////////////////////////////////////////////////////
+class GuiInspectorTypeAudioAssetPtr : public GuiInspectorTypeAsset
+{
+private:
+   typedef GuiInspectorTypeAsset Parent;
+public:
+   GuiInspectorTypeAudioAssetPtr();
+
+   DECLARE_CONOBJECT(GuiInspectorTypeAudioAssetPtr);
+   static void consoleInit();
+};
+
+//////////////////////////////////////////////////////////////////////////
+// TypeFontAssetPtr GuiInspectorField Class
+//////////////////////////////////////////////////////////////////////////
+class GuiInspectorTypeFontAssetPtr : public GuiInspectorTypeAsset
+{
+private:
+   typedef GuiInspectorTypeAsset Parent;
+public:
+   GuiInspectorTypeFontAssetPtr();
+
+   DECLARE_CONOBJECT(GuiInspectorTypeFontAssetPtr);
+   static void consoleInit();
+};
+
+//////////////////////////////////////////////////////////////////////////
+// TypeParticleAssetPtr GuiInspectorField Class
+//////////////////////////////////////////////////////////////////////////
+class GuiInspectorTypeParticleAssetPtr : public GuiInspectorTypeAsset
+{
+private:
+   typedef GuiInspectorTypeAsset Parent;
+public:
+   GuiInspectorTypeParticleAssetPtr();
+
+   DECLARE_CONOBJECT(GuiInspectorTypeParticleAssetPtr);
+   static void consoleInit();
+};
+
+#endif