Przeglądaj źródła

Merge pull request #22 from marauder2k7/development

GuiEditor and Defaults changes.
Peter Robinson 4 lat temu
rodzic
commit
096658d161

+ 1 - 0
engine/compilers/VisualStudio 2017/Torque 2D.vcxproj

@@ -211,6 +211,7 @@
       <DataExecutionPrevention>
       <DataExecutionPrevention>
       </DataExecutionPrevention>
       </DataExecutionPrevention>
       <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
       <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+      <AdditionalOptions>/NODEFAULTLIB:libcmtd.lib /NODEFAULTLIB:msvcrtd.lib %(AdditionalOptions)</AdditionalOptions>
     </Link>
     </Link>
   </ItemDefinitionGroup>
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">

+ 9 - 2
engine/compilers/VisualStudio 2017/libvorbis.vcxproj

@@ -109,9 +109,9 @@
       <Optimization>Disabled</Optimization>
       <Optimization>Disabled</Optimization>
       <AdditionalIncludeDirectories>..\..\Lib\libvorbis\lib;..\..\Lib\libvorbis\include;..\..\Lib\libogg\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <AdditionalIncludeDirectories>..\..\Lib\libvorbis\lib;..\..\Lib\libvorbis\include;..\..\Lib\libogg\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBVORBIS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBVORBIS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <MinimalRebuild>true</MinimalRebuild>
+      <MinimalRebuild>false</MinimalRebuild>
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
-      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
       <PrecompiledHeader>
       <PrecompiledHeader>
       </PrecompiledHeader>
       </PrecompiledHeader>
       <WarningLevel>Level3</WarningLevel>
       <WarningLevel>Level3</WarningLevel>
@@ -121,6 +121,13 @@
       <AssemblerListingLocation>.\../../Link/Debug/libvorbis/</AssemblerListingLocation>
       <AssemblerListingLocation>.\../../Link/Debug/libvorbis/</AssemblerListingLocation>
       <ProgramDataBaseFileName>.\../../Link/Debug/libvorbis/</ProgramDataBaseFileName>
       <ProgramDataBaseFileName>.\../../Link/Debug/libvorbis/</ProgramDataBaseFileName>
       <DisableSpecificWarnings>4244;4100;4267;4189;4305;4127;4706;%(DisableSpecificWarnings)</DisableSpecificWarnings>
       <DisableSpecificWarnings>4244;4100;4267;4189;4305;4127;4706;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+      <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+      <OmitFramePointers>false</OmitFramePointers>
+      <StringPooling>true</StringPooling>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <ObjectFileName>.\../../Link/Debug/libvorbis/</ObjectFileName>
     </ClCompile>
     </ClCompile>
   </ItemDefinitionGroup>
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">

+ 19 - 0
engine/source/console/consoleTypes.cc

@@ -33,6 +33,25 @@
 #include "2d/core/Vector2.h"
 #include "2d/core/Vector2.h"
 #endif
 #endif
 
 
+//////////////////////////////////////////////////////////////////////////
+// TypeName
+//////////////////////////////////////////////////////////////////////////
+ConsoleType(string, TypeName, sizeof(const char*), "")
+
+ConsoleGetType(TypeName)
+{
+   return *((const char **)(dptr));
+}
+
+ConsoleSetType(TypeName)
+{
+   if (argc == 1)
+      *((const char **)dptr) = StringTable->insert(argv[0]);
+   else
+      Con::printf("(TypeString) Cannot set multiple args to a single string.");
+}
+
+
 //////////////////////////////////////////////////////////////////////////
 //////////////////////////////////////////////////////////////////////////
 // TypeString
 // TypeString
 //////////////////////////////////////////////////////////////////////////
 //////////////////////////////////////////////////////////////////////////

+ 1 - 0
engine/source/console/consoleTypes.h

@@ -44,6 +44,7 @@ DefineConsoleType( TypeBool )
 DefineConsoleType( TypeBoolVector )
 DefineConsoleType( TypeBoolVector )
 DefineConsoleType( TypeF32Vector )
 DefineConsoleType( TypeF32Vector )
 DefineConsoleType( TypeString )
 DefineConsoleType( TypeString )
+DefineConsoleType( TypeName )
 DefineConsoleType( TypeStringTableEntryVector )
 DefineConsoleType( TypeStringTableEntryVector )
 DefineConsoleType( TypeCaseString )
 DefineConsoleType( TypeCaseString )
 DefineConsoleType( TypeFilename )
 DefineConsoleType( TypeFilename )

+ 1 - 0
engine/source/gui/containers/guiGridCtrl.cc

@@ -67,6 +67,7 @@ GuiGridCtrl::GuiGridCtrl()
 	mMaxRowCount = 0;
 	mMaxRowCount = 0;
 	mOrderMode = OrderMode::LRTB;
 	mOrderMode = OrderMode::LRTB;
 	mIsExtentDynamic = true;
 	mIsExtentDynamic = true;
+   setField("profile", "GuiDefaultProfile");
 }
 }
 
 
 //------------------------------------------------------------------------------
 //------------------------------------------------------------------------------

+ 5 - 0
engine/source/gui/containers/guiScrollCtrl.cc

@@ -69,6 +69,11 @@ GuiScrollCtrl::GuiScrollCtrl()
 
 
    mScrollOffset.set(0, 0);
    mScrollOffset.set(0, 0);
    mContentExt.set(200,200);
    mContentExt.set(200,200);
+
+   setField("thumbProfile", "GuiScrollThumbProfile");
+   setField("arrowProfile", "GuiScrollArrowProfile");
+   setField("trackProfile", "GuiScrollTrackProfile");
+   setField("profile", "GuiScrollProfile");
 }
 }
 
 
 void GuiScrollCtrl::initPersistFields()
 void GuiScrollCtrl::initPersistFields()

+ 2 - 0
engine/source/gui/containers/guiTabBookCtrl.cc

@@ -67,6 +67,8 @@ GuiTabBookCtrl::GuiTabBookCtrl()
    mIsContainer = true;
    mIsContainer = true;
 
 
    mTabProfile = NULL;
    mTabProfile = NULL;
+
+   setField("TabProfile", "GuiTabProfile");
 }
 }
 
 
 void GuiTabBookCtrl::initPersistFields()
 void GuiTabBookCtrl::initPersistFields()

+ 5 - 40
engine/source/gui/guiControl.cc

@@ -482,14 +482,7 @@ void GuiControl::onRender(Point2I offset, const RectI &updateRect)
 
 
 RectI GuiControl::applyMargins(Point2I offset, Point2I extent, GuiControlState currentState, GuiControlProfile *profile)
 RectI GuiControl::applyMargins(Point2I offset, Point2I extent, GuiControlState currentState, GuiControlProfile *profile)
 {
 {
-   if (!profile)
-   {
-      SimObject * obj = Sim::findObject("GuiDefaultProfile");
-      if (obj)
-      {
-         profile = dynamic_cast<GuiControlProfile*>(obj);
-      }
-   }
+
 	//Get the border profiles
 	//Get the border profiles
 	GuiBorderProfile *leftProfile = profile->getLeftBorder();
 	GuiBorderProfile *leftProfile = profile->getLeftBorder();
 	GuiBorderProfile *rightProfile = profile->getRightBorder();
 	GuiBorderProfile *rightProfile = profile->getRightBorder();
@@ -506,14 +499,7 @@ RectI GuiControl::applyMargins(Point2I offset, Point2I extent, GuiControlState c
 
 
 RectI GuiControl::applyBorders(Point2I offset, Point2I extent, GuiControlState currentState, GuiControlProfile *profile)
 RectI GuiControl::applyBorders(Point2I offset, Point2I extent, GuiControlState currentState, GuiControlProfile *profile)
 {
 {
-   if (!profile)
-   {
-      SimObject * obj = Sim::findObject("GuiDefaultProfile");
-      if (obj)
-      {
-         profile = dynamic_cast<GuiControlProfile*>(obj);
-      }
-   }
+
 	//Get the border profiles
 	//Get the border profiles
 	GuiBorderProfile *leftProfile = profile->getLeftBorder();
 	GuiBorderProfile *leftProfile = profile->getLeftBorder();
 	GuiBorderProfile *rightProfile = profile->getRightBorder();
 	GuiBorderProfile *rightProfile = profile->getRightBorder();
@@ -530,14 +516,7 @@ RectI GuiControl::applyBorders(Point2I offset, Point2I extent, GuiControlState c
 
 
 RectI GuiControl::applyPadding(Point2I offset, Point2I extent, GuiControlState currentState, GuiControlProfile *profile)
 RectI GuiControl::applyPadding(Point2I offset, Point2I extent, GuiControlState currentState, GuiControlProfile *profile)
 {
 {
-   if (!profile)
-   {
-      SimObject * obj = Sim::findObject("GuiDefaultProfile");
-      if (obj)
-      {
-         profile = dynamic_cast<GuiControlProfile*>(obj);
-      }
-   }
+
 	//Get the border profiles
 	//Get the border profiles
 	GuiBorderProfile *leftProfile = profile->getLeftBorder();
 	GuiBorderProfile *leftProfile = profile->getLeftBorder();
 	GuiBorderProfile *rightProfile = profile->getRightBorder();
 	GuiBorderProfile *rightProfile = profile->getRightBorder();
@@ -554,14 +533,7 @@ RectI GuiControl::applyPadding(Point2I offset, Point2I extent, GuiControlState c
 
 
 RectI GuiControl::getInnerRect(Point2I offset, Point2I extent, GuiControlState currentState, GuiControlProfile *profile)
 RectI GuiControl::getInnerRect(Point2I offset, Point2I extent, GuiControlState currentState, GuiControlProfile *profile)
 {
 {
-   if (!profile)
-   {
-      SimObject * obj = Sim::findObject("GuiDefaultProfile");
-      if (obj)
-      {
-         profile = dynamic_cast<GuiControlProfile*>(obj);
-      }
-   }
+
 	//Get the border profiles
 	//Get the border profiles
 	GuiBorderProfile *leftProfile = profile->getLeftBorder();
 	GuiBorderProfile *leftProfile = profile->getLeftBorder();
 	GuiBorderProfile *rightProfile = profile->getRightBorder();
 	GuiBorderProfile *rightProfile = profile->getRightBorder();
@@ -578,14 +550,7 @@ RectI GuiControl::getInnerRect(Point2I offset, Point2I extent, GuiControlState c
 
 
 Point2I GuiControl::getOuterExtent(Point2I innerExtent, GuiControlState currentState, GuiControlProfile *profile)
 Point2I GuiControl::getOuterExtent(Point2I innerExtent, GuiControlState currentState, GuiControlProfile *profile)
 {
 {
-   if (!profile)
-   {
-      SimObject * obj = Sim::findObject("GuiDefaultProfile");
-      if (obj)
-      {
-         profile = dynamic_cast<GuiControlProfile*>(obj);
-      }
-   }
+
 	//Get the border profiles
 	//Get the border profiles
 	GuiBorderProfile *leftProfile = profile->getLeftBorder();
 	GuiBorderProfile *leftProfile = profile->getLeftBorder();
 	GuiBorderProfile *rightProfile = profile->getRightBorder();
 	GuiBorderProfile *rightProfile = profile->getRightBorder();

+ 7 - 3
engine/source/gui/guiTreeViewCtrl.cc

@@ -1140,7 +1140,10 @@ bool GuiTreeViewCtrl::buildIconTable(const char * icons)
                "^Sandbox/gui/images/simgroup:"
                "^Sandbox/gui/images/simgroup:"
                "^Sandbox/gui/images/simgroupClosed:"
                "^Sandbox/gui/images/simgroupClosed:"
                "^Sandbox/gui/images/simgroupSelected:"
                "^Sandbox/gui/images/simgroupSelected:"
-               "^Sandbox/gui/images/simgroupSelectedClosed:";
+               "^Sandbox/gui/images/simgroupSelectedClosed:"
+               "^Sandbox/gui/images/Camera:"
+               "^Sandbox/gui/images/iconVisible:"
+               "^Sandbox/gui/images/iconLocked:";
    }
    }
 
 
    // Figure the size of the buffer we need...
    // Figure the size of the buffer we need...
@@ -3259,11 +3262,12 @@ void GuiTreeViewCtrl::lockSelection(bool lock)
 }
 }
 void GuiTreeViewCtrl::hideSelection(bool hide)
 void GuiTreeViewCtrl::hideSelection(bool hide)
 {
 {
-   for(U32 i = 0; i < (U32)mSelectedItems.size(); i++)
+   for (U32 i = 0; i < (U32)mSelectedItems.size(); i++)
    {
    {
-      if(mSelectedItems[i]->isInspectorData())
+      if (mSelectedItems[i]->isInspectorData())
          mSelectedItems[i]->getObject()->setHidden(hide);
          mSelectedItems[i]->getObject()->setHidden(hide);
    }
    }
+
 }
 }
 
 
 //------------------------------------------------------------------------------
 //------------------------------------------------------------------------------

+ 0 - 1
engine/source/gui/guiTreeViewCtrl.h

@@ -184,7 +184,6 @@ protected:
          SimGroup2,
          SimGroup2,
          SimGroup3,
          SimGroup3,
          SimGroup4,
          SimGroup4,
-         Audio,
          Camera,
          Camera,
          Hidden,
          Hidden,
          Lock1,
          Lock1,

+ 93 - 1
engine/source/gui/guiTypes.cc

@@ -104,6 +104,18 @@ GuiBorderProfile::GuiBorderProfile()
 		mPadding[i] = 0;
 		mPadding[i] = 0;
 	}
 	}
 
 
+   GuiBorderProfile *def = dynamic_cast<GuiBorderProfile*>(Sim::findObject("GuiDefaultProfile"));
+   if (def)
+   {
+      for (S32 i = 0; i < 4; i++)
+      {
+         mMargin[i] = def->mMargin[i];
+         mBorder[i] = def->mBorder[i];
+         mBorderColor[i] = def->mBorderColor[i];
+         mPadding[i] = def->mPadding[i];
+      }
+   }
+
 	mUnderfill = true;
 	mUnderfill = true;
 }
 }
 
 
@@ -294,6 +306,44 @@ GuiControlProfile::GuiControlProfile(void) :
 	mFillColorHL.set(0, 0, 0, 0);
 	mFillColorHL.set(0, 0, 0, 0);
 	mFillColorSL.set(0, 0, 0, 0);
 	mFillColorSL.set(0, 0, 0, 0);
 	mFillColorNA.set(0, 0, 0, 0);
 	mFillColorNA.set(0, 0, 0, 0);
+   mCategory = StringTable->EmptyString;
+
+   GuiControlProfile *def = dynamic_cast<GuiControlProfile*>(Sim::findObject("GuiDefaultProfile"));
+   if (def)
+   {
+      mTabable = def->mTabable;
+      mCanKeyFocus = def->mCanKeyFocus;
+
+      mFillColor = def->mFillColor;
+      mFillColorHL = def->mFillColorHL;
+      mFillColorNA = def->mFillColorNA;
+
+      mBorderDefault = def->mBorderDefault;
+      mBorderLeft = def->mBorderDefault;
+      mBorderRight = def->mBorderDefault;
+      mBorderTop = def->mBorderDefault;
+      mBorderBottom = def->mBorderDefault;
+
+      // default font
+      mFontType = def->mFontType;
+      mFontSize = def->mFontSize;
+      mFontCharset = def->mFontCharset;
+
+      for (U32 i = 0; i < 10; i++)
+         mFontColors[i] = def->mFontColors[i];
+
+      // default bitmap
+      mBitmapName = def->mBitmapName;
+      mTextOffset = def->mTextOffset;
+
+      //used by GuiTextCtrl
+      mAlignment = def->mAlignment;
+      mReturnTab = def->mReturnTab;
+      mNumbersOnly = def->mNumbersOnly;
+      mCursorColor = def->mCursorColor;
+      mProfileForChildren = def->mProfileForChildren;
+      setChildrenProfile(def->mProfileForChildren);
+   }
 }
 }
 
 
 GuiControlProfile::~GuiControlProfile()
 GuiControlProfile::~GuiControlProfile()
@@ -345,6 +395,8 @@ void GuiControlProfile::initPersistFields()
    addField("soundButtonDown", TypeAudioAssetPtr,  Offset(mSoundButtonDown, GuiControlProfile));
    addField("soundButtonDown", TypeAudioAssetPtr,  Offset(mSoundButtonDown, GuiControlProfile));
    addField("soundButtonOver", TypeAudioAssetPtr,  Offset(mSoundButtonOver, GuiControlProfile));
    addField("soundButtonOver", TypeAudioAssetPtr,  Offset(mSoundButtonOver, GuiControlProfile));
    addField("profileForChildren", TypeSimObjectPtr,  Offset(mProfileForChildren, GuiControlProfile));
    addField("profileForChildren", TypeSimObjectPtr,  Offset(mProfileForChildren, GuiControlProfile));
+
+   addField("category", TypeString, Offset(mCategory, GuiControlProfile));
 }
 }
 
 
 bool GuiControlProfile::onAdd()
 bool GuiControlProfile::onAdd()
@@ -354,9 +406,45 @@ bool GuiControlProfile::onAdd()
 
 
    Sim::getGuiDataGroup()->addObject(this);
    Sim::getGuiDataGroup()->addObject(this);
 
 
+   getChildrenProfile();
+
    return true;
    return true;
 }
 }
 
 
+GuiControlProfile* GuiControlProfile::getChildrenProfile()
+{
+   // We can early out if we still have a valid profile
+   if (mProfileForChildren)
+      return mProfileForChildren;
+
+   // Attempt to find the profile specified
+   if (mProfileForChildren)
+   {
+      GuiControlProfile *profile = dynamic_cast<GuiControlProfile*> (Sim::findObject(mProfileForChildren->getName()));
+
+      if (profile)
+         setChildrenProfile(profile);
+   }
+
+   return mProfileForChildren;
+}
+
+void GuiControlProfile::setChildrenProfile(GuiControlProfile *prof)
+{
+   if (prof == mProfileForChildren)
+      return;
+
+   // Clear the delete notification we previously set up
+   if (mProfileForChildren)
+      clearNotify(mProfileForChildren);
+
+   mProfileForChildren = prof;
+
+   // Make sure that the new profile will notify us when it is deleted
+   if (mProfileForChildren)
+      deleteNotify(mProfileForChildren);
+}
+
 S32 GuiControlProfile::constructBitmapArray()
 S32 GuiControlProfile::constructBitmapArray()
 {
 {
    if(mBitmapArrayRects.size())
    if(mBitmapArrayRects.size())
@@ -460,6 +548,8 @@ void GuiControlProfile::incRefCount()
 
 
    mRefCount++;
    mRefCount++;
 
 
+   getChildrenProfile();
+
 }
 }
 
 
 void GuiControlProfile::decRefCount()
 void GuiControlProfile::decRefCount()
@@ -471,7 +561,9 @@ void GuiControlProfile::decRefCount()
    if(!mRefCount)
    if(!mRefCount)
 	  return;
 	  return;
 
 
-   if(!--mRefCount)
+   --mRefCount;
+
+   if(!mRefCount)
    {
    {
 	  mFont = NULL;
 	  mFont = NULL;
 	  mTextureHandle = NULL;
 	  mTextureHandle = NULL;

+ 5 - 0
engine/source/gui/guiTypes.h

@@ -226,6 +226,7 @@ public:
    ColorI mCursorColor;                            ///< Color for the blinking cursor in text fields (for example)
    ColorI mCursorColor;                            ///< Color for the blinking cursor in text fields (for example)
 
 
    Point2I mTextOffset;                            ///< Text offset for the control
    Point2I mTextOffset;                            ///< Text offset for the control
+   StringTableEntry  mCategory;                    ///< Category for control in editors.
 
 
    // imageAsset members
    // imageAsset members
    StringTableEntry mImageAssetID;
    StringTableEntry mImageAssetID;
@@ -254,6 +255,10 @@ public:
    static void initPersistFields();
    static void initPersistFields();
    bool onAdd();
    bool onAdd();
 
 
+   GuiControlProfile * getChildrenProfile();
+
+   void setChildrenProfile(GuiControlProfile * prof);
+
    /// This method creates an array of bitmaps from one single bitmap with
    /// This method creates an array of bitmaps from one single bitmap with
    /// seperator color. The seperator color is whatever color is in pixel 0,0
    /// seperator color. The seperator color is whatever color is in pixel 0,0
    /// of the bitmap. For an example see darkWindow.png and some of the other
    /// of the bitmap. For an example see darkWindow.png and some of the other

+ 38 - 22
engine/source/sim/simObject.cc

@@ -45,6 +45,8 @@ namespace Sim
     extern void cancelPendingEvents(SimObject *obj);
     extern void cancelPendingEvents(SimObject *obj);
 }
 }
 
 
+//-----------------------------------------------------------------------------
+bool SimObject::disableNameChanging = false;
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 
 
 SimObject::SimObject()
 SimObject::SimObject()
@@ -846,33 +848,21 @@ SimObject::~SimObject()
 
 
 //---------------------------------------------------------------------------
 //---------------------------------------------------------------------------
 
 
-bool SimObject::isLocked()
-{
-   if(!mFieldDictionary)
-      return false;
-
-   const char * val = mFieldDictionary->getFieldValue( StringTable->insert( "locked", false ) );
-
-   return( val ? dAtob(val) : false );
-}
 
 
 void SimObject::setLocked( bool b = true )
 void SimObject::setLocked( bool b = true )
 {
 {
-   setDataField(StringTable->insert("locked", false), NULL, b ? "true" : "false" );
-}
-
-bool SimObject::isHidden()
-{
-   if(!mFieldDictionary)
-      return false;
-
-   const char * val = mFieldDictionary->getFieldValue( StringTable->insert( "hidden", false ) );
-   return( val ? dAtob(val) : false );
+   if (b)
+      mFlags.set(Locked);
+   else
+      mFlags.clear(Locked);
 }
 }
 
 
 void SimObject::setHidden(bool b = true)
 void SimObject::setHidden(bool b = true)
 {
 {
-   setDataField(StringTable->insert("hidden", false), NULL, b ? "true" : "false" );
+   if (b)
+      mFlags.set(Hidden);
+   else
+      mFlags.clear(Hidden);
 }
 }
 
 
 //---------------------------------------------------------------------------
 //---------------------------------------------------------------------------
@@ -1079,10 +1069,13 @@ void SimObject::clearAllNotifications()
 void SimObject::initPersistFields()
 void SimObject::initPersistFields()
 {
 {
    Parent::initPersistFields();
    Parent::initPersistFields();
+
+   
    addGroup("SimBase");
    addGroup("SimBase");
-   addField("canSaveDynamicFields",   TypeBool,   Offset(mCanSaveFieldDictionary, SimObject), &writeCanSaveDynamicFields, "");
+   addProtectedField("name", TypeName, Offset(objectName, SimObject), &setProtectedName, &defaultProtectedGetFn, "Name for the object.");
+   addField("canSaveDynamicFields",    TypeBool,         Offset(mCanSaveFieldDictionary, SimObject), &writeCanSaveDynamicFields, "");
    addField("internalName",            TypeString,       Offset(mInternalName, SimObject), &writeInternalName, "");   
    addField("internalName",            TypeString,       Offset(mInternalName, SimObject), &writeInternalName, "");   
-   addProtectedField("parentGroup",        TypeSimObjectPtr, Offset(mGroup, SimObject), &setParentGroup, &defaultProtectedGetFn, &writeParentGroup, "Group hierarchy parent of the object." );
+   addProtectedField("parentGroup",    TypeSimObjectPtr, Offset(mGroup, SimObject), &setParentGroup, &defaultProtectedGetFn, &writeParentGroup, "Group hierarchy parent of the object." );
    endGroup("SimBase");
    endGroup("SimBase");
 
 
    // Namespace Linking.
    // Namespace Linking.
@@ -1090,8 +1083,31 @@ void SimObject::initPersistFields()
    addProtectedField("superclass", TypeString, Offset(mSuperClassName, SimObject), &setSuperClass, &defaultProtectedGetFn, &writeSuperclass, "Script Class of object.");
    addProtectedField("superclass", TypeString, Offset(mSuperClassName, SimObject), &setSuperClass, &defaultProtectedGetFn, &writeSuperclass, "Script Class of object.");
    addProtectedField("class",      TypeString, Offset(mClassName,      SimObject), &setClass,      &defaultProtectedGetFn, &writeClass, "Script SuperClass of object.");
    addProtectedField("class",      TypeString, Offset(mClassName,      SimObject), &setClass,      &defaultProtectedGetFn, &writeClass, "Script SuperClass of object.");
    endGroup("Namespace Linking");
    endGroup("Namespace Linking");
+
+   addGroup("Editing");
+
+   addProtectedField("hidden", TypeBool, NULL, &_setHidden, &_getHidden, "Whether the object is visible.");
+   addProtectedField("locked", TypeBool, NULL, &_setLocked, &_getLocked, "Whether the object can be edited.");
+
+   endGroup("Editing");
+}
+
+//-----------------------------------------------------------------------------
+
+bool SimObject::setProtectedName(void *obj, const char *data)
+{
+   if (disableNameChanging)
+      return false;
+   SimObject *object = static_cast<SimObject*>(obj);
+
+   if (object->isProperlyAdded())
+      object->assignName(data);
+
+   // always return false because we assign the name here
+   return false;
 }
 }
 
 
+
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 
 
 SimObject* SimObject::clone( const bool copyDynamicFields )
 SimObject* SimObject::clone( const bool copyDynamicFields )

+ 26 - 4
engine/source/sim/simObject.h

@@ -251,9 +251,28 @@ private:
         Selected  = BIT(4),   ///< This object has been marked as selected. (in editor)
         Selected  = BIT(4),   ///< This object has been marked as selected. (in editor)
         Expanded  = BIT(5),   ///< This object has been marked as expanded. (in editor)
         Expanded  = BIT(5),   ///< This object has been marked as expanded. (in editor)
         ModStaticFields  = BIT(6),    ///< The object allows you to read/modify static fields
         ModStaticFields  = BIT(6),    ///< The object allows you to read/modify static fields
-        ModDynamicFields = BIT(7)     ///< The object allows you to read/modify dynamic fields
+        ModDynamicFields = BIT(7),    ///< The object allows you to read/modify dynamic fields
+        Hidden = BIT(8),   ///< Object is hidden in editors.
+        Locked = BIT(9)   ///< Object is locked in editors.
     };
     };
 
 
+    static const char* _getHidden(void* object, const char* data)
+    {
+       if (static_cast<SimObject*>(object)->isHidden()) return "1"; return "0";
+    }
+    static const char* _getLocked(void* object, const char* data)
+    {
+       if (static_cast<SimObject*>(object)->isLocked()) return "1"; return "0";
+    }
+    static bool _setHidden(void* object, const char* data)
+    {
+       static_cast<SimObject*>(object)->setHidden(dAtob(data)); return false;
+    }
+    static bool _setLocked(void* object, const char* data)
+    {
+       static_cast<SimObject*>(object)->setLocked(dAtob(data)); return false;
+    }
+
 public:
 public:
     /// @name Notification
     /// @name Notification
     /// @{
     /// @{
@@ -339,13 +358,14 @@ protected:
 
 
     static bool setClass(void* obj, const char* data)                                { static_cast<SimObject*>(obj)->setClassNamespace(data); return false; };
     static bool setClass(void* obj, const char* data)                                { static_cast<SimObject*>(obj)->setClassNamespace(data); return false; };
     static bool setSuperClass(void* obj, const char* data)                           { static_cast<SimObject*>(obj)->setSuperClassNamespace(data); return false; };
     static bool setSuperClass(void* obj, const char* data)                           { static_cast<SimObject*>(obj)->setSuperClassNamespace(data); return false; };
+    static bool writeObjectName(void* obj, StringTableEntry pFieldName)              { SimObject* simObject = static_cast<SimObject*>(obj); return simObject->objectName != NULL && simObject->objectName != StringTable->EmptyString; }
     static bool writeCanSaveDynamicFields( void* obj, StringTableEntry pFieldName )  { return static_cast<SimObject*>(obj)->mCanSaveFieldDictionary == false; }
     static bool writeCanSaveDynamicFields( void* obj, StringTableEntry pFieldName )  { return static_cast<SimObject*>(obj)->mCanSaveFieldDictionary == false; }
     static bool writeInternalName( void* obj, StringTableEntry pFieldName )          { SimObject* simObject = static_cast<SimObject*>(obj); return simObject->mInternalName != NULL && simObject->mInternalName != StringTable->EmptyString; }
     static bool writeInternalName( void* obj, StringTableEntry pFieldName )          { SimObject* simObject = static_cast<SimObject*>(obj); return simObject->mInternalName != NULL && simObject->mInternalName != StringTable->EmptyString; }
     static bool setParentGroup(void* obj, const char* data);
     static bool setParentGroup(void* obj, const char* data);
     static bool writeParentGroup( void* obj, StringTableEntry pFieldName )           { return static_cast<SimObject*>(obj)->mGroup != NULL; }
     static bool writeParentGroup( void* obj, StringTableEntry pFieldName )           { return static_cast<SimObject*>(obj)->mGroup != NULL; }
     static bool writeSuperclass( void* obj, StringTableEntry pFieldName )            { SimObject* simObject = static_cast<SimObject*>(obj); return simObject->mSuperClassName != NULL && simObject->mSuperClassName != StringTable->EmptyString; }
     static bool writeSuperclass( void* obj, StringTableEntry pFieldName )            { SimObject* simObject = static_cast<SimObject*>(obj); return simObject->mSuperClassName != NULL && simObject->mSuperClassName != StringTable->EmptyString; }
     static bool writeClass( void* obj, StringTableEntry pFieldName )                 { SimObject* simObject = static_cast<SimObject*>(obj); return simObject->mClassName != NULL && simObject->mClassName != StringTable->EmptyString; }
     static bool writeClass( void* obj, StringTableEntry pFieldName )                 { SimObject* simObject = static_cast<SimObject*>(obj); return simObject->mClassName != NULL && simObject->mClassName != StringTable->EmptyString; }
-
+    static bool setProtectedName(void * obj, const char * data);
     // Accessors
     // Accessors
     public:
     public:
     StringTableEntry getClassNamespace() const { return mClassName; };
     StringTableEntry getClassNamespace() const { return mClassName; };
@@ -374,6 +394,7 @@ public:
     /// @param   slotName    Field to access.
     /// @param   slotName    Field to access.
     /// @param   array       String containing index into array
     /// @param   array       String containing index into array
     ///                      (if field is an array); if NULL, it is ignored.
     ///                      (if field is an array); if NULL, it is ignored.
+    static bool disableNameChanging;
     const char *getDataField(StringTableEntry slotName, const char *array);
     const char *getDataField(StringTableEntry slotName, const char *array);
 
 
     /// Set the value of a field on the object.
     /// Set the value of a field on the object.
@@ -601,9 +622,9 @@ public:
     bool isProperlyAdded() const { return mFlags.test(Added); }
     bool isProperlyAdded() const { return mFlags.test(Added); }
     bool isDeleted() const { return mFlags.test(Deleted); }
     bool isDeleted() const { return mFlags.test(Deleted); }
     bool isRemoved() const { return mFlags.test(Deleted | Removed); }
     bool isRemoved() const { return mFlags.test(Deleted | Removed); }
-    bool isLocked();
+    bool isLocked() const { return mFlags.test(Locked); }
     void setLocked( bool b );
     void setLocked( bool b );
-    bool isHidden();
+    bool isHidden()const { return mFlags.test(Hidden); }
     void setHidden(bool b);
     void setHidden(bool b);
 
 
     inline void setProgenitorFile( const char* pFile ) { mProgenitorFile = StringTable->insert( pFile ); }
     inline void setProgenitorFile( const char* pFile ) { mProgenitorFile = StringTable->insert( pFile ); }
@@ -730,6 +751,7 @@ public:
     virtual void            dumpClassHierarchy();
     virtual void            dumpClassHierarchy();
 
 
     static void initPersistFields();
     static void initPersistFields();
+    
     SimObject* clone( const bool copyDynamicFields );
     SimObject* clone( const bool copyDynamicFields );
     virtual void copyTo(SimObject* object);
     virtual void copyTo(SimObject* object);
 
 

+ 12 - 0
engine/source/sim/simObject_ScriptBinding.h

@@ -539,6 +539,18 @@ ConsoleMethodWithDocs(SimObject, setFieldValue, ConsoleBool, 4, 4, (fieldName,va
 
 
 }
 }
 
 
+ConsoleMethodWithDocs(SimObject, setEditFieldValue, ConsoleBool, 4, 4, (fieldName, value))
+{
+   const char *fieldName = StringTable->insert(argv[2]);
+   const char *value = argv[3];
+   object->inspectPreApply();
+   object->setDataField(fieldName, NULL, value);
+   object->inspectPostApply();
+
+   return true;
+
+}
+
 /*! return the number of dynamic ("add-on") fields.
 /*! return the number of dynamic ("add-on") fields.
 	@return the number of dynamic fields
 	@return the number of dynamic fields
 
 

+ 69 - 37
toybox/GuiEditorToy/1/assets/scripts/GuiEditorCtrlProperties.cs

@@ -20,6 +20,21 @@ function GuiEditorCtrlProperties::update(%this, %target)
 		}
 		}
 		else
 		else
 		{
 		{
+			// if we are locked update the gui to reflect it.
+			if($currentTarget.getFieldValue("locked"))
+			{
+				$targetprevLocked = true;
+				%this.build($currentTarget);
+			}
+			// if we were prev locked we need to rebuild
+			else if($targetprevLocked)
+			{
+				// just so this isn't always happening
+				// sometimes we only want to updateValues
+				%this.build($currentTarget);
+				$targetprevLocked = false;
+			}
+			// update values of fields.
 			%this.updateValues(%target);
 			%this.updateValues(%target);
 		}
 		}
 	}
 	}
@@ -27,6 +42,7 @@ function GuiEditorCtrlProperties::update(%this, %target)
 
 
 function GuiEditorCtrlProperties::updateValues(%this, %target)
 function GuiEditorCtrlProperties::updateValues(%this, %target)
 {
 {
+	// go through every field and updates.
 	%count = %target.getFieldCount();
 	%count = %target.getFieldCount();
 	for(%i = 0; %i < %count; %i++)
 	for(%i = 0; %i < %count; %i++)
 	{
 	{
@@ -56,12 +72,23 @@ function GuiEditorCtrlProperties::updateValues(%this, %target)
 
 
 function GuiEditorCtrlProperties::build(%this, %target)
 function GuiEditorCtrlProperties::build(%this, %target)
 {
 {
-	$dynSim = new SimSet();
+	// assign target so we can keep track.
 	$currentTarget = %target;
 	$currentTarget = %target;
 	GuiEditorCtrlProperties.clear();
 	GuiEditorCtrlProperties.clear();
+	
+	// every field gets a gui
 	%count = %target.getFieldCount();
 	%count = %target.getFieldCount();
 	for(%i = 0; %i < %count; %i++)
 	for(%i = 0; %i < %count; %i++)
 	{
 	{
+		%field = %target.getField(%i);
+		// we only want the locked field.
+		if($currentTarget.getFieldValue("locked"))
+		{
+			if(%field !$= "locked")
+			{
+				continue;
+			}
+		}
 		
 		
 		%fieldCtrl = new GuiControl()
 		%fieldCtrl = new GuiControl()
 		{
 		{
@@ -72,8 +99,6 @@ function GuiEditorCtrlProperties::build(%this, %target)
 			visible = "1";
 			visible = "1";
 		};
 		};
 		
 		
-		%field = %target.getField(%i);
-		
 		%fieldLabel = new GuiControl()
 		%fieldLabel = new GuiControl()
 		{
 		{
 			text = %field @ ": ";
 			text = %field @ ": ";
@@ -93,6 +118,14 @@ function GuiEditorCtrlProperties::build(%this, %target)
 
 
 		GuiEditorCtrlProperties.add(%fieldCtrl);
 		GuiEditorCtrlProperties.add(%fieldCtrl);
 	}
 	}
+	
+	// we don't want dynamic fields either.
+	if($currentTarget.getFieldValue("locked"))
+	{
+		return;
+	}
+	
+	// build dynamic fields
 	%dynCtrl = new GuiPanelCtrl()
 	%dynCtrl = new GuiPanelCtrl()
 	{
 	{
 		position = "10 0";
 		position = "10 0";
@@ -139,15 +172,23 @@ function GuiEditorCtrlProperties::build(%this, %target)
 	%addDyn.add(%label);
 	%addDyn.add(%label);
 	%addDyn.add(%bttn);
 	%addDyn.add(%bttn);
 	%dynCtrl.add(%addDyn);
 	%dynCtrl.add(%addDyn);
+	if(isObject(DynamicContainer))
+	{
+		DynamicContainer.clear();
+		DynamicContainer.delete();
+	}
 	
 	
 	%dynChain = new GuiChainCtrl(DynamicContainer)
 	%dynChain = new GuiChainCtrl(DynamicContainer)
 	{
 	{
 		position = "0 50";
 		position = "0 50";
 		extent = "320 30";
 		extent = "320 30";
 	};
 	};
-	
+		
 	%dynCtrl.add(%dynChain);
 	%dynCtrl.add(%dynChain);
 	
 	
+	// dynamic fields need to be updated separately.
+	// eventually should separate fields by group.
+	
 	GuiEditorCtrlProperties.updateDynamicFields();
 	GuiEditorCtrlProperties.updateDynamicFields();
 }
 }
 
 
@@ -161,6 +202,7 @@ function GuiEditorCtrlProperties::addDynamic(%this)
 
 
 function GuiEditorCtrlProperties::removeDynamic(%this, %field)
 function GuiEditorCtrlProperties::removeDynamic(%this, %field)
 {
 {
+	// giving a dynamic field a null value deletes it.
 	$currentTarget.setFieldValue(%field,"");
 	$currentTarget.setFieldValue(%field,"");
 	GuiEditorCtrlProperties.updateDynamicFields();
 	GuiEditorCtrlProperties.updateDynamicFields();
 }
 }
@@ -239,6 +281,7 @@ function GuiEditorCtrlProperties::updateDynamicFields(%this)
 function GuiEditorCtrlProperties::setData(%this,%field, %val)
 function GuiEditorCtrlProperties::setData(%this,%field, %val)
 {
 {
 	$currentTarget.setEditFieldValue(%field, %val);
 	$currentTarget.setEditFieldValue(%field, %val);
+	%this.update($currentTarget);
 }
 }
 
 
 function GuiEditorCtrlProperties::buildEdit(%this,%field,%fieldType,%fieldVal)
 function GuiEditorCtrlProperties::buildEdit(%this,%field,%fieldType,%fieldVal)
@@ -251,6 +294,7 @@ function GuiEditorCtrlProperties::buildEdit(%this,%field,%fieldType,%fieldVal)
 	
 	
 	%fieldEdit = %field @ "edit";
 	%fieldEdit = %field @ "edit";
 	echo(%field TAB %fieldType TAB %fieldVal);
 	echo(%field TAB %fieldType TAB %fieldVal);
+	
 	switch$(%fieldType)
 	switch$(%fieldType)
 	{
 	{
 		case "float":
 		case "float":
@@ -298,21 +342,6 @@ function GuiEditorCtrlProperties::buildEdit(%this,%field,%fieldType,%fieldVal)
 			%ctrl.setFieldValue("Validate", "GuiEditorCtrlProperties.setData(" @ %field @ "," @ %ctrl.getId() @ ".getText());");
 			%ctrl.setFieldValue("Validate", "GuiEditorCtrlProperties.setData(" @ %field @ "," @ %ctrl.getId() @ ".getText());");
 			return %ctrl;
 			return %ctrl;
 			
 			
-		case "string":
-			%ctrl = new GuiTextEditCtrl(%fieldEdit)
-				{
-					Text = %fieldVal;
-					Position = "160 0";
-					extent = "160 30";
-					horizSizing = "right";
-					vertSizing = "bottom";
-					visible = "1";
-					Profile = "GuiTextEditProfile";
-				};
-			%ctrl.setFieldValue("AltCommand", "GuiEditorCtrlProperties.setData(" @ %field @ "," @ %ctrl.getId() @ ".getText());");
-			%ctrl.setFieldValue("Validate", "GuiEditorCtrlProperties.setData(" @ %field @ "," @ %ctrl.getId() @ ".getText());");
-			return %ctrl;
-			
 		case "SimObjectPtr":
 		case "SimObjectPtr":
 		return	%ctrl = new GuiControl(%fieldEdit)
 		return	%ctrl = new GuiControl(%fieldEdit)
 				{
 				{
@@ -324,22 +353,6 @@ function GuiEditorCtrlProperties::buildEdit(%this,%field,%fieldType,%fieldVal)
 					visible = "1";
 					visible = "1";
 					Profile = "GuiTextProfile";
 					Profile = "GuiTextProfile";
 				};
 				};
-				
-		case "caseString":
-			%ctrl = new GuiTextEditCtrl(%fieldEdit)
-			{
-				Text = %fieldVal;
-				Position = "160 0";
-				extent = "160 30";
-				horizSizing = "right";
-				vertSizing = "bottom";
-				visible = "1";
-				Profile = "GuiTextEditProfile";
-				
-			};
-			%ctrl.setFieldValue("AltCommand", "GuiEditorCtrlProperties.setData(" @ %field @ "," @ %ctrl.getId() @ ".getText());");
-			%ctrl.setFieldValue("Validate", "GuiEditorCtrlProperties.setData(" @ %field @ "," @ %ctrl.getId() @ ".getText());");
-			return %ctrl;
 			
 			
 		case "int":
 		case "int":
 			%ctrl = new GuiTextEditCtrl(%fieldEdit)
 			%ctrl = new GuiTextEditCtrl(%fieldEdit)
@@ -400,8 +413,21 @@ function GuiEditorCtrlProperties::buildEdit(%this,%field,%fieldType,%fieldVal)
 			return %ctrl = %this.buildGuiProfileCtrl(%field, %fieldVal);
 			return %ctrl = %this.buildGuiProfileCtrl(%field, %fieldVal);
 			
 			
 		default:
 		default:
-			echo("Field type not handled");
-			%ctrl = 0;
+			// better lazy than complicated.
+			%ctrl = new GuiTextEditCtrl(%fieldEdit)
+			{
+				Text = %fieldVal;
+				Position = "160 0";
+				extent = "160 30";
+				horizSizing = "right";
+				vertSizing = "bottom";
+				visible = "1";
+				Profile = "GuiTextEditProfile";
+				
+			};
+			%ctrl.setFieldValue("AltCommand", "GuiEditorCtrlProperties.setData(" @ %field @ "," @ %ctrl.getId() @ ".getText());");
+			%ctrl.setFieldValue("Validate", "GuiEditorCtrlProperties.setData(" @ %field @ "," @ %ctrl.getId() @ ".getText());");
+			return %ctrl;
 	}
 	}
 	
 	
 }
 }
@@ -427,6 +453,12 @@ function GuiEditorCtrlProperties::buildGuiProfileCtrl(%this,%field,%fieldVal)
 		%obj = GuiDataGroup.getObject(%i);
 		%obj = GuiDataGroup.getObject(%i);
 		if(%obj.getClassName() $= "GuiControlProfile")
 		if(%obj.getClassName() $= "GuiControlProfile")
 		{
 		{
+			%cat = %obj.category;
+			if(%cat !$= "")
+			{
+				echo(%cat);
+			}
+			
 			if(%obj.getName() !$= "")
 			if(%obj.getName() !$= "")
 			{
 			{
 				%ctrl.add(%obj.getName(), 0);
 				%ctrl.add(%obj.getName(), 0);

+ 58 - 21
toybox/Sandbox/1/gui/guiProfiles.cs

@@ -71,6 +71,28 @@ function SetColorAlpha(%color, %newAlpha)
 
 
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 
 
+if(!isObject(GuiDefaultProfile)) new GuiControlProfile (GuiDefaultProfile)
+{
+    // fill color
+    fillColor = "0 0 0 0";
+
+    // font
+    fontType = $platformFontType;
+    fontSize = $platformFontSize;
+    fontColor = "255 255 255 255";
+	align = center;
+	vAlign = middle;
+
+	cursorColor = "0 0 0 255";
+
+	borderDefault = GuiDefaultBorderProfile;
+	borderTop = GuiDefaultBorderProfile;
+	borderLeft = GuiDefaultBorderProfile;
+	borderRight = GuiDefaultBorderProfile;
+	borderBottom = GuiDefaultBorderProfile;
+	category = "default";
+};
+
 new GuiCursor(DefaultCursor)
 new GuiCursor(DefaultCursor)
 {
 {
     hotSpot = "3 3";
     hotSpot = "3 3";
@@ -162,27 +184,6 @@ if (!isObject(GuiDarkBorderProfile)) new GuiBorderProfile (GuiDarkBorderProfile
 	borderColorNA = "0 0 0 50";
 	borderColorNA = "0 0 0 50";
 };
 };
 
 
-if(!isObject(GuiDefaultProfile)) new GuiControlProfile (GuiDefaultProfile)
-{
-    // fill color
-    fillColor = "0 0 0 0";
-
-    // font
-    fontType = $platformFontType;
-    fontSize = $platformFontSize;
-    fontColor = "255 255 255 255";
-	align = center;
-	vAlign = middle;
-
-	cursorColor = "0 0 0 255";
-
-	borderDefault = GuiDefaultBorderProfile;
-	borderTop = GuiDefaultBorderProfile;
-	borderLeft = GuiDefaultBorderProfile;
-	borderRight = GuiDefaultBorderProfile;
-	borderBottom = GuiDefaultBorderProfile;
-};
-
 if(!isObject(GuiPanelProfile)) new GuiControlProfile (GuiPanelProfile : GuiDefaultProfile)
 if(!isObject(GuiPanelProfile)) new GuiControlProfile (GuiPanelProfile : GuiDefaultProfile)
 {
 {
 	fillColor = $color1;
 	fillColor = $color1;
@@ -194,6 +195,7 @@ if(!isObject(GuiPanelProfile)) new GuiControlProfile (GuiPanelProfile : GuiDefau
 	borderBottom = GuiBrightBorderProfile;
 	borderBottom = GuiBrightBorderProfile;
 	borderLeft = GuiBrightBorderProfile;
 	borderLeft = GuiBrightBorderProfile;
 	borderRight = GuiBrightBorderProfile;
 	borderRight = GuiBrightBorderProfile;
+	category = "defaultPanel";
 };
 };
 
 
 if(!isObject(GuiListBoxProfile)) new GuiControlProfile (GuiListBoxProfile : GuiDefaultProfile)
 if(!isObject(GuiListBoxProfile)) new GuiControlProfile (GuiListBoxProfile : GuiDefaultProfile)
@@ -206,6 +208,7 @@ if(!isObject(GuiListBoxProfile)) new GuiControlProfile (GuiListBoxProfile : GuiD
 	align = left;
 	align = left;
 	tab = true;
 	tab = true;
 	canKeyFocus = true;
 	canKeyFocus = true;
+	category = "defaultListBox";
 };
 };
 
 
 if(!isObject(GuiWindowProfile)) new GuiControlProfile (GuiWindowProfile : GuiDefaultProfile)
 if(!isObject(GuiWindowProfile)) new GuiControlProfile (GuiWindowProfile : GuiDefaultProfile)
@@ -217,11 +220,45 @@ if(!isObject(GuiWindowProfile)) new GuiControlProfile (GuiWindowProfile : GuiDef
    bitmap = "./images/window";
    bitmap = "./images/window";
    fillColor = "37 36 35 255";
    fillColor = "37 36 35 255";
    fontColor = "white";
    fontColor = "white";
+   category = "defaultWindow";
 };
 };
 
 
 if(!isObject(GuiTransparentProfile)) new GuiControlProfile (GuiTransparentProfile : GuiDefaultProfile);
 if(!isObject(GuiTransparentProfile)) new GuiControlProfile (GuiTransparentProfile : GuiDefaultProfile);
 if(!isObject(GuiGridProfile)) new GuiControlProfile (GuiGridProfile : GuiDefaultProfile);
 if(!isObject(GuiGridProfile)) new GuiControlProfile (GuiGridProfile : GuiDefaultProfile);
 if(!isObject(GuiChainProfile)) new GuiControlProfile (GuiChainProfile : GuiDefaultProfile);
 if(!isObject(GuiChainProfile)) new GuiControlProfile (GuiChainProfile : GuiDefaultProfile);
+if(!isObject(GuiTabBookProfile)) new GuiControlProfile (GuiTabBookProfile : GuiDefaultProfile)
+{
+	fillColor = SetColorAlpha($color1, 100);
+	category = "defaultTabBook";
+};
+if(!isObject(GuiTabProfile)) new GuiControlProfile (GuiTabProfile : GuiDefaultProfile)
+{
+	fontColor = "255 255 255 255";
+    fontColorHL = "232 240 248 255";
+    fontColorSL= "255 255 255 255";
+    fontColorNA = "0 0 0 255";
+	fillColor = $color1;
+	fillColorHL = AdjustColorValue($color1, 10);
+	fillColorSL = AdjustColorValue($color1, 15);
+	fillColorNA = SetColorAlpha($color1, 100);
+	borderDefault = GuiDarkBorderProfile;
+	borderTop = GuiBrightBorderProfile;
+	borderBottom = GuiBrightBorderProfile;
+	borderLeft = GuiBrightBorderProfile;
+	borderRight = GuiBrightBorderProfile;
+	align = Center;
+	//bitmap = "./images/tab";
+	category = "defaultTab";
+};
+if(!isObject(GuiTabPageProfile)) new GuiControlProfile (GuiTabPageProfile : GuiDefaultProfile)
+{
+	fillColor = $color1;
+	fillColorHL = AdjustColorValue($color1, 10);
+	fillColorSL = AdjustColorValue($color1, 15);
+	fillColorNA = SetColorAlpha($color1, 100);
+	category = "defaultTabPage";
+};
+
 
 
 if(!isObject(GuiSpriteProfile)) new GuiControlProfile (GuiSpriteProfile : GuiDefaultProfile)
 if(!isObject(GuiSpriteProfile)) new GuiControlProfile (GuiSpriteProfile : GuiDefaultProfile)
 {
 {

BIN
toybox/Sandbox/1/gui/images/Camera.png


BIN
toybox/Sandbox/1/gui/images/iconLocked.png


BIN
toybox/Sandbox/1/gui/images/iconVisible.png


BIN
toybox/Sandbox/1/gui/images/tab.png


BIN
toybox/Sandbox/1/gui/images/tab1.png