Browse Source

whitespace

Thomas "elfprince13" Dickerson 8 years ago
parent
commit
bcc5459818
50 changed files with 2146 additions and 2146 deletions
  1. 13 13
      Engine/source/console/fieldBrushObject.cpp
  2. 75 75
      Engine/source/console/fileSystemFunctions.cpp
  3. 33 33
      Engine/source/console/persistenceManager.cpp
  4. 11 11
      Engine/source/console/scriptFilename.cpp
  5. 45 45
      Engine/source/console/scriptObjects.cpp
  6. 11 11
      Engine/source/console/sim.cpp
  7. 4 4
      Engine/source/console/simDictionary.cpp
  8. 1 1
      Engine/source/console/simDictionary.h
  9. 4 4
      Engine/source/console/simEvents.cpp
  10. 5 5
      Engine/source/console/simManager.cpp
  11. 10 10
      Engine/source/console/simObject.cpp
  12. 1 1
      Engine/source/console/simObject.h
  13. 23 23
      Engine/source/console/simObjectMemento.cpp
  14. 1 1
      Engine/source/console/simObjectMemento.h
  15. 7 7
      Engine/source/console/simPersistSet.cpp
  16. 7 7
      Engine/source/console/simSerialize.cpp
  17. 1 1
      Engine/source/console/stringStack.cpp
  18. 6 6
      Engine/source/console/telnetConsole.cpp
  19. 15 15
      Engine/source/console/telnetDebugger.cpp
  20. 28 28
      Engine/source/console/typeValidators.cpp
  21. 114 114
      Engine/source/environment/river.cpp
  22. 16 16
      Engine/source/gfx/gl/gfxGLStateBlock.cpp
  23. 1 1
      Engine/source/gfx/video/videoCapture.cpp
  24. 16 16
      Engine/source/gui/buttons/guiIconButtonCtrl.cpp
  25. 1 1
      Engine/source/gui/buttons/guiToggleButtonCtrl.cpp
  26. 1 1
      Engine/source/gui/containers/guiFormCtrl.cpp
  27. 8 8
      Engine/source/gui/containers/guiPaneCtrl.cpp
  28. 7 7
      Engine/source/gui/containers/guiRolloutCtrl.cpp
  29. 8 8
      Engine/source/gui/containers/guiWindowCtrl.cpp
  30. 68 68
      Engine/source/gui/controls/guiListBoxCtrl.cpp
  31. 26 26
      Engine/source/gui/controls/guiMLTextCtrl.cpp
  32. 79 79
      Engine/source/gui/controls/guiPopUpCtrl.cpp
  33. 150 150
      Engine/source/gui/controls/guiPopUpCtrlEx.cpp
  34. 20 20
      Engine/source/gui/controls/guiTextCtrl.cpp
  35. 69 69
      Engine/source/gui/controls/guiTextEditCtrl.cpp
  36. 187 187
      Engine/source/gui/controls/guiTreeViewCtrl.cpp
  37. 244 244
      Engine/source/gui/core/guiCanvas.cpp
  38. 12 12
      Engine/source/gui/editor/guiEditCtrl.cpp
  39. 124 124
      Engine/source/gui/editor/guiMenuBar.cpp
  40. 322 322
      Engine/source/gui/editor/guiParticleGraphCtrl.cpp
  41. 2 2
      Engine/source/gui/game/guiChunkedBitmapCtrl.cpp
  42. 11 11
      Engine/source/gui/worldEditor/undoActions.cpp
  43. 7 7
      Engine/source/lighting/lightManager.cpp
  44. 4 4
      Engine/source/navigation/navMesh.cpp
  45. 9 9
      Engine/source/platform/menus/popupMenu.cpp
  46. 22 22
      Engine/source/platform/profiler.cpp
  47. 1 1
      Engine/source/platformMac/macFileIO.mm
  48. 1 1
      Engine/source/renderInstance/renderPrePassMgr.cpp
  49. 3 3
      Engine/source/scene/sceneContainer.cpp
  50. 312 312
      Engine/source/sim/actionMap.cpp

+ 13 - 13
Engine/source/console/fieldBrushObject.cpp

@@ -109,15 +109,15 @@ void FieldBrushObject::destroyFields()
 static char replacebuf[1024];
 static char* suppressSpaces(const char* in_pname)
 {
-	U32 i = 0;
-	char chr;
-	do
-	{
-		chr = in_pname[i];
-		replacebuf[i++] = (chr != 32) ? chr : '_';
-	} while(chr);
-
-	return replacebuf;
+   U32 i = 0;
+   char chr;
+   do
+   {
+      chr = in_pname[i];
+      replacebuf[i++] = (chr != 32) ? chr : '_';
+   } while(chr);
+
+   return replacebuf;
 }
 
 //-----------------------------------------------------------------------------
@@ -125,7 +125,7 @@ static char* suppressSpaces(const char* in_pname)
 //-----------------------------------------------------------------------------
 DefineConsoleMethod(FieldBrushObject, queryGroups, const char*, (const char* simObjName), , "(simObject) Query available static-field groups for selected object./\n"
                                                                 "@param simObject Object to query static-field groups on.\n"
-			                                                    "@return Space-seperated static-field group list.")
+                                                             "@return Space-seperated static-field group list.")
 {
     // Fetch selected object.
     SimObject* pSimObject = dynamic_cast<SimObject*>( Sim::findObject( simObjName ) );
@@ -194,7 +194,7 @@ DefineConsoleMethod(FieldBrushObject, queryGroups, const char*, (const char* sim
 DefineConsoleMethod(FieldBrushObject, queryFields, const char*, (const char* simObjName, const char* groupList), (""), "(simObject, [groupList]) Query available static-fields for selected object./\n"
                                                                 "@param simObject Object to query static-fields on.\n"
                                                                 "@param groupList groups to filter static-fields against.\n"
-			                                                    "@return Space-seperated static-field list.")
+                                                             "@return Space-seperated static-field list.")
 {
     // Fetch selected object.
     SimObject* pSimObject = dynamic_cast<SimObject*>( Sim::findObject( simObjName ) );
@@ -369,7 +369,7 @@ DefineConsoleMethod(FieldBrushObject, queryFields, const char*, (const char* sim
 DefineConsoleMethod(FieldBrushObject, copyFields, void, (const char* simObjName, const char* pFieldList), (""), "(simObject, [fieldList]) Copy selected static-fields for selected object./\n"
                                                         "@param simObject Object to copy static-fields from.\n"
                                                         "@param fieldList fields to filter static-fields against.\n"
-			                                            "@return No return value.")
+                                                     "@return No return value.")
 {
     // Fetch selected object.
     SimObject* pSimObject = dynamic_cast<SimObject*>( Sim::findObject( simObjName ) );
@@ -502,7 +502,7 @@ void FieldBrushObject::copyFields( SimObject* pSimObject, const char* fieldList
 //-----------------------------------------------------------------------------
 DefineConsoleMethod(FieldBrushObject, pasteFields, void, (const char* simObjName), , "(simObject) Paste copied static-fields to selected object./\n"
                                                         "@param simObject Object to paste static-fields to.\n"
-			                                            "@return No return value.")
+                                                     "@return No return value.")
 {
     // Fetch selected object.
     SimObject* pSimObject = dynamic_cast<SimObject*>( Sim::findObject( simObjName ) );

+ 75 - 75
Engine/source/console/fileSystemFunctions.cpp

@@ -210,7 +210,7 @@ DefineEngineFunction( findNextFile, String, ( const char* pattern ), ( "" ),
 //-----------------------------------------------------------------------------
 
 DefineEngineFunction( getFileCount, S32, ( const char* pattern, bool recurse ), ( "", true ),
-	"@brief Returns the number of files in the directory tree that match the given patterns\n\n"
+   "@brief Returns the number of files in the directory tree that match the given patterns\n\n"
 
    "This function differs from getFileCountMultiExpr() in that it supports a single search "
    "pattern being passed in.\n\n"
@@ -246,7 +246,7 @@ DefineEngineFunction( getFileCount, S32, ( const char* pattern, bool recurse ),
 //-----------------------------------------------------------------------------
 
 DefineEngineFunction(findFirstFileMultiExpr, String, ( const char* pattern, bool recurse ), ( "", true),
-	"@brief Returns the first file in the directory system matching the given patterns.\n\n"
+   "@brief Returns the first file in the directory system matching the given patterns.\n\n"
 
    "Use the corresponding findNextFileMultiExpr() to step through "
    "the results.  If you're only interested in the number of files returned by the "
@@ -259,10 +259,10 @@ DefineEngineFunction(findFirstFileMultiExpr, String, ( const char* pattern, bool
    "call to findFirstFile() and findFirstFileMultiExpr() initiates a new search and renders "
    "a previous search invalid.\n\n"
 
-	"@param pattern The path and file name pattern to match against, such as *.cs.  Separate "
+   "@param pattern The path and file name pattern to match against, such as *.cs.  Separate "
    "multiple patterns with TABs.  For example: \"*.cs\" TAB \"*.dso\"\n"
-	"@param recurse If true, the search will exhaustively recurse into subdirectories "
-	"of the given path and match the given filename patterns.\n"
+   "@param recurse If true, the search will exhaustively recurse into subdirectories "
+   "of the given path and match the given filename patterns.\n"
    "@return String of the first matching file path, or an empty string if no matching "
    "files were found.\n\n"
 
@@ -280,7 +280,7 @@ DefineEngineFunction(findFirstFileMultiExpr, String, ( const char* pattern, bool
    "@see findNextFileMultiExpr()"
    "@see getFileCountMultiExpr()"
    "@see findFirstFile()"
-	"@ingroup FileSearches")
+   "@ingroup FileSearches")
 {
    S32 numResults = buildFileList(pattern, recurse, true);
 
@@ -302,7 +302,7 @@ DefineEngineFunction(findFirstFileMultiExpr, String, ( const char* pattern, bool
 DefineEngineFunction(findNextFileMultiExpr, String, ( const char* pattern ), (""),
    "@brief Returns the next file matching a search begun in findFirstFileMultiExpr().\n\n"
 
-	"@param pattern The path and file name pattern to match against.  This is optional "
+   "@param pattern The path and file name pattern to match against.  This is optional "
    "and may be left out as it is not used by the code.  It is here for legacy reasons.\n"
    "@return String of the next matching file path, or an empty string if no matching "
    "files were found.\n\n"
@@ -319,7 +319,7 @@ DefineEngineFunction(findNextFileMultiExpr, String, ( const char* pattern ), (""
    "@endtsexample\n\n"
 
    "@see findFirstFileMultiExpr()"
-	"@ingroup FileSearches")
+   "@ingroup FileSearches")
 {
    if ( sgFindFilesPos + 1 > sgFindFilesResults.size() )
       return String();
@@ -328,16 +328,16 @@ DefineEngineFunction(findNextFileMultiExpr, String, ( const char* pattern ), (""
 }
 
 DefineEngineFunction(getFileCountMultiExpr, S32, ( const char* pattern, bool recurse ), ( "", true),
-	"@brief Returns the number of files in the directory tree that match the given patterns\n\n"
+   "@brief Returns the number of files in the directory tree that match the given patterns\n\n"
 
    "If you're interested in a list of files that match the given patterns and not just "
    "the number of files, use findFirstFileMultiExpr() and findNextFileMultiExpr().\n\n"
 
-	"@param pattern The path and file name pattern to match against, such as *.cs.  Separate "
+   "@param pattern The path and file name pattern to match against, such as *.cs.  Separate "
    "multiple patterns with TABs.  For example: \"*.cs\" TAB \"*.dso\"\n"
-	"@param recurse If true, the search will exhaustively recurse into subdirectories "
-	"of the given path and match the given filename pattern.\n"
-	"@return Number of files located using the patterns\n\n"
+   "@param recurse If true, the search will exhaustively recurse into subdirectories "
+   "of the given path and match the given filename pattern.\n"
+   "@return Number of files located using the patterns\n\n"
 
    "@tsexample\n"
       "// Count all DTS or Collada models\n"
@@ -347,7 +347,7 @@ DefineEngineFunction(getFileCountMultiExpr, S32, ( const char* pattern, bool rec
 
    "@see findFirstFileMultiExpr()"
    "@see findNextFileMultiExpr()"
-	"@ingroup FileSearches")
+   "@ingroup FileSearches")
 {
    S32 numResults = buildFileList(pattern, recurse, true);
 
@@ -399,14 +399,14 @@ DefineEngineFunction(isFile, bool, ( const char* fileName ),,
 }
 
 DefineEngineFunction( IsDirectory, bool, ( const char* directory ),,
-	"@brief Determines if a specified directory exists or not\n\n"
+   "@brief Determines if a specified directory exists or not\n\n"
 
-	"@param directory String containing path in the form of \"foo/bar\"\n"
+   "@param directory String containing path in the form of \"foo/bar\"\n"
    "@return Returns true if the directory was found.\n"
 
-	"@note Do not include a trailing slash '/'.\n"
+   "@note Do not include a trailing slash '/'.\n"
 
-	"@ingroup FileSystem")
+   "@ingroup FileSystem")
 {
    String dir(Torque::Path::CleanSeparators(directory));
    Con::expandScriptFilename(sgScriptFilenameBuffer, sizeof(sgScriptFilenameBuffer), dir.c_str());
@@ -416,12 +416,12 @@ DefineEngineFunction( IsDirectory, bool, ( const char* directory ),,
 }
 
 DefineEngineFunction(isWriteableFileName, bool, ( const char* fileName ),,
-	"@brief Determines if a file name can be written to using File I/O\n\n"
+   "@brief Determines if a file name can be written to using File I/O\n\n"
 
-	"@param fileName Name and path of file to check\n"
-	"@return Returns true if the file can be written to.\n"
+   "@param fileName Name and path of file to check\n"
+   "@return Returns true if the file can be written to.\n"
 
-	"@ingroup FileSystem")
+   "@ingroup FileSystem")
 {
    String filename(Torque::Path::CleanSeparators(fileName));
    Con::expandScriptFilename(sgScriptFilenameBuffer, sizeof(sgScriptFilenameBuffer), filename.c_str());
@@ -434,32 +434,32 @@ DefineEngineFunction(isWriteableFileName, bool, ( const char* fileName ),,
 }
 
 DefineEngineFunction(startFileChangeNotifications, void, (),,
-	"@brief Start watching resources for file changes\n\n"
+   "@brief Start watching resources for file changes\n\n"
    "Typically this is called during initializeCore().\n\n"
    "@see stopFileChangeNotifications()\n"
-	"@ingroup FileSystem")
+   "@ingroup FileSystem")
 {
    Torque::FS::StartFileChangeNotifications();
 }
 
 DefineEngineFunction(stopFileChangeNotifications, void, (),,
-	"@brief Stop watching resources for file changes\n\n"
+   "@brief Stop watching resources for file changes\n\n"
    "Typically this is called during shutdownCore().\n\n"
    "@see startFileChangeNotifications()\n"
-	"@ingroup FileSystem")
+   "@ingroup FileSystem")
 {
    Torque::FS::StopFileChangeNotifications();
 }
 
 
 DefineEngineFunction(getDirectoryList, String, ( const char* path, S32 depth ), ( "", 0 ),
-	"@brief Gathers a list of directories starting at the given path.\n\n"
+   "@brief Gathers a list of directories starting at the given path.\n\n"
 
-	"@param path String containing the path of the directory\n"
-	"@param depth Depth of search, as in how many subdirectories to parse through\n"
-	"@return Tab delimited string containing list of directories found during search, \"\" if no files were found\n"
+   "@param path String containing the path of the directory\n"
+   "@param depth Depth of search, as in how many subdirectories to parse through\n"
+   "@return Tab delimited string containing list of directories found during search, \"\" if no files were found\n"
 
-	"@ingroup FileSystem")
+   "@ingroup FileSystem")
 {
    // Grab the full path.
    char fullpath[1024];
@@ -508,23 +508,23 @@ DefineEngineFunction(getDirectoryList, String, ( const char* path, S32 depth ),
 }
 
 DefineEngineFunction(fileSize, S32, ( const char* fileName ),,
-	"@brief Determines the size of a file on disk\n\n"
+   "@brief Determines the size of a file on disk\n\n"
 
-	"@param fileName Name and path of the file to check\n"
-	"@return Returns filesize in bytes, or -1 if no file\n"
+   "@param fileName Name and path of the file to check\n"
+   "@return Returns filesize in bytes, or -1 if no file\n"
 
-	"@ingroup FileSystem")
+   "@ingroup FileSystem")
 {
    Con::expandScriptFilename(sgScriptFilenameBuffer, sizeof(sgScriptFilenameBuffer), fileName);
    return Platform::getFileSize( sgScriptFilenameBuffer );
 }
 
 DefineEngineFunction( fileModifiedTime, String, ( const char* fileName ),,
-	"@brief Returns a platform specific formatted string with the last modified time for the file.\n\n"
+   "@brief Returns a platform specific formatted string with the last modified time for the file.\n\n"
 
-	"@param fileName Name and path of file to check\n"
-	"@return Formatted string (OS specific) containing modified time, \"9/3/2010 12:33:47 PM\" for example\n"
-	"@ingroup FileSystem")
+   "@param fileName Name and path of file to check\n"
+   "@return Formatted string (OS specific) containing modified time, \"9/3/2010 12:33:47 PM\" for example\n"
+   "@ingroup FileSystem")
 {
    Con::expandScriptFilename(sgScriptFilenameBuffer, sizeof(sgScriptFilenameBuffer), fileName);
 
@@ -566,12 +566,12 @@ DefineEngineFunction( fileCreatedTime, String, ( const char* fileName ),,
 }
 
 DefineEngineFunction(fileDelete, bool, ( const char* path ),,
-	"@brief Delete a file from the hard drive\n\n"
+   "@brief Delete a file from the hard drive\n\n"
 
-	"@param path Name and path of the file to delete\n"
-	"@note THERE IS NO RECOVERY FROM THIS. Deleted file is gone for good.\n"
-	"@return True if file was successfully deleted\n"
-	"@ingroup FileSystem")
+   "@param path Name and path of the file to delete\n"
+   "@note THERE IS NO RECOVERY FROM THIS. Deleted file is gone for good.\n"
+   "@return True if file was successfully deleted\n"
+   "@ingroup FileSystem")
 {
    static char fileName[1024];
    static char sandboxFileName[1024];
@@ -586,11 +586,11 @@ DefineEngineFunction(fileDelete, bool, ( const char* path ),,
 //----------------------------------------------------------------
 
 DefineEngineFunction(fileExt, String, ( const char* fileName ),,
-	"@brief Get the extension of a file\n\n"
+   "@brief Get the extension of a file\n\n"
 
-	"@param fileName Name and path of file\n"
-	"@return String containing the extension, such as \".exe\" or \".cs\"\n"
-	"@ingroup FileSystem")
+   "@param fileName Name and path of file\n"
+   "@return String containing the extension, such as \".exe\" or \".cs\"\n"
+   "@ingroup FileSystem")
 {
    const char *ret = dStrrchr(fileName, '.');
    if(ret)
@@ -626,11 +626,11 @@ DefineEngineFunction(fileBase, String, ( const char* fileName ),,
 }
 
 DefineEngineFunction(fileName, String, ( const char* fileName ),,
-	"@brief Get only the file name of a path and file name string (removes path)\n\n"
+   "@brief Get only the file name of a path and file name string (removes path)\n\n"
 
-	"@param fileName Name and path of file to check\n"
-	"@return String containing the file name, minus the path\n"
-	"@ingroup FileSystem")
+   "@param fileName Name and path of file to check\n"
+   "@return String containing the file name, minus the path\n"
+   "@ingroup FileSystem")
 {
    S32 pathLen = dStrlen( fileName );
    FrameTemp<char> szPathCopy( pathLen + 1);
@@ -649,11 +649,11 @@ DefineEngineFunction(fileName, String, ( const char* fileName ),,
 }
 
 DefineEngineFunction(filePath, String, ( const char* fileName ),,
-	"@brief Get the path of a file (removes name and extension)\n\n"
+   "@brief Get the path of a file (removes name and extension)\n\n"
 
-	"@param fileName Name and path of file to check\n"
-	"@return String containing the path, minus name and extension\n"
-	"@ingroup FileSystem")
+   "@param fileName Name and path of file to check\n"
+   "@return String containing the path, minus name and extension\n"
+   "@ingroup FileSystem")
 {
    S32 pathLen = dStrlen( fileName );
    FrameTemp<char> szPathCopy( pathLen + 1);
@@ -672,10 +672,10 @@ DefineEngineFunction(filePath, String, ( const char* fileName ),,
 }
 
 DefineEngineFunction(getWorkingDirectory, String, (),,
-	"@brief Reports the current directory\n\n"
+   "@brief Reports the current directory\n\n"
 
-	"@return String containing full file path of working directory\n"
-	"@ingroup FileSystem")
+   "@return String containing full file path of working directory\n"
+   "@ingroup FileSystem")
 {
    return Platform::getCurrentDirectory();
 }
@@ -687,13 +687,13 @@ DefineEngineFunction(getWorkingDirectory, String, (),,
 // are not currently built with TORQUE_TOOLS defined.
 
 DefineEngineFunction(makeFullPath, String, ( const char* path, const char* cwd ), ( "", ""),
-	"@brief Converts a relative file path to a full path\n\n"
+   "@brief Converts a relative file path to a full path\n\n"
 
-	"For example, \"./console.log\" becomes \"C:/Torque/t3d/examples/FPS Example/game/console.log\"\n"
-	"@param path Name of file or path to check\n"
+   "For example, \"./console.log\" becomes \"C:/Torque/t3d/examples/FPS Example/game/console.log\"\n"
+   "@param path Name of file or path to check\n"
    "@param cwd Optional current working directory from which to build the full path.\n"
-	"@return String containing non-relative directory of path\n"
-	"@ingroup FileSystem")
+   "@return String containing non-relative directory of path\n"
+   "@ingroup FileSystem")
 {
    static const U32 bufSize = 512;
    char *buf = Con::getReturnBuffer(bufSize);
@@ -702,25 +702,25 @@ DefineEngineFunction(makeFullPath, String, ( const char* path, const char* cwd )
 }
 
 DefineEngineFunction(makeRelativePath, String, ( const char* path, const char* to ), ( "", ""),
-	"@brief Turns a full or local path to a relative one\n\n"
+   "@brief Turns a full or local path to a relative one\n\n"
 
    "For example, \"./game/art\" becomes \"game/art\"\n"
    "@param path Full path (may include a file) to convert\n"
    "@param to Optional base path used for the conversion.  If not supplied the current "
    "working directory is used.\n"
-	"@returns String containing relative path\n"
-	"@ingroup FileSystem")
+   "@returns String containing relative path\n"
+   "@ingroup FileSystem")
 {
    return Platform::makeRelativePathName( path, dStrlen(to) > 1 ? to : NULL );
 }
 
 DefineEngineFunction(pathConcat, String, ( const char* path, const char* file), ( "", ""),
-	"@brief Combines two separate strings containing a file path and file name together into a single string\n\n"
+   "@brief Combines two separate strings containing a file path and file name together into a single string\n\n"
 
-	"@param path String containing file path\n"
-	"@param file String containing file name\n"
-	"@return String containing concatenated file name and path\n"
-	"@ingroup FileSystem")
+   "@param path String containing file path\n"
+   "@param file String containing file name\n"
+   "@return String containing concatenated file name and path\n"
+   "@ingroup FileSystem")
 {
    static const U32 bufSize = 1024;
    char *buf = Con::getReturnBuffer(bufSize);
@@ -731,10 +731,10 @@ DefineEngineFunction(pathConcat, String, ( const char* path, const char* file),
 //-----------------------------------------------------------------------------
 
 DefineEngineFunction(getExecutableName, String, (),,
-	"@brief Gets the name of the game's executable\n\n"
+   "@brief Gets the name of the game's executable\n\n"
 
-	"@return String containing this game's executable name\n"
-	"@ingroup FileSystem")
+   "@return String containing this game's executable name\n"
+   "@ingroup FileSystem")
 {
    return Platform::getExecutableName();
 }

+ 33 - 33
Engine/source/console/persistenceManager.cpp

@@ -34,22 +34,22 @@
 IMPLEMENT_CONOBJECT(PersistenceManager);
 
 ConsoleDocClass( PersistenceManager,
-				"@brief this class manages updating SimObjects in the file they were "
-				"created in non-destructively (mostly aimed at datablocks and materials).\n\n"
-
-				"Basic scripting interface:\n\n"
-				"	- Creation: new PersistenceManager(FooManager);\n"
-				"	- Flag objects as dirty: FooManager.setDirty(<object name or id>);\n"
-				"	- Remove objects from dirty list: FooManager.removeDirty(<object name or id>);\n"
-				"	- List all currently dirty objects: FooManager.listDirty();\n"
-				"	- Check to see if an object is dirty: FooManager.isDirty(<object name or id>);\n"
-				"	- Save dirty objects to their files: FooManager.saveDirty();\n\n"
-				"@note Dirty objects don't update their files until saveDirty() is "
-				"called so you can change their properties after you flag them as dirty\n\n"
-				"@note Currently only used by editors, not intended for actual game development\n\n"
-				"@ingroup Console\n"
-				"@ingroup Editors\n"
-				"@internal");
+            "@brief this class manages updating SimObjects in the file they were "
+            "created in non-destructively (mostly aimed at datablocks and materials).\n\n"
+
+            "Basic scripting interface:\n\n"
+            "  - Creation: new PersistenceManager(FooManager);\n"
+            "  - Flag objects as dirty: FooManager.setDirty(<object name or id>);\n"
+            "  - Remove objects from dirty list: FooManager.removeDirty(<object name or id>);\n"
+            "  - List all currently dirty objects: FooManager.listDirty();\n"
+            "  - Check to see if an object is dirty: FooManager.isDirty(<object name or id>);\n"
+            "  - Save dirty objects to their files: FooManager.saveDirty();\n\n"
+            "@note Dirty objects don't update their files until saveDirty() is "
+            "called so you can change their properties after you flag them as dirty\n\n"
+            "@note Currently only used by editors, not intended for actual game development\n\n"
+            "@ingroup Console\n"
+            "@ingroup Editors\n"
+            "@internal");
 
 PersistenceManager::PersistenceManager()
 {
@@ -890,7 +890,7 @@ PersistenceManager::ParsedObject* PersistenceManager::findParsedObject(SimObject
          {
             const ParsedProperty &prop = testObj->properties[j];
 
-            if (	dStrcmp( prop.name, "internalName" ) == 0 && 
+            if (  dStrcmp( prop.name, "internalName" ) == 0 && 
                dStrcmp( prop.value, object->getInternalName() ) == 0 )
                return testObj;
             else if ( dStrcmp(prop.name, "internalName") == 0)
@@ -2037,24 +2037,24 @@ bool PersistenceManager::saveDirtyObject(SimObject* object)
             const char *name = object->getName();
             if (name)
             {
-			      Con::errorf("PersistenceManager::saveDirtyObject(): Unable to open %s to save %s %s (%d)",
-				      dirtyObject.fileName, object->getClassName(), name, object->getId());
-		      }
-		      else
-		      {
-			      Con::errorf("PersistenceManager::saveDirtyObject(): Unable to open %s to save %s (%d)",
-				      dirtyObject.fileName, object->getClassName(), object->getId());
-		      }
-
-		      return false;
-		   }
+               Con::errorf("PersistenceManager::saveDirtyObject(): Unable to open %s to save %s %s (%d)",
+                  dirtyObject.fileName, object->getClassName(), name, object->getId());
+            }
+            else
+            {
+               Con::errorf("PersistenceManager::saveDirtyObject(): Unable to open %s to save %s (%d)",
+                  dirtyObject.fileName, object->getClassName(), object->getId());
+            }
+
+            return false;
+         }
 
          // if the file exists then lets update and save
-		   if(mCurrentFile)
-		   {
-		      updateObject(object);
+         if(mCurrentFile)
+         {
+            updateObject(object);
             saveDirtyFile();
-		   }
+         }
          
          break;
       }
@@ -2230,7 +2230,7 @@ DefineConsoleMethod( PersistenceManager, removeDirty, void, ( const char * objNa
               "Remove a SimObject from the dirty list.")
 {
    SimObject *dirtyObject = NULL;
-	if (dStrcmp(  objName,"")!=0)
+   if (dStrcmp(  objName,"")!=0)
    {
       if (!Sim::findObject(objName, dirtyObject))
       {

+ 11 - 11
Engine/source/console/scriptFilename.cpp

@@ -343,10 +343,10 @@ bool collapseScriptFilename(char *filename, U32 size, const char *src)
 //-----------------------------------------------------------------------------
 
 ConsoleFunction(expandFilename, const char*, 2, 2, "(string filename)"
-				"@brief Grabs the full path of a specified file\n\n"
-				"@param filename Name of the local file to locate\n"
-				"@return String containing the full filepath on disk\n"
-				"@ingroup FileSystem")
+            "@brief Grabs the full path of a specified file\n\n"
+            "@param filename Name of the local file to locate\n"
+            "@return String containing the full filepath on disk\n"
+            "@ingroup FileSystem")
 {
    TORQUE_UNUSED(argc);
    static const U32 bufSize = 1024;
@@ -356,9 +356,9 @@ ConsoleFunction(expandFilename, const char*, 2, 2, "(string filename)"
 }
 
 ConsoleFunction(expandOldFilename, const char*, 2, 2, "(string filename)"
-				"@brief Retrofits a filepath that uses old Torque style\n\n"
-				"@return String containing filepath with new formatting\n"
-				"@ingroup FileSystem")
+            "@brief Retrofits a filepath that uses old Torque style\n\n"
+            "@return String containing filepath with new formatting\n"
+            "@ingroup FileSystem")
 {
    TORQUE_UNUSED(argc);
    static const U32 bufSize = 1024;
@@ -372,7 +372,7 @@ ConsoleFunction(expandOldFilename, const char*, 2, 2, "(string filename)"
 //-----------------------------------------------------------------------------
 
 ConsoleToolFunction(collapseFilename, const char*, 2, 2, "(string filename)"
-					"@internal Editor use only")
+               "@internal Editor use only")
 {
    TORQUE_UNUSED(argc);
    static const U32 bufSize = 1024;
@@ -382,7 +382,7 @@ ConsoleToolFunction(collapseFilename, const char*, 2, 2, "(string filename)"
 }
 
 ConsoleToolFunction(setScriptPathExpando, void, 3, 4, "(string expando, string path[, bool toolsOnly])"
-					"@internal Editor use only")
+               "@internal Editor use only")
 {
    if(argc == 4)
       Con::setScriptPathExpando(argv[1], argv[2], dAtob(argv[3]));
@@ -391,13 +391,13 @@ ConsoleToolFunction(setScriptPathExpando, void, 3, 4, "(string expando, string p
 }
 
 ConsoleToolFunction(removeScriptPathExpando, void, 2, 2, "(string expando)"
-					"@internal Editor use only")
+               "@internal Editor use only")
 {
    Con::removeScriptPathExpando(argv[1]);
 }
 
 ConsoleToolFunction(isScriptPathExpando, bool, 2, 2, "(string expando)"
-					"@internal Editor use only")
+               "@internal Editor use only")
 {
    return Con::isScriptPathExpando(argv[1]);
 }

+ 45 - 45
Engine/source/console/scriptObjects.cpp

@@ -53,13 +53,13 @@ ConsoleDocClass( ScriptObject,
 );
 
 IMPLEMENT_CALLBACK( ScriptObject, onAdd, void, ( SimObjectId ID ), ( ID ),
-	"Called when this ScriptObject is added to the system.\n"
-	"@param ID Unique object ID assigned when created (%this in script).\n"
+   "Called when this ScriptObject is added to the system.\n"
+   "@param ID Unique object ID assigned when created (%this in script).\n"
 );
 
 IMPLEMENT_CALLBACK( ScriptObject, onRemove, void, ( SimObjectId ID ), ( ID ),
-	"Called when this ScriptObject is removed from the system.\n"
-	"@param ID Unique object ID assigned when created (%this in script).\n"
+   "Called when this ScriptObject is removed from the system.\n"
+   "@param ID Unique object ID assigned when created (%this in script).\n"
 );
 
 ScriptObject::ScriptObject()
@@ -105,18 +105,18 @@ ConsoleDocClass( ScriptTickObject,
 );
 
 IMPLEMENT_CALLBACK( ScriptTickObject, onInterpolateTick, void, ( F32 delta ), ( delta ),
-	"This is called every frame, but only if the object is set to process ticks.\n"
-	"@param delta The time delta for this frame.\n"
+   "This is called every frame, but only if the object is set to process ticks.\n"
+   "@param delta The time delta for this frame.\n"
 );
 
 IMPLEMENT_CALLBACK( ScriptTickObject, onProcessTick, void, (), (),
-	"Called once every 32ms if this object is set to process ticks.\n"
+   "Called once every 32ms if this object is set to process ticks.\n"
 );
 
 IMPLEMENT_CALLBACK( ScriptTickObject, onAdvanceTime, void, ( F32 timeDelta ), ( timeDelta ),
-	"This is called every frame regardless if the object is set to process ticks, but only "
+   "This is called every frame regardless if the object is set to process ticks, but only "
    "if the callOnAdvanceTime property is set to true.\n"
-	"@param timeDelta The time delta for this frame.\n"
+   "@param timeDelta The time delta for this frame.\n"
    "@see callOnAdvanceTime\n"
 );
 
@@ -188,37 +188,37 @@ DefineEngineMethod( ScriptTickObject, isProcessingTicks, bool, ( ),,
 IMPLEMENT_CONOBJECT(ScriptGroup);
 
 ConsoleDocClass( ScriptGroup,
-		"@brief Essentially a SimGroup, but with onAdd and onRemove script callbacks.\n\n"
-
-		"@tsexample\n"
-		"// First container, SimGroup containing a ScriptGroup\n"
-		"new SimGroup(Scenes)\n"
-		"{\n"
-		"	// Subcontainer, ScriptGroup containing variables\n"
-		"	// related to a cut scene and a starting WayPoint\n"
-		"	new ScriptGroup(WelcomeScene)\n"
-		"	{\n"
-		"		class = \"Scene\";\n"
-		"		pathName = \"Pathx\";\n"
-		"		description = \"A small orc village set in the Hardesty mountains. This town and its surroundings will be used to illustrate some the Torque Game Engine\'s features.\";\n"
-		"		pathTime = \"0\";\n"
-		"		title = \"Welcome to Orc Town\";\n\n"
-		"		new WayPoint(start)\n"
-		"		{\n"
-		"			position = \"163.873 -103.82 208.354\";\n"
-		"			rotation = \"0.136165 -0.0544916 0.989186 44.0527\";\n"
-		"			scale = \"1 1 1\";\n"
-		"			dataBlock = \"WayPointMarker\";\n"
-		"			team = \"0\";\n"
-		"		};\n"
-		"	};\n"
-		"};\n"
-		"@endtsexample\n\n"
-
-		"@see SimGroup\n"
-
-		"@ingroup Console\n"
-		"@ingroup Scripting"
+      "@brief Essentially a SimGroup, but with onAdd and onRemove script callbacks.\n\n"
+
+      "@tsexample\n"
+      "// First container, SimGroup containing a ScriptGroup\n"
+      "new SimGroup(Scenes)\n"
+      "{\n"
+      "  // Subcontainer, ScriptGroup containing variables\n"
+      "  // related to a cut scene and a starting WayPoint\n"
+      "  new ScriptGroup(WelcomeScene)\n"
+      "  {\n"
+      "     class = \"Scene\";\n"
+      "     pathName = \"Pathx\";\n"
+      "     description = \"A small orc village set in the Hardesty mountains. This town and its surroundings will be used to illustrate some the Torque Game Engine\'s features.\";\n"
+      "     pathTime = \"0\";\n"
+      "     title = \"Welcome to Orc Town\";\n\n"
+      "     new WayPoint(start)\n"
+      "     {\n"
+      "        position = \"163.873 -103.82 208.354\";\n"
+      "        rotation = \"0.136165 -0.0544916 0.989186 44.0527\";\n"
+      "        scale = \"1 1 1\";\n"
+      "        dataBlock = \"WayPointMarker\";\n"
+      "        team = \"0\";\n"
+      "     };\n"
+      "  };\n"
+      "};\n"
+      "@endtsexample\n\n"
+
+      "@see SimGroup\n"
+
+      "@ingroup Console\n"
+      "@ingroup Scripting"
 );
 
 ScriptGroup::ScriptGroup()
@@ -226,13 +226,13 @@ ScriptGroup::ScriptGroup()
 }
 
 IMPLEMENT_CALLBACK( ScriptGroup, onAdd, void, ( SimObjectId ID ), ( ID ),
-	"Called when this ScriptGroup is added to the system.\n"
-	"@param ID Unique object ID assigned when created (%this in script).\n" 
+   "Called when this ScriptGroup is added to the system.\n"
+   "@param ID Unique object ID assigned when created (%this in script).\n" 
 );
 
 IMPLEMENT_CALLBACK( ScriptGroup, onRemove, void, ( SimObjectId ID ), ( ID ),
-	"Called when this ScriptObject is removed from the system.\n"
-	"@param ID Unique object ID assigned when created (%this in script).\n" 
+   "Called when this ScriptObject is removed from the system.\n"
+   "@param ID Unique object ID assigned when created (%this in script).\n" 
 );
 
 bool ScriptGroup::onAdd()
@@ -248,7 +248,7 @@ bool ScriptGroup::onAdd()
 void ScriptGroup::onRemove()
 {
    // Call onRemove in script!
-	onRemove_callback(getId());
+   onRemove_callback(getId());
 
    Parent::onRemove();
 }

+ 11 - 11
Engine/source/console/sim.cpp

@@ -139,7 +139,7 @@ DefineConsoleFunction( spawnObject, S32, (   const char * spawnClass
                                          ,   const char * spawnProperties
                                          ,   const char * spawnScript 
                                          ),("","","","") ,"spawnObject(class [, dataBlock, name, properties, script])"
-				"@hide")
+            "@hide")
 {
    SimObject* spawnObject = Sim::spawnObject(spawnClass, spawnDataBlock, spawnName, spawnProperties, spawnScript);
 
@@ -203,12 +203,12 @@ ConsoleFunction(schedule, S32, 4, 0, "schedule(time, refobject|0, command, <arg1
 }
 
 DefineConsoleFunction( getUniqueName, const char*, (const char * baseName), ,
-	"( String baseName )\n"
-	"@brief Returns a unique unused SimObject name based on a given base name.\n\n"
-	"@baseName Name to conver to a unique string if another instance exists\n"
-	"@note Currently only used by editors\n"
-	"@ingroup Editors\n"
-	"@internal")
+   "( String baseName )\n"
+   "@brief Returns a unique unused SimObject name based on a given base name.\n\n"
+   "@baseName Name to conver to a unique string if another instance exists\n"
+   "@note Currently only used by editors\n"
+   "@ingroup Editors\n"
+   "@internal")
 {
    String outName = Sim::getUniqueName( baseName );
    
@@ -247,10 +247,10 @@ DefineConsoleFunction( getUniqueInternalName, const char*, (const char * baseNam
 }
 
 DefineConsoleFunction( isValidObjectName, bool, (const char * name), , "( string name )"
-				"@brief Return true if the given name makes for a valid object name.\n\n"
-				"@param name Name of object\n"
-				"@return True if name is allowed, false if denied (usually because it starts with a number, _, or invalid character"
-				"@ingroup Console")
+            "@brief Return true if the given name makes for a valid object name.\n\n"
+            "@param name Name of object\n"
+            "@return True if name is allowed, false if denied (usually because it starts with a number, _, or invalid character"
+            "@ingroup Console")
 {
    return Sim::isValidObjectName( name );
 }

+ 4 - 4
Engine/source/console/simDictionary.cpp

@@ -150,7 +150,7 @@ void SimNameDictionary::remove(SimObject* obj)
       if(*walk == obj)
       {
          *walk = obj->nextNameObject;
-			obj->nextNameObject = (SimObject*)-1;
+         obj->nextNameObject = (SimObject*)-1;
          hashEntryCount--;
 
          Mutex::unlockMutex(mutex);
@@ -164,7 +164,7 @@ void SimNameDictionary::remove(SimObject* obj)
       root.erase(name);
 #endif
    Mutex::unlockMutex(mutex);
-}	
+}  
 
 //----------------------------------------------------------------------------
 
@@ -279,7 +279,7 @@ void SimManagerNameDictionary::remove(SimObject* obj)
       if(*walk == obj)
       {
          *walk = obj->nextManagerNameObject;
-			obj->nextManagerNameObject = (SimObject*)-1;
+         obj->nextManagerNameObject = (SimObject*)-1;
          hashEntryCount--;
 
          Mutex::unlockMutex(mutex);
@@ -293,7 +293,7 @@ void SimManagerNameDictionary::remove(SimObject* obj)
       root.erase(name);
 #endif
    Mutex::unlockMutex(mutex);
-}	
+}  
 
 //---------------------------------------------------------------------------
 //---------------------------------------------------------------------------

+ 1 - 1
Engine/source/console/simDictionary.h

@@ -61,7 +61,7 @@ struct StringTableEntryEq
    }
 };
 
-typedef std::unordered_map<StringTableEntry, SimObject*, StringTableEntryHash, StringTableEntryEq> StringDictDef;	
+typedef std::unordered_map<StringTableEntry, SimObject*, StringTableEntryHash, StringTableEntryEq> StringDictDef; 
 typedef std::unordered_map<SimObjectId, SimObject*> SimObjectIdDictDef;
 #endif
 

+ 4 - 4
Engine/source/console/simEvents.cpp

@@ -39,10 +39,10 @@ SimConsoleEvent::SimConsoleEvent(S32 argc, ConsoleValueRef *argv, bool onObject)
       mArgv[i].value = new ConsoleValue();
       mArgv[i].value->type = ConsoleValue::TypeInternalString;
       mArgv[i].value->init();
-	  if (argv)
-	  {
-		mArgv[i].value->setStringValue((const char*)argv[i]);
-	  }
+     if (argv)
+     {
+      mArgv[i].value->setStringValue((const char*)argv[i]);
+     }
    }
 }
 

+ 5 - 5
Engine/source/console/simManager.cpp

@@ -93,7 +93,7 @@ static void shutdownEventQueue()
 
 U32 postEvent(SimObject *destObject, SimEvent* event,U32 time)
 {
-	AssertFatal(time == -1 || time >= getCurrentTime(),
+   AssertFatal(time == -1 || time >= getCurrentTime(),
       "Sim::postEvent() - Event time must be greater than or equal to the current time." );
    AssertFatal(destObject, "Sim::postEvent() - Destination object for event doesn't exist.");
 
@@ -256,7 +256,7 @@ void advanceToTime(SimTime targetTime)
          event->process(obj);
       delete event;
    }
-	gCurrentTime = targetTime;
+   gCurrentTime = targetTime;
 
    Mutex::unlockMutex(gEventQueueMutex);
 }
@@ -393,7 +393,7 @@ SimObject* findObject(const char* name)
 
 SimObject* findObject(SimObjectId id)
 {
-	return gIdDictionary->find(id);
+   return gIdDictionary->find(id);
 }
 
 SimObject *spawnObject(String spawnClass, String spawnDataBlock, String spawnName,
@@ -600,7 +600,7 @@ SimDataBlockGroup::SimDataBlockGroup()
 
 S32 QSORT_CALLBACK SimDataBlockGroup::compareModifiedKey(const void* a,const void* b)
 {
-	const SimDataBlock* dba = *((const SimDataBlock**)a);
+   const SimDataBlock* dba = *((const SimDataBlock**)a);
    const SimDataBlock* dbb = *((const SimDataBlock**)b);
 
    return dba->getModifiedKey() - dbb->getModifiedKey();
@@ -612,6 +612,6 @@ void SimDataBlockGroup::sort()
    if(mLastModifiedKey != SimDataBlock::getNextModifiedKey())
    {
       mLastModifiedKey = SimDataBlock::getNextModifiedKey();
-    	dQsort(objectList.address(),objectList.size(),sizeof(SimObject *),compareModifiedKey);
+      dQsort(objectList.address(),objectList.size(),sizeof(SimObject *),compareModifiedKey);
    }
 }

+ 10 - 10
Engine/source/console/simObject.cpp

@@ -81,7 +81,7 @@ SimObject::SimObject()
    mFlags.set( ModStaticFields | ModDynamicFields );
 
    mFieldDictionary = NULL;
-   mCanSaveFieldDictionary	=	true;
+   mCanSaveFieldDictionary =  true;
 
    mClassName = NULL;
    mSuperClassName = NULL;
@@ -592,7 +592,7 @@ void SimObject::setDeclarationLine(U32 lineNumber)
 bool SimObject::registerObject()
 {
    AssertFatal( !mFlags.test( Added ), "reigsterObject - Object already registered!");
-	mFlags.clear(Deleted | Removed);
+   mFlags.clear(Deleted | Removed);
 
    if(smForceId)
    {
@@ -609,11 +609,11 @@ bool SimObject::registerObject()
    AssertFatal(Sim::gIdDictionary && Sim::gNameDictionary, 
       "SimObject::registerObject - tried to register an object before Sim::init()!");
 
-   Sim::gIdDictionary->insert(this);	
+   Sim::gIdDictionary->insert(this);   
 
    Sim::gNameDictionary->insert(this);
 
-	// Notify object
+   // Notify object
    bool ret = onAdd();
 
    if(!ret)
@@ -661,10 +661,10 @@ void SimObject::deleteObject()
 
 void SimObject::_destroySelf()
 {
-	AssertFatal( !isDeleted(), "SimObject::destroySelf - Object has already been deleted" );
-	AssertFatal( !isRemoved(), "SimObject::destroySelf - Object in the process of being removed" );
+   AssertFatal( !isDeleted(), "SimObject::destroySelf - Object has already been deleted" );
+   AssertFatal( !isRemoved(), "SimObject::destroySelf - Object in the process of being removed" );
 
-	mFlags.set( Deleted );
+   mFlags.set( Deleted );
 
    if( mFlags.test( Added ) )
       unregisterObject();
@@ -1308,7 +1308,7 @@ void SimObject::dumpClassHierarchy()
    while(pRep)
    {
       Con::warnf("%s ->", pRep->getClassName());
-      pRep	=	pRep->getParentClass();
+      pRep  =  pRep->getParentClass();
    }
 }
 
@@ -1376,7 +1376,7 @@ bool SimObject::isChildOfGroup(SimGroup* pGroup)
    if(pGroup == dynamic_cast<SimGroup*>(this))
       return true;
 
-   SimGroup* temp	=	mGroup;
+   SimGroup* temp =  mGroup;
    while(temp)
    {
       if(temp == pGroup)
@@ -2884,7 +2884,7 @@ DefineConsoleMethod( SimObject, isMemberOfClass, bool, ( const char* className )
          return true;
       }
 
-      pRep	=	pRep->getParentClass();
+      pRep  =  pRep->getParentClass();
    }
 
    return false;

+ 1 - 1
Engine/source/console/simObject.h

@@ -826,7 +826,7 @@ class SimObject: public ConsoleObject, public TamlCallbacks
       virtual bool readObject(Stream *stream);
       
       /// Set whether fields created at runtime should be saved. Default is true.
-      void setCanSaveDynamicFields( bool bCanSave ) { mCanSaveFieldDictionary	=	bCanSave; }
+      void setCanSaveDynamicFields( bool bCanSave ) { mCanSaveFieldDictionary =  bCanSave; }
       
       /// Get whether fields created at runtime should be saved. Default is true.
       bool getCanSaveDynamicFields( ) { return mCanSaveFieldDictionary;}

+ 23 - 23
Engine/source/console/simObjectMemento.cpp

@@ -30,7 +30,7 @@
 
 SimObjectMemento::SimObjectMemento()
    : mState( NULL ),
-		mIsDatablock( false )
+      mIsDatablock( false )
 {
 }
 
@@ -45,16 +45,16 @@ void SimObjectMemento::save( SimObject *object )
    dFree( mState );
    mObjectName = String::EmptyString;
 
-	// Use a stream to save the state.
+   // Use a stream to save the state.
    MemStream stream( 256 );
 
    U32 writeFlags = 0;
-	SimDataBlock* db = dynamic_cast<SimDataBlock*>(object);
-	if( !db )
-		stream.write( sizeof( "return " ) - 1, "return " );
-	else
+   SimDataBlock* db = dynamic_cast<SimDataBlock*>(object);
+   if( !db )
+      stream.write( sizeof( "return " ) - 1, "return " );
+   else
    {
-		mIsDatablock = true;
+      mIsDatablock = true;
 
       // Cull the datablock name from the output so that
       // we can easily replace it in case the datablock's name
@@ -64,7 +64,7 @@ void SimObjectMemento::save( SimObject *object )
 
       writeFlags |= SimObject::NoName;
    }
-	
+   
    object->write( stream, 0, writeFlags );
    stream.write( (UTF8)0 );
 
@@ -82,9 +82,9 @@ SimObject *SimObjectMemento::restore() const
    // TODO: We could potentially make this faster by
    // caching the CodeBlock generated from the string
 
-	SimObject* object;
-	if( !mIsDatablock )
-	{
+   SimObject* object;
+   if( !mIsDatablock )
+   {
       // Set the redefine behavior to automatically giving
       // the new objects unique names.  This will restore the
       // old names if they are still available or give reasonable
@@ -95,22 +95,22 @@ SimObject *SimObjectMemento::restore() const
 
       // Read the object.
 
-		const UTF8* result = Con::evaluate( mState );
+      const UTF8* result = Con::evaluate( mState );
 
       // Restore the redefine behavior.
 
       Con::setVariable( "$Con::redefineBehavior", oldRedefineBehavior );
 
-		if ( !result || !result[ 0 ] )
-			return NULL;
+      if ( !result || !result[ 0 ] )
+         return NULL;
 
       // Look up the object.
 
-		U32 objectId = dAtoi( result );
-		object = Sim::findObject( objectId );
-	}
-	else
-	{
+      U32 objectId = dAtoi( result );
+      object = Sim::findObject( objectId );
+   }
+   else
+   {
       String objectName = mObjectName;
 
       // For datablocks, it's getting a little complicated.  Datablock definitions cannot be used
@@ -140,16 +140,16 @@ SimObject *SimObjectMemento::restore() const
          dStrcpy( &tempBuffer[ numCharsToLeftParen + uniqueNameLen ], &mState[ numCharsToLeftParen ] );
       }
 
-		Con::evaluate( tempBuffer );
+      Con::evaluate( tempBuffer );
 
       if( tempBuffer != mState )
          dFree( tempBuffer );
 
       if( objectName == String::EmptyString )
-			return NULL;
+         return NULL;
 
-		object = Sim::findObject( objectName );
-	}
+      object = Sim::findObject( objectName );
+   }
 
    return object;
 }

+ 1 - 1
Engine/source/console/simObjectMemento.h

@@ -42,7 +42,7 @@ protected:
 
    /// The captured object's name.
    String mObjectName;
-	bool mIsDatablock;
+   bool mIsDatablock;
 
 public:
 

+ 7 - 7
Engine/source/console/simPersistSet.cpp

@@ -29,13 +29,13 @@
 IMPLEMENT_CONOBJECT( SimPersistSet );
 
 ConsoleDocClass( SimPersistSet,
-				"@brief A SimSet that can be safely persisted.\n\n"
-				"Uses SimPersistIDs to reference objects in the set "
-				"while persisted on disk.  This allows the set to resolve "
-				"its references no matter whether they are loaded before or "
-				"after the set is created.\n\n"
-				"Not intended for game development, for editors or internal use only.\n\n "
-				"@internal");
+            "@brief A SimSet that can be safely persisted.\n\n"
+            "Uses SimPersistIDs to reference objects in the set "
+            "while persisted on disk.  This allows the set to resolve "
+            "its references no matter whether they are loaded before or "
+            "after the set is created.\n\n"
+            "Not intended for game development, for editors or internal use only.\n\n "
+            "@internal");
 
 //-----------------------------------------------------------------------------
 

+ 7 - 7
Engine/source/console/simSerialize.cpp

@@ -213,18 +213,18 @@ SimObject *loadObjectStream(Stream *stream)
 //-----------------------------------------------------------------------------
 
 DefineEngineFunction(saveObject, bool, ( SimObject *object, const char *filename ),,
-				"@brief Serialize the object to a file.\n\n"
-				"@param object The object to serialize.\n"
-				"@param filename The file name and path.\n"
-				"@ingroup Console\n")
+            "@brief Serialize the object to a file.\n\n"
+            "@param object The object to serialize.\n"
+            "@param filename The file name and path.\n"
+            "@ingroup Console\n")
 {
    return object && Sim::saveObject(object, filename);
 }
 
 DefineEngineFunction(loadObject, SimObject*, ( const char *filename ),,
-				"@brief Loads a serialized object from a file.\n\n"
-				"@param Name and path to text file containing the object\n"
-				"@ingroup Console\n")
+            "@brief Loads a serialized object from a file.\n\n"
+            "@param Name and path to text file containing the object\n"
+            "@ingroup Console\n")
 {
    return Sim::loadObjectStream(filename);
 }

+ 1 - 1
Engine/source/console/stringStack.cpp

@@ -121,7 +121,7 @@ bool ConsoleValueStack::reserveValues(U32 count, ConsoleValueRef *outValues)
    //Con::printf("[%i]CSTK reserveValues %i", mStackPos, count);
    for (U32 i=0; i<count; i++)
    {
-	   outValues[i].value = &mStack[mStackPos+i];
+      outValues[i].value = &mStack[mStackPos+i];
    }
    mStackPos += count;
    return true;

+ 6 - 6
Engine/source/console/telnetConsole.cpp

@@ -67,17 +67,17 @@ DefineConsoleFunction( telnetSetParameters, void, ( int port, const char* consol
                 "@param consolePass Password for read/write access to console.\n"
                 "@param listenPass  Password for read access to console.\n"
                 "@param remoteEcho  [optional] Enable echoing back to the client, off by default.\n\n"
-				"@ingroup Debugging")
+            "@ingroup Debugging")
 {
    if (TelConsole)
-	   TelConsole->setTelnetParameters(port, consolePass, listenPass, remoteEcho);
+      TelConsole->setTelnetParameters(port, consolePass, listenPass, remoteEcho);
 }
 
 static void telnetCallback(U32 level, const char *consoleLine)
 {
    TORQUE_UNUSED(level);
    if (TelConsole)
-	  TelConsole->processConsoleLine(consoleLine);
+     TelConsole->processConsoleLine(consoleLine);
 }
 
 TelnetConsole::TelnetConsole()
@@ -121,9 +121,9 @@ void TelnetConsole::setTelnetParameters(S32 port, const char *telnetPassword, co
    mAcceptPort = port;
    if(mAcceptPort != -1 && mAcceptPort != 0)
    {
-	  NetAddress address;
-	  Net::getIdealListenAddress(&address);
-	  address.port = mAcceptPort;
+     NetAddress address;
+     Net::getIdealListenAddress(&address);
+     address.port = mAcceptPort;
 
       mAcceptSocket = Net::openSocket();
       Net::bindAddress(address, mAcceptSocket);

+ 15 - 15
Engine/source/console/telnetDebugger.cpp

@@ -115,8 +115,8 @@ MODULE_END;
 
 DefineConsoleFunction( dbgSetParameters, void, (S32 port, const char * password, bool waitForClient ), (false), "( int port, string password, bool waitForClient )"
                 "Open a debug server port on the specified port, requiring the specified password, "
-				"and optionally waiting for the debug client to connect.\n"
-				"@internal Primarily used for Torsion and other debugging tools")
+            "and optionally waiting for the debug client to connect.\n"
+            "@internal Primarily used for Torsion and other debugging tools")
 {
    if (TelDebugger)
    {
@@ -126,17 +126,17 @@ DefineConsoleFunction( dbgSetParameters, void, (S32 port, const char * password,
 
 DefineConsoleFunction( dbgIsConnected, bool, (), , "()"
                 "Returns true if a script debugging client is connected else return false.\n"
-				"@internal Primarily used for Torsion and other debugging tools")
+            "@internal Primarily used for Torsion and other debugging tools")
 {
    return TelDebugger && TelDebugger->isConnected();
 }
 
 DefineConsoleFunction( dbgDisconnect, void, (), , "()"
                 "Forcibly disconnects any attached script debugging client.\n"
-				"@internal Primarily used for Torsion and other debugging tools")
+            "@internal Primarily used for Torsion and other debugging tools")
 {
    if (TelDebugger)
-	   TelDebugger->disconnect();
+      TelDebugger->disconnect();
 }
 
 static void debuggerConsumer(U32 level, const char *line)
@@ -244,9 +244,9 @@ void TelnetDebugger::setDebugParameters(S32 port, const char *password, bool wai
    mAcceptPort = port;
    if(mAcceptPort != -1 && mAcceptPort != 0)
    {
-	  NetAddress address;
-	  Net::getIdealListenAddress(&address);
-	  address.port = mAcceptPort;
+     NetAddress address;
+     Net::getIdealListenAddress(&address);
+     address.port = mAcceptPort;
 
       mAcceptSocket = Net::openSocket();
       Net::bindAddress(address, mAcceptSocket);
@@ -588,7 +588,7 @@ void TelnetDebugger::addAllBreakpoints(CodeBlock *code)
       // TODO: This assumes that the OS file names are case 
       // insensitive... Torque needs a dFilenameCmp() function.
       if( dStricmp( cur->fileName, code->name ) == 0 )
-	   {
+      {
          cur->code = code;
 
          // Find the fist breakline starting from and
@@ -741,7 +741,7 @@ void TelnetDebugger::removeBreakpoint(const char *fileName, S32 line)
    {
       Breakpoint *brk = *bp;
       *bp = brk->next;
-	  if ( brk->code )
+     if ( brk->code )
           brk->code->clearBreakpoint(brk->lineNumber);
       dFree(brk->testExpression);
       delete brk;
@@ -754,7 +754,7 @@ void TelnetDebugger::removeAllBreakpoints()
    while(walk)
    {
       Breakpoint *temp = walk->next;
-	  if ( walk->code )
+     if ( walk->code )
           walk->code->clearBreakpoint(walk->lineNumber);
       dFree(walk->testExpression);
       delete walk;
@@ -792,10 +792,10 @@ void TelnetDebugger::setBreakOnNextStatement( bool enabled )
       for(CodeBlock *walk = CodeBlock::getCodeBlockList(); walk; walk = walk->nextFile)
          walk->clearAllBreaks();
       for(Breakpoint *w = mBreakpoints; w; w = w->next)
-	  {
-		  if ( w->code )
+     {
+        if ( w->code )
               w->code->setBreakpoint(w->lineNumber);
-	  }
+     }
       mBreakOnNextStatement = false;
    }
 }
@@ -848,7 +848,7 @@ void TelnetDebugger::debugStepOut()
    setBreakOnNextStatement( false );
    mStackPopBreakIndex = gEvalState.getStackDepth() - 1;
    if ( mStackPopBreakIndex == 0 )
-	   mStackPopBreakIndex = -1;
+      mStackPopBreakIndex = -1;
    mProgramPaused = false;
    send("RUNNING\r\n");
 }

+ 28 - 28
Engine/source/console/typeValidators.cpp

@@ -49,42 +49,42 @@ void TypeValidator::consoleError(SimObject *object, const char *format, ...)
 
 void FRangeValidator::validateType(SimObject *object, void *typePtr)
 {
-	F32 *v = (F32 *) typePtr;
-	if(*v < minV || *v > maxV)
-	{
-		consoleError(object, "Must be between %g and %g", minV, maxV);
-		if(*v < minV)
-			*v = minV;
-		else if(*v > maxV)
-			*v = maxV;
-	}
+   F32 *v = (F32 *) typePtr;
+   if(*v < minV || *v > maxV)
+   {
+      consoleError(object, "Must be between %g and %g", minV, maxV);
+      if(*v < minV)
+         *v = minV;
+      else if(*v > maxV)
+         *v = maxV;
+   }
 }
 
 void IRangeValidator::validateType(SimObject *object, void *typePtr)
 {
-	S32 *v = (S32 *) typePtr;
-	if(*v < minV || *v > maxV)
-	{
-		consoleError(object, "Must be between %d and %d", minV, maxV);
-		if(*v < minV)
-			*v = minV;
-		else if(*v > maxV)
-			*v = maxV;
-	}
+   S32 *v = (S32 *) typePtr;
+   if(*v < minV || *v > maxV)
+   {
+      consoleError(object, "Must be between %d and %d", minV, maxV);
+      if(*v < minV)
+         *v = minV;
+      else if(*v > maxV)
+         *v = maxV;
+   }
 }
 
 void IRangeValidatorScaled::validateType(SimObject *object, void *typePtr)
 {
-	S32 *v = (S32 *) typePtr;
-	*v /= factor;
-	if(*v < minV || *v > maxV)
-	{
-		consoleError(object, "Scaled value must be between %d and %d", minV, maxV);
-		if(*v < minV)
-			*v = minV;
-		else if(*v > maxV)
-			*v = maxV;
-	}
+   S32 *v = (S32 *) typePtr;
+   *v /= factor;
+   if(*v < minV || *v > maxV)
+   {
+      consoleError(object, "Scaled value must be between %d and %d", minV, maxV);
+      if(*v < minV)
+         *v = minV;
+      else if(*v > maxV)
+         *v = maxV;
+   }
 }
 
 void Point3NormalizeValidator::validateType(SimObject *object, void *typePtr)

+ 114 - 114
Engine/source/environment/river.cpp

@@ -77,12 +77,12 @@ ConsoleDocClass( River,
 #define NODE_RADIUS 15.0f
 
 static U32 gIdxArray[6][2][3] = {
-	{ { 0, 4, 5 }, { 0, 5, 1 }, },   // Top Face
-	{ { 2, 6, 4 }, { 2, 4, 0 }, },   // Left Face
-	{ { 1, 5, 7 }, { 1, 7, 3 }, },   // Right Face
-	{ { 2, 3, 7 }, { 2, 7, 6 }, },   // Bottom Face
-	{ { 0, 1, 3 }, { 0, 3, 2 }, },   // Front Face
-	{ { 4, 6, 7 }, { 4, 7, 5 }, },   // Back Face
+   { { 0, 4, 5 }, { 0, 5, 1 }, },   // Top Face
+   { { 2, 6, 4 }, { 2, 4, 0 }, },   // Left Face
+   { { 1, 5, 7 }, { 1, 7, 3 }, },   // Right Face
+   { { 2, 3, 7 }, { 2, 7, 6 }, },   // Bottom Face
+   { { 0, 1, 3 }, { 0, 3, 2 }, },   // Front Face
+   { { 4, 6, 7 }, { 4, 7, 5 }, },   // Back Face
 };
 
 struct RiverHitSegment
@@ -93,10 +93,10 @@ struct RiverHitSegment
 
 static S32 QSORT_CALLBACK compareHitSegments(const void* a,const void* b)
 {
-	const RiverHitSegment *fa = (RiverHitSegment*)a;
-	const RiverHitSegment *fb = (RiverHitSegment*)b;
+   const RiverHitSegment *fa = (RiverHitSegment*)a;
+   const RiverHitSegment *fb = (RiverHitSegment*)b;
 
-	return mSign(fb->t - fa->t);
+   return mSign(fb->t - fa->t);
 }
 
 static Point3F sSegmentPointComparePoints[4];
@@ -655,17 +655,17 @@ void River::consoleInit()
    Parent::consoleInit();
 
    Con::addVariable( "$River::EditorOpen", TypeBool, &River::smEditorOpen, "For editor use.\n"
-	   "@ingroup Editors\n" );
+      "@ingroup Editors\n" );
    Con::addVariable( "$River::showWalls", TypeBool, &River::smShowWalls, "For editor use.\n"
-	   "@ingroup Editors\n" );
+      "@ingroup Editors\n" );
    Con::addVariable( "$River::showNodes", TypeBool, &River::smShowNodes, "For editor use.\n"
-	   "@ingroup Editors\n");
+      "@ingroup Editors\n");
    Con::addVariable( "$River::showSpline", TypeBool, &River::smShowSpline, "For editor use.\n"
-	   "@ingroup Editors\n" );
+      "@ingroup Editors\n" );
    Con::addVariable( "$River::showRiver", TypeBool, &River::smShowRiver, "For editor use.\n"
-	   "@ingroup Editors\n" );
-	Con::addVariable( "$River::showWireframe", TypeBool, &River::smWireframe, "For editor use.\n"
-	   "@ingroup Editors\n");
+      "@ingroup Editors\n" );
+   Con::addVariable( "$River::showWireframe", TypeBool, &River::smWireframe, "For editor use.\n"
+      "@ingroup Editors\n");
 }
 
 bool River::addNodeFromField( void *object, const char *index, const char *data )
@@ -816,7 +816,7 @@ void River::innerRender( SceneRenderState *state )
 
    _makeRenderBatches( camPosition );
 
-	if ( !River::smShowRiver )      
+   if ( !River::smShowRiver )      
       return;
 
    // If no material... we're done.
@@ -851,7 +851,7 @@ void River::innerRender( SceneRenderState *state )
          U32 vertCount = ( endVert - startVert ) + 1;
          U32 idxCount = ( endIdx - startIdx ) + 1;
          U32 triangleCount = idxCount / 3;
-         				
+                     
          AssertFatal( startVert < mLowVertCount, "River, bad draw call!" );
          AssertFatal( startVert + vertCount <= mLowVertCount, "River, bad draw call!" );
          AssertFatal( triangleCount <= mLowTriangleCount, "River, bad draw call!" );
@@ -962,7 +962,7 @@ U32 River::packUpdate(NetConnection * con, U32 mask, BitStream * stream)
       stream->write( mSegmentsPerBatch );
       stream->write( mDepthScale );
       stream->write( mMaxDivisionSize );
-		stream->write( mColumnCount );
+      stream->write( mColumnCount );
 
       stream->write( mFlowMagnitude );
       stream->write( mLodDistance );
@@ -1045,7 +1045,7 @@ void River::unpackUpdate(NetConnection * con, BitStream * stream)
    // RiverMask
    if(stream->readFlag())
    {
-      MatrixF		ObjectMatrix;
+      MatrixF     ObjectMatrix;
       stream->readAffineTransform(&ObjectMatrix);
       Parent::setTransform(ObjectMatrix);
      
@@ -1053,7 +1053,7 @@ void River::unpackUpdate(NetConnection * con, BitStream * stream)
       stream->read( &mSegmentsPerBatch );
       stream->read( &mDepthScale );
       stream->read( &mMaxDivisionSize );
-		stream->read( &mColumnCount );
+      stream->read( &mColumnCount );
 
       stream->read( &mFlowMagnitude );
       stream->read( &mLodDistance );
@@ -1198,56 +1198,56 @@ void River::setScale( const VectorF &scale )
 
 bool River::castRay(const Point3F &s, const Point3F &e, RayInfo* info)
 {
-	Point3F start = s;
-	Point3F end = e;
-	mObjToWorld.mulP(start);
-	mObjToWorld.mulP(end);
+   Point3F start = s;
+   Point3F end = e;
+   mObjToWorld.mulP(start);
+   mObjToWorld.mulP(end);
 
-	F32 out = 1.0f;   // The output fraction/percentage along the line defined by s and e
-	VectorF norm(0.0f, 0.0f, 0.0f);     // The normal of the face intersected
+   F32 out = 1.0f;   // The output fraction/percentage along the line defined by s and e
+   VectorF norm(0.0f, 0.0f, 0.0f);     // The normal of the face intersected
 
-	Vector<RiverHitSegment> hitSegments;
+   Vector<RiverHitSegment> hitSegments;
 
-	for ( U32 i = 0; i < mSegments.size(); i++ )
-	{
-		const RiverSegment &segment = mSegments[i];
+   for ( U32 i = 0; i < mSegments.size(); i++ )
+   {
+      const RiverSegment &segment = mSegments[i];
 
-		F32 t;
-		VectorF n;
+      F32 t;
+      VectorF n;
 
-		if ( segment.worldbounds.collideLine( start, end, &t, &n ) )
-		{
-			hitSegments.increment();
-			hitSegments.last().t = t;
-			hitSegments.last().idx = i;         
-		}
-	}
+      if ( segment.worldbounds.collideLine( start, end, &t, &n ) )
+      {
+         hitSegments.increment();
+         hitSegments.last().t = t;
+         hitSegments.last().idx = i;         
+      }
+   }
 
-	dQsort( hitSegments.address(), hitSegments.size(), sizeof(RiverHitSegment), compareHitSegments );
+   dQsort( hitSegments.address(), hitSegments.size(), sizeof(RiverHitSegment), compareHitSegments );
 
    U32 idx0, idx1, idx2;
    F32 t;
 
-	for ( U32 i = 0; i < hitSegments.size(); i++ )
-	{
-		U32 segIdx = hitSegments[i].idx;
-		const RiverSegment &segment = mSegments[segIdx];
+   for ( U32 i = 0; i < hitSegments.size(); i++ )
+   {
+      U32 segIdx = hitSegments[i].idx;
+      const RiverSegment &segment = mSegments[segIdx];
 
-		// Each segment has 6 faces
-		for ( U32 j = 0; j < 6; j++ )
-		{
-			if ( j == 4 && segIdx != 0 )
-				continue;
+      // Each segment has 6 faces
+      for ( U32 j = 0; j < 6; j++ )
+      {
+         if ( j == 4 && segIdx != 0 )
+            continue;
 
-			if ( j == 5 && segIdx != mSegments.size() - 1 )
-				continue;
+         if ( j == 5 && segIdx != mSegments.size() - 1 )
+            continue;
 
-			// Each face has 2 triangles
-			for ( U32 k = 0; k < 2; k++ )
-			{
-				idx0 = gIdxArray[j][k][0];
-				idx1 = gIdxArray[j][k][1];
-				idx2 = gIdxArray[j][k][2];
+         // Each face has 2 triangles
+         for ( U32 k = 0; k < 2; k++ )
+         {
+            idx0 = gIdxArray[j][k][0];
+            idx1 = gIdxArray[j][k][1];
+            idx2 = gIdxArray[j][k][2];
 
             const Point3F &v0 = segment[idx0];
             const Point3F &v1 = segment[idx1];
@@ -1257,40 +1257,40 @@ bool River::castRay(const Point3F &s, const Point3F &e, RayInfo* info)
                                                    v2, v1, v0,
                                                    NULL,
                                                    &t ) )
-					continue;
+               continue;
 
-				if ( t >= 0.0f && t < 1.0f && t < out )
-				{
-					out = t;
+            if ( t >= 0.0f && t < 1.0f && t < out )
+            {
+               out = t;
 
                // optimize this, can be calculated easily within 
                // the collision test
                norm = PlaneF( v0, v1, v2 );
-				}
-			}
-		}
+            }
+         }
+      }
 
-		if (out >= 0.0f && out < 1.0f)
-			break;
-	}
+      if (out >= 0.0f && out < 1.0f)
+         break;
+   }
 
-	if (out >= 0.0f && out < 1.0f)
-	{
-		info->t = out;
-		info->normal = norm;
-		info->point.interpolate(start, end, out);
-		info->face = -1;
-		info->object = this;
+   if (out >= 0.0f && out < 1.0f)
+   {
+      info->t = out;
+      info->normal = norm;
+      info->point.interpolate(start, end, out);
+      info->face = -1;
+      info->object = this;
 
-		return true;
-	}
+      return true;
+   }
 
-	return false;
+   return false;
 }
 
 bool River::collideBox(const Point3F &start, const Point3F &end, RayInfo* info)
 {
-	return false;
+   return false;
 }
 
 bool River::buildPolyList( PolyListContext context, AbstractPolyList* polyList, const Box3F& box, const SphereF& sphere )
@@ -1656,8 +1656,8 @@ void River::_generateVerts()
    // These will depend on the level of subdivision per segment
    // calculated below.
    mHighVertCount = 0;
-	mHighTriangleCount = 0;
-	
+   mHighTriangleCount = 0;
+   
    // Calculate the number of row/column subdivisions per each
    // RiverSegment.
 
@@ -1671,18 +1671,18 @@ void River::_generateVerts()
 
    mColumnCount = mCeil( greatestWidth / mMaxDivisionSize );
 
-	for ( U32 i = 0; i < mSegments.size(); i++ )
-	{
+   for ( U32 i = 0; i < mSegments.size(); i++ )
+   {
       RiverSegment &segment = mSegments[i];
       const RiverSlice *slice = segment.slice0;
-		const RiverSlice *nextSlice = segment.slice1;
+      const RiverSlice *nextSlice = segment.slice1;
 
-		// Calculate the size of divisions in the forward direction ( p00 -> p01 )      		
-		F32 segLength = (nextSlice->p1 - slice->p1).len();		
+      // Calculate the size of divisions in the forward direction ( p00 -> p01 )          
+      F32 segLength = (nextSlice->p1 - slice->p1).len();    
 
-		// A division count of one is actually NO subdivision,
-		// the segment corners are the only verts in this segment.
-		U32 numRows = 1;
+      // A division count of one is actually NO subdivision,
+      // the segment corners are the only verts in this segment.
+      U32 numRows = 1;
 
       if ( segLength > 0.0f )
          numRows = mCeil( segLength / mMaxDivisionSize );
@@ -1693,33 +1693,33 @@ void River::_generateVerts()
       // column data member we initialize all segments in the river to
       // the same (River::mColumnCount)
 
-		// Calculate the size of divisions in the right direction ( p00 -> p10 ) 
-		// F32 segWidth = ( ( p11 - p01 ).len() + ( p10 - p00 ).len() ) * 0.5f;
+      // Calculate the size of divisions in the right direction ( p00 -> p10 ) 
+      // F32 segWidth = ( ( p11 - p01 ).len() + ( p10 - p00 ).len() ) * 0.5f;
 
-		// U32 numColumns = 5;
-		//F32 columnSize = segWidth / numColumns;
+      // U32 numColumns = 5;
+      //F32 columnSize = segWidth / numColumns;
 
-		//while ( columnSize > mMaxDivisionSize )
-		//{
-		//	numColumns++;
-		//	columnSize = segWidth / numColumns;
-		//}
-		
+      //while ( columnSize > mMaxDivisionSize )
+      //{
+      // numColumns++;
+      // columnSize = segWidth / numColumns;
+      //}
+      
       // Save the calculated numb of columns / rows for this segment.
       segment.columns = mColumnCount;
       segment.rows = numRows;
-		
+      
       // Save the corresponding number of verts/prims
       segment.numVerts = ( 1 + mColumnCount ) * ( 1 + numRows );
       segment.numTriangles = mColumnCount * numRows * 2;
 
-		mHighVertCount += segment.numVerts;
-		mHighTriangleCount += segment.numTriangles;
-	}
+      mHighVertCount += segment.numVerts;
+      mHighTriangleCount += segment.numTriangles;
+   }
 
    // Number of low detail verts/prims.
-   mLowVertCount = mSlices.size() * 2;	
-	mLowTriangleCount = mSegments.size() * 2;   
+   mLowVertCount = mSlices.size() * 2; 
+   mLowTriangleCount = mSegments.size() * 2;   
 
    // Allocate the low detail VertexBuffer, 
    // this will stay in memory and will never need to change.
@@ -1728,8 +1728,8 @@ void River::_generateVerts()
    GFXWaterVertex *lowVertPtr = mVB_low.lock(); 
    U32 vertCounter = 0;
 
-	// The texCoord.y value start/end for a segment
-	// as we loop through them.	
+   // The texCoord.y value start/end for a segment
+   // as we loop through them.   
    F32 textCoordV = 0;
 
    //
@@ -1760,7 +1760,7 @@ void River::_generateVerts()
       {         
          // Increment the textCoordV for the next slice.
          F32 segLen = ( mSlices[i+1].p1 - slice.p1 ).len();
-		   textCoordV += segLen;         
+         textCoordV += segLen;         
       }
    }
 
@@ -1771,8 +1771,8 @@ void River::_generateVerts()
 
    //
    // Create the low-detail prim buffer(s)
-   //	
-	mPB_low.set( GFX, mLowTriangleCount * 3, mLowTriangleCount, GFXBufferTypeStatic );
+   // 
+   mPB_low.set( GFX, mLowTriangleCount * 3, mLowTriangleCount, GFXBufferTypeStatic );
 
    U16 *lowIdxBuff;
    mPB_low.lock(&lowIdxBuff);     
@@ -1784,13 +1784,13 @@ void River::_generateVerts()
    U32 offset = 0;
 
    // Fill the low-detail PrimitiveBuffer   
-	for ( U32 i = 0; i < mSegments.size(); i++ )
-	{		
+   for ( U32 i = 0; i < mSegments.size(); i++ )
+   {     
       //const RiverSegment &segment = mSegments[i];
-		
+      
       // Two triangles formed by the corner points of this segment
       // into the the low detail primitive buffer.
-		p00 = offset;
+      p00 = offset;
       p01 = p00 + 2;
       p11 = p01 + 1;
       p10 = p00 + 1;

+ 16 - 16
Engine/source/gfx/gl/gfxGLStateBlock.cpp

@@ -40,32 +40,32 @@ GFXGLStateBlock::GFXGLStateBlock(const GFXStateBlockDesc& desc) :
    mCachedHashValue(desc.getHashValue())
 {
     if( !GFXGL->mCapabilities.samplerObjects )
-	   return;
+      return;
 
    static Map<GFXSamplerStateDesc, U32> mSamplersMap;
 
-	for(int i = 0; i < TEXTURE_STAGE_COUNT; ++i)
-	{
-		GLuint &id = mSamplerObjects[i];
-		GFXSamplerStateDesc &ssd = mDesc.samplers[i];
+   for(int i = 0; i < TEXTURE_STAGE_COUNT; ++i)
+   {
+      GLuint &id = mSamplerObjects[i];
+      GFXSamplerStateDesc &ssd = mDesc.samplers[i];
       Map<GFXSamplerStateDesc, U32>::Iterator itr =  mSamplersMap.find(ssd);
       if(itr == mSamplersMap.end())
       {
-		   glGenSamplers(1, &id);
+         glGenSamplers(1, &id);
 
-		   glSamplerParameteri(id, GL_TEXTURE_MIN_FILTER, minificationFilter(ssd.minFilter, ssd.mipFilter, 1) );
-		   glSamplerParameteri(id, GL_TEXTURE_MAG_FILTER, GFXGLTextureFilter[ssd.magFilter]);
-		   glSamplerParameteri(id, GL_TEXTURE_WRAP_S, GFXGLTextureAddress[ssd.addressModeU]);
-		   glSamplerParameteri(id, GL_TEXTURE_WRAP_T, GFXGLTextureAddress[ssd.addressModeV]);
-		   glSamplerParameteri(id, GL_TEXTURE_WRAP_R, GFXGLTextureAddress[ssd.addressModeW]);
-		   if(static_cast< GFXGLDevice* >( GFX )->supportsAnisotropic() )
-			   glSamplerParameterf(id, GL_TEXTURE_MAX_ANISOTROPY_EXT, ssd.maxAnisotropy);
+         glSamplerParameteri(id, GL_TEXTURE_MIN_FILTER, minificationFilter(ssd.minFilter, ssd.mipFilter, 1) );
+         glSamplerParameteri(id, GL_TEXTURE_MAG_FILTER, GFXGLTextureFilter[ssd.magFilter]);
+         glSamplerParameteri(id, GL_TEXTURE_WRAP_S, GFXGLTextureAddress[ssd.addressModeU]);
+         glSamplerParameteri(id, GL_TEXTURE_WRAP_T, GFXGLTextureAddress[ssd.addressModeV]);
+         glSamplerParameteri(id, GL_TEXTURE_WRAP_R, GFXGLTextureAddress[ssd.addressModeW]);
+         if(static_cast< GFXGLDevice* >( GFX )->supportsAnisotropic() )
+            glSamplerParameterf(id, GL_TEXTURE_MAX_ANISOTROPY_EXT, ssd.maxAnisotropy);
 
          mSamplersMap[ssd] = id;
       }
       else
          id = itr->value;
-	}
+   }
 }
 
 GFXGLStateBlock::~GFXGLStateBlock()
@@ -171,9 +171,9 @@ void GFXGLStateBlock::activate(const GFXGLStateBlock* oldState)
       for (U32 i = 0; i < getMin(getOwningDevice()->getNumSamplers(), (U32) TEXTURE_STAGE_COUNT); i++)
       {
          if(!oldState || oldState->mSamplerObjects[i] != mSamplerObjects[i])
-		      glBindSampler(i, mSamplerObjects[i] );
+            glBindSampler(i, mSamplerObjects[i] );
       }
-   }	  
+   }    
 
    // TODO: states added for detail blend   
 }

+ 1 - 1
Engine/source/gfx/video/videoCapture.cpp

@@ -340,7 +340,7 @@ DefineEngineFunction( stopVideoCapture, void, (),,
 
 DefineEngineFunction( playJournalToVideo, void, 
    ( const char *journalFile, const char *videoFile, const char *encoder, F32 framerate, Point2I resolution ),
-	( NULL, "THEORA", 30.0f, Point2I::Zero ),
+   ( NULL, "THEORA", 30.0f, Point2I::Zero ),
    "Load a journal file and capture it video.\n"
    "@ingroup Rendering\n" )
 {

+ 16 - 16
Engine/source/gui/buttons/guiIconButtonCtrl.cpp

@@ -59,21 +59,21 @@ ConsoleDocClass( GuiIconButtonCtrl,
    "has been clicked.\n\n"
 
    "@tsexample\n"
-	"new GuiIconButtonCtrl(TestIconButton)\n"
-	"{\n"
-    "	buttonMargin = \"4 4\";\n"
-    "	iconBitmap = \"art/gui/lagIcon.png\";\n"
-    "	iconLocation = \"Center\";\n"
-    "	sizeIconToButton = \"0\";\n"
-    "	makeIconSquare = \"1\";\n"
-    "	textLocation = \"Bottom\";\n"
-    "	textMargin = \"-2\";\n"
-	"	autoSize = \"0\";\n"
-	"	text = \"Lag Icon\";\n"
-	"	textID = \"\"STR_LAG\"\";\n"
-	"	buttonType = \"PushButton\";\n"
-	"	profile = \"GuiIconButtonProfile\";\n"
-	"};\n"
+   "new GuiIconButtonCtrl(TestIconButton)\n"
+   "{\n"
+    " buttonMargin = \"4 4\";\n"
+    " iconBitmap = \"art/gui/lagIcon.png\";\n"
+    " iconLocation = \"Center\";\n"
+    " sizeIconToButton = \"0\";\n"
+    " makeIconSquare = \"1\";\n"
+    " textLocation = \"Bottom\";\n"
+    " textMargin = \"-2\";\n"
+   "  autoSize = \"0\";\n"
+   "  text = \"Lag Icon\";\n"
+   "  textID = \"\"STR_LAG\"\";\n"
+   "  buttonType = \"PushButton\";\n"
+   "  profile = \"GuiIconButtonProfile\";\n"
+   "};\n"
    "@endtsexample\n\n"
 
    "@see GuiControl\n"
@@ -130,7 +130,7 @@ void GuiIconButtonCtrl::initPersistFields()
    addField( "sizeIconToButton", TypeBool,      Offset( mFitBitmapToButton, GuiIconButtonCtrl ),"If true, the icon will be scaled to be the same size as the button.\n");
    addField( "makeIconSquare",   TypeBool,      Offset( mMakeIconSquare, GuiIconButtonCtrl ),"If true, will make sure the icon is square.\n");
    addField( "textLocation",     TYPEID< TextLocation >(),      Offset( mTextLocation, GuiIconButtonCtrl ),"Where to place the text on the control.\n"
-																										   "Options are 0 (None), 1 (Bottom), 2 (Right), 3 (Top), 4 (Left), 5 (Center).\n");
+                                                                                 "Options are 0 (None), 1 (Bottom), 2 (Right), 3 (Top), 4 (Left), 5 (Center).\n");
    addField( "textMargin",       TypeS32,       Offset( mTextMargin, GuiIconButtonCtrl ),"Margin between the icon and the text.\n");
    addField( "autoSize",         TypeBool,      Offset( mAutoSize, GuiIconButtonCtrl ),"If true, the text and icon will be automatically sized to the size of the control.\n");
    Parent::initPersistFields();

+ 1 - 1
Engine/source/gui/buttons/guiToggleButtonCtrl.cpp

@@ -60,7 +60,7 @@ void GuiToggleButtonCtrl::onPreRender()
 
    // If we have a script variable, make sure we're in sync
    if ( mConsoleVariable[0] )
-   	mStateOn = Con::getBoolVariable( mConsoleVariable );
+      mStateOn = Con::getBoolVariable( mConsoleVariable );
 }
 
 void GuiToggleButtonCtrl::onRender(Point2I      offset,

+ 1 - 1
Engine/source/gui/containers/guiFormCtrl.cpp

@@ -158,7 +158,7 @@ void GuiFormCtrl::addObject(SimObject *newObj )
       
       GuiControl* parent = getParent();
       if ( parent )
-   	   parent->addObject( newObj );
+         parent->addObject( newObj );
 
       return;
    }

+ 8 - 8
Engine/source/gui/containers/guiPaneCtrl.cpp

@@ -108,7 +108,7 @@ bool GuiPaneControl::onWake()
    }
 
    if(mCaptionID && *mCaptionID != 0)
-		setCaptionID(mCaptionID);
+      setCaptionID(mCaptionID);
 
    mProfile->constructBitmapArray();
    if(mProfile->mUseBitmapArray && mProfile->mBitmapArrayRects.size())
@@ -131,19 +131,19 @@ bool GuiPaneControl::onWake()
 
 void GuiPaneControl::setCaptionID(const char *id)
 {
-	S32 n = Con::getIntVariable(id, -1);
-	if(n != -1)
-	{
-		mCaptionID = StringTable->insert(id);
-		setCaptionID(n);
-	}
+   S32 n = Con::getIntVariable(id, -1);
+   if(n != -1)
+   {
+      mCaptionID = StringTable->insert(id);
+      setCaptionID(n);
+   }
 }
 
 //-----------------------------------------------------------------------------
 
 void GuiPaneControl::setCaptionID(S32 id)
 {
-	mCaption = getGUIString(id);
+   mCaption = getGUIString(id);
 }
 
 //-----------------------------------------------------------------------------

+ 7 - 7
Engine/source/gui/containers/guiRolloutCtrl.cpp

@@ -462,9 +462,9 @@ void GuiRolloutCtrl::processTick()
          newHeight -= mAnimateStep;
 
       if( !mIsAnimating )
-	  {
+     {
          mIsExpanded = false;
-	  }
+     }
    }
    else // We're expanding ourself (Showing our contents)
    {
@@ -559,13 +559,13 @@ void GuiRolloutCtrl::onRender( Point2I offset, const RectI &updateRect )
    if ( pChild )
    {
       if ( !mIsExpanded && !mIsAnimating && pChild->isVisible() )
-	  {
+     {
          pChild->setVisible( false );
-	  }
+     }
       else if ( (mIsExpanded || mIsAnimating) && !pChild->isVisible() )
-	  {
+     {
          pChild->setVisible( true );
-	  }
+     }
    }
    renderChildControls( offset, updateRect );
 
@@ -614,7 +614,7 @@ DefineEngineMethod( GuiRolloutCtrl, toggleCollapse, void, (),,
    if( object->isExpanded() )
       object->collapse();
    else
-	  object->expand();
+     object->expand();
 }
 
 //-----------------------------------------------------------------------------

+ 8 - 8
Engine/source/gui/containers/guiWindowCtrl.cpp

@@ -231,7 +231,7 @@ void GuiWindowCtrl::moveFromCollapseGroup()
          parent->mCollapseGroupVec[groupVec].first()->mCollapseGroupNum = -1;
          parent->mCollapseGroupVec[groupVec].erase(U32(0));
          parent->mCollapseGroupVec[groupVec].setSize(groupVecCount - 1);
-         parent->mCollapseGroupVec.erase(groupVec);	
+         parent->mCollapseGroupVec.erase(groupVec);   
       }
    }
    
@@ -381,7 +381,7 @@ void GuiWindowCtrl::refreshCollapseGroups()
    if( !parent )
       return;
    
-   CollapseGroupNumVec	collapseGroupNumVec;
+   CollapseGroupNumVec  collapseGroupNumVec;
 
    // iterate through the collided array, renumbering the windows pointers
    S32 assignGroupNum = 0;
@@ -463,7 +463,7 @@ void GuiWindowCtrl::handleCollapseGroup()
    if( !parent )
       return;
 
-   CollapseGroupNumVec	collapseGroupNumVec;
+   CollapseGroupNumVec  collapseGroupNumVec;
 
    if( mIsCollapsed ) // minimize window up to its header bar
    {
@@ -529,7 +529,7 @@ void GuiWindowCtrl::handleCollapseGroup()
             if((*iter)->mCollapseGroupNum > mCollapseGroupNum)
             {
                Point2I newChildPosition =  (*iter)->getPosition();
-               newChildPosition.y += moveChildYBy;					
+               newChildPosition.y += moveChildYBy;             
                (*iter)->resize(newChildPosition, (*iter)->getExtent());
             }
          }
@@ -547,7 +547,7 @@ bool GuiWindowCtrl::resizeCollapseGroup(bool resizeX, bool resizeY, Point2I resi
    if( !parent )
       return false;
 
-   CollapseGroupNumVec	collapseGroupNumVec;
+   CollapseGroupNumVec  collapseGroupNumVec;
 
    bool canResize = true;
    CollapseGroupNumVec::iterator iter = parent->mCollapseGroupVec[mCollapseGroup].begin();
@@ -980,7 +980,7 @@ void GuiWindowCtrl::onMouseDragged(const GuiEvent &event)
       moveWithCollapseGroup(newPosition);
 
    if(mCanCollapse && mCollapseGroup >= 0 && mResizeWindow == true )
-   {	
+   {  
       // Resize the window if allowed
       if( newExtent.y >= getMinExtent().y && newExtent.x >= getMinExtent().x)
       {
@@ -1212,7 +1212,7 @@ void GuiWindowCtrl::onMouseUp(const GuiEvent &event)
       // We're either moving out of a collapse group or moving to another one
       // Not valid for windows not previously in a group
       if( mCollapseGroup >= 0 && 
-		  (snapType == -1 || (hitWindow && snapType >= 0 && mCollapseGroup != hitWindow->mCollapseGroup)))
+        (snapType == -1 || (hitWindow && snapType >= 0 && mCollapseGroup != hitWindow->mCollapseGroup)))
          moveFromCollapseGroup();
       
       // No window to connect to
@@ -1830,7 +1830,7 @@ void GuiWindowCtrl::parentResized(const RectI &oldParentRect, const RectI &newPa
 
       // Only for collpasing groups, if were not, then do it like normal windows
       if( mCanCollapse && mCollapseGroup >= 0 )
-      {	
+      {  
          bool resizeMe = false;
          
          // Only the group window should control positioning

+ 68 - 68
Engine/source/gui/controls/guiListBoxCtrl.cpp

@@ -52,9 +52,9 @@ IMPLEMENT_CALLBACK( GuiListBoxCtrl, onMouseDragged, void, (),(),
    "@tsexample\n"
    "// Mouse is dragged across the control, causing the callback to occur.\n"
    "GuiListBoxCtrl::onMouseDragged(%this)\n"
-   "	{\n"
-   "		// Code to run whenever the mouse is dragged across the control\n"
-   "	}\n"
+   "  {\n"
+   "     // Code to run whenever the mouse is dragged across the control\n"
+   "  }\n"
    "@endtsexample\n\n"
    "@see GuiControl\n\n"
 );
@@ -64,9 +64,9 @@ IMPLEMENT_CALLBACK( GuiListBoxCtrl, onClearSelection, void, (),(),
    "@tsexample\n"
    "// A selected item is cleared, causing the callback to occur.\n"
    "GuiListBoxCtrl::onClearSelection(%this)\n"
-   "	{\n"
-   "		// Code to run whenever a selected item is cleared\n"
-   "	}\n"
+   "  {\n"
+   "     // Code to run whenever a selected item is cleared\n"
+   "  }\n"
    "@endtsexample\n\n"
    "@see GuiControl\n\n"
 );
@@ -78,9 +78,9 @@ IMPLEMENT_CALLBACK( GuiListBoxCtrl, onUnSelect, void, ( S32 index, const char* i
    "@tsexample\n"
    "// A selected item is unselected, causing the callback to occur\n"
    "GuiListBoxCtrl::onUnSelect(%this, %indexId, %itemText)\n"
-   "	{\n"
-   "		// Code to run whenever a selected list item is unselected\n"
-   "	}\n"
+   "  {\n"
+   "     // Code to run whenever a selected list item is unselected\n"
+   "  }\n"
    "@endtsexample\n\n"
    "@see GuiControl\n\n"
 );
@@ -92,9 +92,9 @@ IMPLEMENT_CALLBACK( GuiListBoxCtrl, onSelect, void, ( S32 index , const char* it
    "@tsexample\n"
    "// An item in the list is selected, causing the callback to occur\n"
    "GuiListBoxCtrl::onSelect(%this, %index, %itemText)\n"
-   "	{\n"
-   "		// Code to run whenever an item in the list is selected\n"
-   "	}\n"
+   "  {\n"
+   "     // Code to run whenever an item in the list is selected\n"
+   "  }\n"
    "@endtsexample\n\n"
    "@see GuiControl\n\n"
 );
@@ -104,9 +104,9 @@ IMPLEMENT_CALLBACK( GuiListBoxCtrl, onDoubleClick, void, (),(),
    "@tsexample\n"
    "// An item in the list is double clicked, causing the callback to occur.\n"
    "GuiListBoxCtrl::onDoubleClick(%this)\n"
-   "	{\n"
-   "		// Code to run whenever an item in the control has been double clicked\n"
-   "	}\n"
+   "  {\n"
+   "     // Code to run whenever an item in the control has been double clicked\n"
+   "  }\n"
    "@endtsexample\n\n"
    "@see GuiControl\n\n"
 );
@@ -121,9 +121,9 @@ IMPLEMENT_CALLBACK( GuiListBoxCtrl, onMouseUp, void, ( S32 itemHit, S32 mouseCli
    "@tsexample\n"
    "// Mouse was previously clicked down, and now has been released, causing the callback to occur.\n"
    "GuiListBoxCtrl::onMouseUp(%this, %itemHit, %mouseClickCount)\n"
-   "	{\n"
-   "		// Code to call whenever the mouse has been clicked and released on the control\n"
-   "	}\n"
+   "  {\n"
+   "     // Code to call whenever the mouse has been clicked and released on the control\n"
+   "  }\n"
    "@endtsexample\n\n"
    "@see GuiControl\n\n"
 );
@@ -133,9 +133,9 @@ IMPLEMENT_CALLBACK( GuiListBoxCtrl, onDeleteKey, void, (),(),
    "@tsexample\n"
    "// The delete key on the keyboard has been pressed while this control is in focus, causing the callback to occur.\n"
    "GuiListBoxCtrl::onDeleteKey(%this)\n"
-   "	{\n"
-   "		// Code to call whenever the delete key is pressed\n"
-   "	}\n"
+   "  {\n"
+   "     // Code to call whenever the delete key is pressed\n"
+   "  }\n"
    "@endtsexample\n\n"
    "@see GuiControl\n\n"
 );
@@ -146,10 +146,10 @@ IMPLEMENT_CALLBACK( GuiListBoxCtrl, isObjectMirrored, bool, ( const char* indexI
    "@tsexample\n"
    "// Engine has requested of the script level to determine if a list entry is mirrored or not.\n"
    "GuiListBoxCtrl::isObjectMirrored(%this, %indexIdString)\n"
-   "	{\n"
-   "		// Perform code required to check and see if the list item at the index id is mirrored or not.\n"
-   "		return %isMirrored;\n"
-   "	}\n"
+   "  {\n"
+   "     // Perform code required to check and see if the list item at the index id is mirrored or not.\n"
+   "     return %isMirrored;\n"
+   "  }\n"
    "@endtsexample\n\n"
    "@return A boolean value on if the list item is mirrored or not.\n\n"
    "@see GuiControl\n\n"
@@ -234,7 +234,7 @@ void GuiListBoxCtrl::clearItems()
    // Free our vector lists
    mItems.clear();
    mSelectedItems.clear();
-	mFilteredItems.clear();
+   mFilteredItems.clear();
 }
 
 DefineEngineMethod( GuiListBoxCtrl, clearSelection, void, (),,
@@ -1511,8 +1511,8 @@ void GuiListBoxCtrl::_mirror()
             break;
          }
       }
-		
-		for ( U32 j = 0; j < mFilteredItems.size(); j++ )
+      
+      for ( U32 j = 0; j < mFilteredItems.size(); j++ )
       {
          if ( (SimObjectId)(uintptr_t)(mFilteredItems[j]->itemData) == curId )
          {
@@ -1571,37 +1571,37 @@ DefineEngineMethod( GuiListBoxCtrl, addFilteredItem, void, (const char* newItem)
    "@endtsexample\n\n"
    "@see GuiControl")
 {
-	String item(newItem);
-	if( item == String::EmptyString )
-		return;
+   String item(newItem);
+   if( item == String::EmptyString )
+      return;
 
-	object->addFilteredItem( item );
+   object->addFilteredItem( item );
 }
 
 void GuiListBoxCtrl::addFilteredItem( String item )
 {
-	// Delete from selected items list
-	for ( S32 i = 0; i < mSelectedItems.size(); i++ ) 
-	{
-		String itemText = mSelectedItems[i]->itemText;
-		if ( dStrcmp( itemText.c_str(), item.c_str() ) == 0 ) 
-		{
-			mSelectedItems.erase_fast( i );
-			break;
-		}
-	}
-
-	for ( S32 i = 0; i < mItems.size(); i++ ) 
-	{
-		String itemText = mItems[i]->itemText;
-		if( dStrcmp( itemText.c_str(), item.c_str() ) == 0 )
-		{	
-			mItems[i]->isSelected = false;		
-			mFilteredItems.push_front( mItems[i] );
-			mItems.erase( &mItems[i] );
-			break;
-		}
-	}
+   // Delete from selected items list
+   for ( S32 i = 0; i < mSelectedItems.size(); i++ ) 
+   {
+      String itemText = mSelectedItems[i]->itemText;
+      if ( dStrcmp( itemText.c_str(), item.c_str() ) == 0 ) 
+      {
+         mSelectedItems.erase_fast( i );
+         break;
+      }
+   }
+
+   for ( S32 i = 0; i < mItems.size(); i++ ) 
+   {
+      String itemText = mItems[i]->itemText;
+      if( dStrcmp( itemText.c_str(), item.c_str() ) == 0 )
+      {  
+         mItems[i]->isSelected = false;      
+         mFilteredItems.push_front( mItems[i] );
+         mItems.erase( &mItems[i] );
+         break;
+      }
+   }
 }
 
 DefineEngineMethod( GuiListBoxCtrl, removeFilteredItem, void, ( const char* itemName ),,
@@ -1615,23 +1615,23 @@ DefineEngineMethod( GuiListBoxCtrl, removeFilteredItem, void, ( const char* item
    "@endtsexample\n\n"
    "@see GuiControl")
 {
-	String item(itemName);
-	if( item == String::EmptyString )
-		return;
+   String item(itemName);
+   if( item == String::EmptyString )
+      return;
 
-	object->removeFilteredItem( item );
+   object->removeFilteredItem( item );
 }
 
 void GuiListBoxCtrl::removeFilteredItem( String item )
 {
-	for ( S32 i = 0; i < mFilteredItems.size(); i++ ) 
-	{
-		String itemText = mFilteredItems[i]->itemText;
-		if( dStrcmp( itemText.c_str(), item.c_str() ) == 0 )
-		{			
-			mItems.push_front( mFilteredItems[i] );
-			mFilteredItems.erase( &mFilteredItems[i] );
-			break;
-		}
-	}
+   for ( S32 i = 0; i < mFilteredItems.size(); i++ ) 
+   {
+      String itemText = mFilteredItems[i]->itemText;
+      if( dStrcmp( itemText.c_str(), item.c_str() ) == 0 )
+      {        
+         mItems.push_front( mFilteredItems[i] );
+         mFilteredItems.erase( &mFilteredItems[i] );
+         break;
+      }
+   }
 }

+ 26 - 26
Engine/source/gui/controls/guiMLTextCtrl.cpp

@@ -66,9 +66,9 @@ IMPLEMENT_CALLBACK( GuiMLTextCtrl, onURL, void, ( const char* url ),( url ),
    "@tsexample\n"
    "// A URL address was clicked on in the control, causing the callback to occur.\n"
    "GuiMLTextCtrl::onUrl(%this,%url)\n"
-   "	{\n"
-   "		// Code to run whenever a URL was clicked on\n"
-   "	}\n"
+   "  {\n"
+   "     // Code to run whenever a URL was clicked on\n"
+   "  }\n"
    "@endtsexample\n\n"
    "@see GuiControl\n\n"
 );
@@ -80,9 +80,9 @@ IMPLEMENT_CALLBACK( GuiMLTextCtrl, onResize, void, ( S32 width, S32 maxY ),( wid
    "@tsexample\n"
    "// Control size changed, causing the callback to occur.\n"
    "GuiMLTextCtrl::onResize(%this,%width,%maxY)\n"
-   "	{\n"
-   "		// Code to call when the control size changes\n"
-   "	}\n"
+   "  {\n"
+   "     // Code to call when the control size changes\n"
+   "  }\n"
    "@endtsexample\n\n"
    "@see GuiControl\n\n"
 );
@@ -191,17 +191,17 @@ DefineEngineMethod( GuiMLTextCtrl, scrollToBottom, void, (),,
 }
 
 DefineEngineFunction(StripMLControlChars, const char*, (const char* inString),,
-					 "@brief Strip TorqueML control characters from the specified string, returning a 'clean' version.\n\n"
-					 "@param inString String to strip TorqueML control characters from.\n"
-					 "@tsexample\n"
-					 "// Define the string to strip TorqueML control characters from\n"
-					 "%string = \"<font:Arial:24>How Now <color:c43c12>Brown <color:000000>Cow\";\n\n"
-					 "// Request the stripped version of the string\n"
-					 "%strippedString = StripMLControlChars(%string);\n"
-					 "@endtsexample\n\n"
-					 "@return Version of the inputted string with all TorqueML characters removed.\n\n"
-					 "@see References\n\n"
-					 "@ingroup GuiCore")
+                "@brief Strip TorqueML control characters from the specified string, returning a 'clean' version.\n\n"
+                "@param inString String to strip TorqueML control characters from.\n"
+                "@tsexample\n"
+                "// Define the string to strip TorqueML control characters from\n"
+                "%string = \"<font:Arial:24>How Now <color:c43c12>Brown <color:000000>Cow\";\n\n"
+                "// Request the stripped version of the string\n"
+                "%strippedString = StripMLControlChars(%string);\n"
+                "@endtsexample\n\n"
+                "@return Version of the inputted string with all TorqueML characters removed.\n\n"
+                "@see References\n\n"
+                "@ingroup GuiCore")
 {
    return GuiMLTextCtrl::stripControlChars(inString);
 }
@@ -293,7 +293,7 @@ void GuiMLTextCtrl::initPersistFields()
       addField("deniedSound",       TypeSFXTrackName, Offset(mDeniedSound, GuiMLTextCtrl), "If the text will not fit in the control, the deniedSound is played.");
       addField("text",              TypeCaseString,  Offset( mInitialText, GuiMLTextCtrl ), "Text to display in this control.");
       addField("useURLMouseCursor", TypeBool,   Offset(mUseURLMouseCursor,   GuiMLTextCtrl), "If true, the mouse cursor will turn into a hand cursor while over a link in the text.\n"
-																							 "This is dependant on the markup language used by the GuiMLTextCtrl\n");
+                                                                      "This is dependant on the markup language used by the GuiMLTextCtrl\n");
    
    endGroup( "Text" );
    
@@ -649,9 +649,9 @@ void GuiMLTextCtrl::ensureCursorOnScreen()
    // If our parent isn't a scroll control, or we're not the only control
    //  in the content region, bail...
    GuiControl* pParent = getParent();
-	GuiScrollCtrl *sc = dynamic_cast<GuiScrollCtrl*>(pParent);
-	if(!sc)
-		return;
+   GuiScrollCtrl *sc = dynamic_cast<GuiScrollCtrl*>(pParent);
+   if(!sc)
+      return;
 
    // Ok.  Now we know that our parent is a scroll control.  Let's find the
    //  top of the cursor, and it's bottom.  We can then scroll the parent control
@@ -661,7 +661,7 @@ void GuiMLTextCtrl::ensureCursorOnScreen()
    ColorI color;
    getCursorPositionAndColor(cursorTopP, cursorBottomP, color);
 
-	sc->scrollRectVisible(RectI(cursorTopP.x, cursorTopP.y, 1, cursorBottomP.y - cursorTopP.y));
+   sc->scrollRectVisible(RectI(cursorTopP.x, cursorTopP.y, 1, cursorBottomP.y - cursorTopP.y));
 }
 
 //--------------------------------------
@@ -840,7 +840,7 @@ void GuiMLTextCtrl::onMouseUp(const GuiEvent& event)
 
       // Convert URL from UTF16 to UTF8.
       UTF8* url = mTextBuffer.createSubstring8(mHitURL->textStart, mHitURL->len);
-	  onURL_callback(url);
+     onURL_callback(url);
 
       delete[] url;
       mHitURL = NULL;
@@ -1018,7 +1018,7 @@ void GuiMLTextCtrl::scrollToTag( U32 id )
       Con::warnf( ConsoleLogEntry::General, "GuiMLTextCtrl::scrollToTag - tag id %d not found!", id );
       return;
    }
-	pappy->scrollRectVisible(RectI(0, tag->y, 1, 1));
+   pappy->scrollRectVisible(RectI(0, tag->y, 1, 1));
 }
 
 //--------------------------------------------------------------------------
@@ -1028,7 +1028,7 @@ void GuiMLTextCtrl::scrollToTop()
    GuiScrollCtrl *pappy = dynamic_cast<GuiScrollCtrl*>(getParent());
    if ( !pappy )
       return;
-	pappy->scrollRectVisible(RectI(0,0,0,0));
+   pappy->scrollRectVisible(RectI(0,0,0,0));
 }
 
 //--------------------------------------------------------------------------
@@ -2134,7 +2134,7 @@ textemit:
    emitNewLine(mScanPos);
    setHeight( mMaxY );
    onResize_callback( getWidth(), mMaxY );
-	
+   
    //make sure the cursor is still visible - this handles if we're a child of a scroll ctrl...
    ensureCursorOnScreen();
 }

+ 79 - 79
Engine/source/gui/controls/guiPopUpCtrl.cpp

@@ -233,31 +233,31 @@ void GuiPopupTextListCtrl::onRenderCell(Point2I offset, Point2I cell, bool selec
 IMPLEMENT_CONOBJECT(GuiPopUpMenuCtrl);
 
 ConsoleDocClass( GuiPopUpMenuCtrl,
-	"@brief A control that allows to select a value from a drop-down list.\n\n"
+   "@brief A control that allows to select a value from a drop-down list.\n\n"
 
-	"For a nearly identical GUI with additional features, use GuiPopUpMenuCtrlEx.\n\n"
+   "For a nearly identical GUI with additional features, use GuiPopUpMenuCtrlEx.\n\n"
 
-	"@tsexample\n"
-	"new GuiPopUpMenuCtrl()\n"
-	"{\n"
-	"	maxPopupHeight = \"200\";\n"
-	"	sbUsesNAColor = \"0\";\n"
-	"	reverseTextList = \"0\";\n"
-	"	bitmapBounds = \"16 16\";\n"
-	"	maxLength = \"1024\";\n"
-	"	position = \"56 31\";\n"
-	"	extent = \"64 64\";\n"
-	"	minExtent = \"8 2\";\n"
-	"	profile = \"GuiPopUpMenuProfile\";\n"
-	"	tooltipProfile = \"GuiToolTipProfile\";\n"
-	"};\n"
-	"@endtsexample\n\n"
+   "@tsexample\n"
+   "new GuiPopUpMenuCtrl()\n"
+   "{\n"
+   "  maxPopupHeight = \"200\";\n"
+   "  sbUsesNAColor = \"0\";\n"
+   "  reverseTextList = \"0\";\n"
+   "  bitmapBounds = \"16 16\";\n"
+   "  maxLength = \"1024\";\n"
+   "  position = \"56 31\";\n"
+   "  extent = \"64 64\";\n"
+   "  minExtent = \"8 2\";\n"
+   "  profile = \"GuiPopUpMenuProfile\";\n"
+   "  tooltipProfile = \"GuiToolTipProfile\";\n"
+   "};\n"
+   "@endtsexample\n\n"
 
-	"@note This is definitely going to be deprecated soon.\n\n"
+   "@note This is definitely going to be deprecated soon.\n\n"
 
-	"@see GuiPopUpMenuCtrlEx for more features and better explanations.\n"
+   "@see GuiPopUpMenuCtrlEx for more features and better explanations.\n"
 
-	"@ingroup GuiControls\n");
+   "@ingroup GuiControls\n");
 
 GuiPopUpMenuCtrl::GuiPopUpMenuCtrl(void)
 {
@@ -279,7 +279,7 @@ GuiPopUpMenuCtrl::GuiPopUpMenuCtrl(void)
    mReverseTextList = false; //  Added - Don't reverse text list if displaying up
    mBitmapName = StringTable->insert(""); //  Added
    mBitmapBounds.set(16, 16); //  Added
-	mIdMax = -1;
+   mIdMax = -1;
 }
 
 //------------------------------------------------------------------------------
@@ -302,11 +302,11 @@ void GuiPopUpMenuCtrl::initPersistFields(void)
 //------------------------------------------------------------------------------
 DefineConsoleMethod( GuiPopUpMenuCtrl, add, void, (const char * name, S32 idNum, U32 scheme), ("", -1, 0), "(string name, int idNum, int scheme=0)")
 {
-  	object->addEntry(name, idNum, scheme);
+   object->addEntry(name, idNum, scheme);
 }
 
 DefineConsoleMethod( GuiPopUpMenuCtrl, addScheme, void, (U32 id, ColorI fontColor, ColorI fontColorHL, ColorI fontColorSEL), , 
-	"(int id, ColorI fontColor, ColorI fontColorHL, ColorI fontColorSEL)")
+   "(int id, ColorI fontColor, ColorI fontColorHL, ColorI fontColorSEL)")
 {
 
    object->addScheme( id, fontColor, fontColorHL, fontColorSEL );
@@ -492,43 +492,43 @@ void GuiPopUpMenuCtrl::clear()
    setText("");
    mSelIndex = -1;
    mRevNum = 0;
-	mIdMax = -1;
+   mIdMax = -1;
 }
 
 //------------------------------------------------------------------------------
 void GuiPopUpMenuCtrl::clearEntry( S32 entry )
-{	
-	if( entry == -1 )
-		return;
+{  
+   if( entry == -1 )
+      return;
 
-	U32 i = 0;
-	for ( ; i < mEntries.size(); i++ )
+   U32 i = 0;
+   for ( ; i < mEntries.size(); i++ )
    {
       if ( mEntries[i].id == entry )
          break;
    }
 
-	mEntries.erase( i );
-
-	if( mEntries.size() <= 0 )
-	{
-		mEntries.setSize(0);
-		setText("");
-		mSelIndex = -1;
-		mRevNum = 0;
-	}
-	else
-	{
-		if (entry < mSelIndex)
-		{
-			mSelIndex--;
-		}
-		else if( entry == mSelIndex )
-		{
-			setText("");
-			mSelIndex = -1;
-		}
-	}
+   mEntries.erase( i );
+
+   if( mEntries.size() <= 0 )
+   {
+      mEntries.setSize(0);
+      setText("");
+      mSelIndex = -1;
+      mRevNum = 0;
+   }
+   else
+   {
+      if (entry < mSelIndex)
+      {
+         mSelIndex--;
+      }
+      else if( entry == mSelIndex )
+      {
+         setText("");
+         mSelIndex = -1;
+      }
+   }
 }
 
 //------------------------------------------------------------------------------
@@ -620,21 +620,21 @@ void GuiPopUpMenuCtrl::addEntry( const char *buf, S32 id, U32 scheme )
       //Con::printf( "GuiPopupMenuCtrlEx::addEntry - Invalid buffer!" );
       return;
    }
-	
-	// Ensure that there are no other entries with exactly the same name
-	for ( U32 i = 0; i < mEntries.size(); i++ )
+   
+   // Ensure that there are no other entries with exactly the same name
+   for ( U32 i = 0; i < mEntries.size(); i++ )
    {
       if ( dStrcmp( mEntries[i].buf, buf ) == 0 )
          return;
    }
 
-	// If we don't give an id, create one from mIdMax
-	if( id == -1 )
-		id = mIdMax + 1;
-	
-	// Increase mIdMax when an id is greater than it
-	if( id > mIdMax )
-		mIdMax = id;
+   // If we don't give an id, create one from mIdMax
+   if( id == -1 )
+      id = mIdMax + 1;
+   
+   // Increase mIdMax when an id is greater than it
+   if( id > mIdMax )
+      mIdMax = id;
 
    Entry e;
    dStrcpy( e.buf, buf );
@@ -802,28 +802,28 @@ void GuiPopUpMenuCtrl::setFirstSelected( bool bNotifyScript )
          setText( mEntries[0].buf );
       }
 
-		// Execute the popup console command:
-		if( bNotifyScript )
+      // Execute the popup console command:
+      if( bNotifyScript )
       {
          if ( isMethod( "onSelect" ) )
             Con::executef( this, "onSelect", Con::getIntArg( mEntries[ mSelIndex ].id ), mEntries[mSelIndex].buf );
 
-			execConsoleCallback();
+         execConsoleCallback();
       }
    }
-	else
-	{
-		if ( mReplaceText ) //  Only change the displayed text if appropriate.
-			setText("");
-		
-		mSelIndex = -1;
-
-		if( bNotifyScript )
+   else
+   {
+      if ( mReplaceText ) //  Only change the displayed text if appropriate.
+         setText("");
+      
+      mSelIndex = -1;
+
+      if( bNotifyScript )
       {
-			Con::executef( this, "onCancel" );
+         Con::executef( this, "onCancel" );
          execConsoleCallback();
       }
-	}
+   }
 }
 
 //------------------------------------------------------------------------------
@@ -1278,11 +1278,11 @@ void GuiPopUpMenuCtrl::onAction()
    if ( setScroll )
    {
       // Resize the text list
-	  Point2I cellSize;
-	  mTl->getCellSize( cellSize );
-	  cellSize.x = width - mSc->scrollBarThickness() - sbBorder;
-	  mTl->setCellSize( cellSize );
-	  mTl->setWidth( cellSize.x );
+     Point2I cellSize;
+     mTl->getCellSize( cellSize );
+     cellSize.x = width - mSc->scrollBarThickness() - sbBorder;
+     mTl->setCellSize( cellSize );
+     mTl->setWidth( cellSize.x );
 
       if ( mSelIndex )
          mTl->scrollCellVisible( Point2I( 0, mSelIndex ) );
@@ -1315,7 +1315,7 @@ void GuiPopUpMenuCtrl::addChildren()
    else
    {
       // Use the children's profile rather than the parent's profile, if it exists.
-	  mSc->setControlProfile( mProfile->getChildrenProfile() ? mProfile->getChildrenProfile() : mProfile );
+     mSc->setControlProfile( mProfile->getChildrenProfile() ? mProfile->getChildrenProfile() : mProfile );
    }
 
    mSc->setField( "hScrollBar", "AlwaysOff" );

+ 150 - 150
Engine/source/gui/controls/guiPopUpCtrlEx.cpp

@@ -30,27 +30,27 @@
 #include "console/engineAPI.h"
 
 ConsoleDocClass( GuiPopUpMenuCtrlEx,
-	"@brief A control that allows to select a value from a drop-down list.\n\n"
+   "@brief A control that allows to select a value from a drop-down list.\n\n"
 
-	"This is essentially a GuiPopUpMenuCtrl, but with quite a few more features.\n\n"
+   "This is essentially a GuiPopUpMenuCtrl, but with quite a few more features.\n\n"
 
-	"@tsexample\n"
-	"new GuiPopUpMenuCtrlEx()\n"
-	"{\n"
-	"	maxPopupHeight = \"200\";\n"
-	"	sbUsesNAColor = \"0\";\n"
-	"	reverseTextList = \"0\";\n"
-	"	bitmapBounds = \"16 16\";\n"
-	"	hotTrackCallback = \"0\";\n"
-	"	extent = \"64 64\";\n"
-	"	profile = \"GuiDefaultProfile\";\n"
-	"	tooltipProfile = \"GuiToolTipProfile\";\n"
-	"};\n"
-	"@endtsexample\n\n"
+   "@tsexample\n"
+   "new GuiPopUpMenuCtrlEx()\n"
+   "{\n"
+   "  maxPopupHeight = \"200\";\n"
+   "  sbUsesNAColor = \"0\";\n"
+   "  reverseTextList = \"0\";\n"
+   "  bitmapBounds = \"16 16\";\n"
+   "  hotTrackCallback = \"0\";\n"
+   "  extent = \"64 64\";\n"
+   "  profile = \"GuiDefaultProfile\";\n"
+   "  tooltipProfile = \"GuiToolTipProfile\";\n"
+   "};\n"
+   "@endtsexample\n\n"
 
-	"@see GuiPopUpMenuCtrl\n"
+   "@see GuiPopUpMenuCtrl\n"
 
-	"@ingroup GuiControls\n");
+   "@ingroup GuiControls\n");
 
 static ColorI colorWhite(255,255,255); //  Added
 
@@ -331,7 +331,7 @@ GuiPopUpMenuCtrlEx::GuiPopUpMenuCtrlEx(void)
    mBitmapName = StringTable->insert(""); //  Added
    mBitmapBounds.set(16, 16); //  Added
    mHotTrackItems = false;
-	mIdMax = -1;
+   mIdMax = -1;
 }
 
 //------------------------------------------------------------------------------
@@ -355,13 +355,13 @@ void GuiPopUpMenuCtrlEx::initPersistFields(void)
 
 //------------------------------------------------------------------------------
 ConsoleDocFragment _GuiPopUpMenuCtrlExAdd(
-	"@brief Adds an entry to the list\n\n"
-	"@param name String containing the name of the entry\n"
-	"@param idNum Numerical value assigned to the name\n"
-	"@param scheme Optional ID associated with a scheme "
-	"for font coloring, highlight coloring, and selection coloring\n\n",
-	"GuiPopUpMenuCtrlEx",
-	"void add(string name, S32 idNum, S32 scheme=0);"
+   "@brief Adds an entry to the list\n\n"
+   "@param name String containing the name of the entry\n"
+   "@param idNum Numerical value assigned to the name\n"
+   "@param scheme Optional ID associated with a scheme "
+   "for font coloring, highlight coloring, and selection coloring\n\n",
+   "GuiPopUpMenuCtrlEx",
+   "void add(string name, S32 idNum, S32 scheme=0);"
 );
 
 DefineConsoleMethod( GuiPopUpMenuCtrlEx, add, void, (const char * name, S32 idNum, U32 scheme), ("", -1, 0), "(string name, int idNum, int scheme=0)")
@@ -370,23 +370,23 @@ DefineConsoleMethod( GuiPopUpMenuCtrlEx, add, void, (const char * name, S32 idNu
 }
 
 DefineEngineMethod( GuiPopUpMenuCtrlEx, addCategory, void, (const char* text),,
-				   "@brief Add a category to the list.\n\n"
+               "@brief Add a category to the list.\n\n"
 
-				   "Acts as a separator between entries, allowing for sub-lists\n\n"
+               "Acts as a separator between entries, allowing for sub-lists\n\n"
 
-				   "@param text Name of the new category\n\n")
+               "@param text Name of the new category\n\n")
 {
-	object->addEntry(text, -1, 0);
+   object->addEntry(text, -1, 0);
 }
 
 DefineEngineMethod( GuiPopUpMenuCtrlEx, addScheme, void, (S32 id, ColorI fontColor, ColorI fontColorHL, ColorI fontColorSEL),,
-				   "@brief Create a new scheme and add it to the list of choices for when a new text entry is added.\n\n"
-				   "@param id Numerical id associated with this scheme\n"
-				   "@param fontColor The base text font color. Formatted as \"Red Green Blue\", each a numerical between 0 and 255.\n"
-				   "@param fontColorHL Color of text when being highlighted. Formatted as \"Red Green Blue\", each a numerical between 0 and 255.\n"
-				   "@param fontColorSel Color of text when being selected. Formatted as \"Red Green Blue\", each a numerical between 0 and 255.\n")
+               "@brief Create a new scheme and add it to the list of choices for when a new text entry is added.\n\n"
+               "@param id Numerical id associated with this scheme\n"
+               "@param fontColor The base text font color. Formatted as \"Red Green Blue\", each a numerical between 0 and 255.\n"
+               "@param fontColorHL Color of text when being highlighted. Formatted as \"Red Green Blue\", each a numerical between 0 and 255.\n"
+               "@param fontColorSel Color of text when being selected. Formatted as \"Red Green Blue\", each a numerical between 0 and 255.\n")
 {
-	/*ColorI fontColor, fontColorHL, fontColorSEL;
+   /*ColorI fontColor, fontColorHL, fontColorSEL;
    U32 r, g, b;
    char buf[64];
 
@@ -457,127 +457,127 @@ DefineEngineMethod( GuiPopUpMenuCtrlEx, addScheme, void, (S32 id, ColorI fontCol
 //}
 
 DefineEngineMethod( GuiPopUpMenuCtrlEx, setText, void, ( const char* text),,
-				   "@brief Set the current text to a specified value.\n\n"
-				   "@param text String containing new text to set\n\n")
+               "@brief Set the current text to a specified value.\n\n"
+               "@param text String containing new text to set\n\n")
 {
-	object->setText(text);
+   object->setText(text);
 }
 
 DefineEngineMethod( GuiPopUpMenuCtrlEx, getText, const char*, (),,
-				   "@brief Get the.\n\n"
+               "@brief Get the.\n\n"
 
-				   "Detailed description\n\n"
+               "Detailed description\n\n"
 
-				   "@param param Description\n\n"
+               "@param param Description\n\n"
 
-				   "@tsexample\n"
-				   "// Comment\n"
-				   "code();\n"
-				   "@endtsexample\n\n"
+               "@tsexample\n"
+               "// Comment\n"
+               "code();\n"
+               "@endtsexample\n\n"
 
-				   "@return Returns current text in string format")
+               "@return Returns current text in string format")
 {
-	return object->getText();
+   return object->getText();
 }
 
 DefineEngineMethod( GuiPopUpMenuCtrlEx, clear, void, (),,
-				   "@brief Clear the popup list.\n\n")
+               "@brief Clear the popup list.\n\n")
 {
-	object->clear();
+   object->clear();
 }
 
 DefineEngineMethod( GuiPopUpMenuCtrlEx, sort, void, (),,
-				   "@brief Sort the list alphabetically.\n\n")
+               "@brief Sort the list alphabetically.\n\n")
 {
-	object->sort();
+   object->sort();
 }
 
 DefineEngineMethod( GuiPopUpMenuCtrlEx, sortID, void, (),,
-				   "@brief Sort the list by ID.\n\n")
+               "@brief Sort the list by ID.\n\n")
 {
-	object->sortID();
+   object->sortID();
 }
 
 DefineEngineMethod( GuiPopUpMenuCtrlEx, forceOnAction, void, (),,
-				   "@brief Manually for the onAction function, which updates everything in this control.\n\n")
+               "@brief Manually for the onAction function, which updates everything in this control.\n\n")
 {
-	object->onAction();
+   object->onAction();
 }
 
 DefineEngineMethod( GuiPopUpMenuCtrlEx, forceClose, void, (),,
-				   "@brief Manually force this control to collapse and close.\n\n")
+               "@brief Manually force this control to collapse and close.\n\n")
 {
-	object->closePopUp();
+   object->closePopUp();
 }
 
 DefineEngineMethod( GuiPopUpMenuCtrlEx, getSelected, S32, (),,
-				   "@brief Get the current selection of the menu.\n\n"
-				   "@return Returns the ID of the currently selected entry")
+               "@brief Get the current selection of the menu.\n\n"
+               "@return Returns the ID of the currently selected entry")
 {
-	return object->getSelected();
+   return object->getSelected();
 }
 
 ConsoleDocFragment _GuiPopUpMenuCtrlExsetSelected(
-	"brief Manually set an entry as selected int his control\n\n"
-	"@param id The ID of the entry to select\n"
-	"@param scripCallback Optional boolean that forces the script callback if true\n",
-	"GuiPopUpMenuCtrlEx",
-	"setSelected(int id, bool scriptCallback=true);"
+   "brief Manually set an entry as selected int his control\n\n"
+   "@param id The ID of the entry to select\n"
+   "@param scripCallback Optional boolean that forces the script callback if true\n",
+   "GuiPopUpMenuCtrlEx",
+   "setSelected(int id, bool scriptCallback=true);"
 );
 
 DefineConsoleMethod( GuiPopUpMenuCtrlEx, setSelected, void, (S32 id, bool scriptCallback), (true), "(int id, [scriptCallback=true])"
-			  "@hide")
+           "@hide")
 {
    object->setSelected( id, scriptCallback );
 }
 
 ConsoleDocFragment _GuiPopUpMenuCtrlExsetFirstSelected(
-	"brief Manually set the selection to the first entry\n\n"
-	"@param scripCallback Optional boolean that forces the script callback if true\n",
-	"GuiPopUpMenuCtrlEx",
-	"setSelected(bool scriptCallback=true);"
+   "brief Manually set the selection to the first entry\n\n"
+   "@param scripCallback Optional boolean that forces the script callback if true\n",
+   "GuiPopUpMenuCtrlEx",
+   "setSelected(bool scriptCallback=true);"
 );
 
 
 DefineConsoleMethod( GuiPopUpMenuCtrlEx, setFirstSelected, void, (bool scriptCallback), (true), "([scriptCallback=true])"
-			  "@hide")
+           "@hide")
 {
    object->setFirstSelected( scriptCallback );
 }
 
 DefineEngineMethod( GuiPopUpMenuCtrlEx, setNoneSelected, void, ( S32 param),,
-				   "@brief Clears selection in the menu.\n\n")
+               "@brief Clears selection in the menu.\n\n")
 {
-	object->setNoneSelected();
+   object->setNoneSelected();
 }
 
 
 DefineEngineMethod( GuiPopUpMenuCtrlEx, getTextById, const char*, (S32 id),,
-				   "@brief Get the text of an entry based on an ID.\n\n"
-				   "@param id The ID assigned to the entry being queried\n\n"
-				   "@return String contained by the specified entry, NULL if empty or bad ID")
+               "@brief Get the text of an entry based on an ID.\n\n"
+               "@param id The ID assigned to the entry being queried\n\n"
+               "@return String contained by the specified entry, NULL if empty or bad ID")
 {
-	return(object->getTextById(id));
+   return(object->getTextById(id));
 }
 
 
 DefineConsoleMethod( GuiPopUpMenuCtrlEx, getColorById,  ColorI, (S32 id), ,  
-			  "@brief Get color of an entry's box\n\n"
-			  "@param id ID number of entry to query\n\n"
-			  "@return ColorI in the format of \"Red Green Blue Alpha\", each of with is a value between 0 - 255")
+           "@brief Get color of an entry's box\n\n"
+           "@param id ID number of entry to query\n\n"
+           "@return ColorI in the format of \"Red Green Blue Alpha\", each of with is a value between 0 - 255")
 {
    ColorI color;
    object->getColoredBox(color, id);
-	return color;
+   return color;
 
 }
 
 DefineConsoleMethod( GuiPopUpMenuCtrlEx, setEnumContent, void, ( const char * className, const char * enumName ), ,
-			  "@brief This fills the popup with a classrep's field enumeration type info.\n\n"
+           "@brief This fills the popup with a classrep's field enumeration type info.\n\n"
               "More of a helper function than anything.   If console access to the field list is added, "
               "at least for the enumerated types, then this should go away.\n\n"
-			  "@param class Name of the class containing the enum\n"
-			  "@param enum Name of the enum value to acces\n")
+           "@param class Name of the class containing the enum\n"
+           "@param enum Name of the enum value to acces\n")
 {
    AbstractClassRep * classRep = AbstractClassRep::getClassList();
 
@@ -630,24 +630,24 @@ DefineConsoleMethod( GuiPopUpMenuCtrlEx, setEnumContent, void, ( const char * cl
 //------------------------------------------------------------------------------
 DefineConsoleMethod( GuiPopUpMenuCtrlEx, findText, S32, (const char * text), , "(string text)"
               "Returns the id of the first entry containing the specified text or -1 if not found."
-			  "@param text String value used for the query\n\n"
-			  "@return Numerical ID of entry containing the text.")
+           "@param text String value used for the query\n\n"
+           "@return Numerical ID of entry containing the text.")
 {
    return( object->findText( text ) );
 }
 
 //------------------------------------------------------------------------------
 DefineConsoleMethod( GuiPopUpMenuCtrlEx, size, S32, (), , 
-			  "@brief Get the size of the menu\n\n"
-			  "@return Number of entries in the menu\n")
+           "@brief Get the size of the menu\n\n"
+           "@return Number of entries in the menu\n")
 {
    return( object->getNumEntries() ); 
 }
 
 //------------------------------------------------------------------------------
 DefineConsoleMethod( GuiPopUpMenuCtrlEx, replaceText, void, (S32 boolVal), , 
-			  "@brief Flag that causes each new text addition to replace the current entry\n\n"
-			  "@param True to turn on replacing, false to disable it")
+           "@brief Flag that causes each new text addition to replace the current entry\n\n"
+           "@param True to turn on replacing, false to disable it")
 {
    object->replaceText(boolVal);
 }
@@ -697,43 +697,43 @@ void GuiPopUpMenuCtrlEx::clear()
    setText("");
    mSelIndex = -1;
    mRevNum = 0;
-	mIdMax = -1;
+   mIdMax = -1;
 }
 
 //------------------------------------------------------------------------------
 void GuiPopUpMenuCtrlEx::clearEntry( S32 entry )
 {
-	if( entry == -1 )
-		return;
+   if( entry == -1 )
+      return;
 
-	U32 i = 0;
-	for ( ; i < mEntries.size(); i++ )
+   U32 i = 0;
+   for ( ; i < mEntries.size(); i++ )
    {
       if ( mEntries[i].id == entry )
          break;
    }
 
-	mEntries.erase( i );
-
-	if( mEntries.size() <= 0 )
-	{
-		mEntries.setSize(0);
-		setText("");
-		mSelIndex = -1;
-		mRevNum = 0;
-	}
-	else
-	{
-		if( entry == mSelIndex )
-		{
-			setText("");
-			mSelIndex = -1;
-		}
-		else
-		{
-			mSelIndex--;
-		}
-	}
+   mEntries.erase( i );
+
+   if( mEntries.size() <= 0 )
+   {
+      mEntries.setSize(0);
+      setText("");
+      mSelIndex = -1;
+      mRevNum = 0;
+   }
+   else
+   {
+      if( entry == mSelIndex )
+      {
+         setText("");
+         mSelIndex = -1;
+      }
+      else
+      {
+         mSelIndex--;
+      }
+   }
 }
 
 //------------------------------------------------------------------------------
@@ -797,9 +797,9 @@ void GuiPopUpMenuCtrlEx::sort()
    if( size > 0 )
       dQsort( mEntries.address(), size, sizeof(Entry), textCompare);
 
-	// Entries need to re-Id themselves
-	for( U32 i = 0; i < mEntries.size(); i++ )
-		mEntries[i].id = i;
+   // Entries need to re-Id themselves
+   for( U32 i = 0; i < mEntries.size(); i++ )
+      mEntries[i].id = i;
 }
 
 //  Added to sort by entry ID
@@ -810,9 +810,9 @@ void GuiPopUpMenuCtrlEx::sortID()
    if( size > 0 )
       dQsort( mEntries.address(), size, sizeof(Entry), idCompare);
 
-	// Entries need to re-Id themselves
-	for( U32 i = 0; i < mEntries.size(); i++ )
-		mEntries[i].id = i;
+   // Entries need to re-Id themselves
+   for( U32 i = 0; i < mEntries.size(); i++ )
+      mEntries[i].id = i;
 }
 
 //------------------------------------------------------------------------------
@@ -823,21 +823,21 @@ void GuiPopUpMenuCtrlEx::addEntry(const char *buf, S32 id, U32 scheme)
       //Con::printf( "GuiPopupMenuCtrlEx::addEntry - Invalid buffer!" );
       return;
    }
-	
-	// Ensure that there are no other entries with exactly the same name
-	for ( U32 i = 0; i < mEntries.size(); i++ )
+   
+   // Ensure that there are no other entries with exactly the same name
+   for ( U32 i = 0; i < mEntries.size(); i++ )
    {
       if ( dStrcmp( mEntries[i].buf, buf ) == 0 )
          return;
    }
 
-	// If we don't give an id, create one from mIdMax
-	if( id == -1 )
-		id = mIdMax + 1;
-	
-	// Increase mIdMax when an id is greater than it
-	if( id > mIdMax )
-		mIdMax = id;
+   // If we don't give an id, create one from mIdMax
+   if( id == -1 )
+      id = mIdMax + 1;
+   
+   // Increase mIdMax when an id is greater than it
+   if( id > mIdMax )
+      mIdMax = id;
 
    Entry e;
    dStrcpy( e.buf, buf );
@@ -992,20 +992,20 @@ void GuiPopUpMenuCtrlEx::setFirstSelected( bool bNotifyScript )
       if ( isMethod( "onSelect" ) )
          Con::executef( this, "onSelect", idval, mEntries[mSelIndex].buf );
       
-		// Execute the popup console command:
-		if ( bNotifyScript )
-			execConsoleCallback();
+      // Execute the popup console command:
+      if ( bNotifyScript )
+         execConsoleCallback();
    }
-	else
-	{
-		if ( mReplaceText ) //  Only change the displayed text if appropriate.
-			setText("");
-		
-		mSelIndex = -1;
+   else
+   {
+      if ( mReplaceText ) //  Only change the displayed text if appropriate.
+         setText("");
+      
+      mSelIndex = -1;
 
-		if ( bNotifyScript )
-			Con::executef( this, "onCancel" );
-	}
+      if ( bNotifyScript )
+         Con::executef( this, "onCancel" );
+   }
 }
 
 //------------------------------------------------------------------------------
@@ -1500,11 +1500,11 @@ void GuiPopUpMenuCtrlEx::onAction()
    if ( setScroll )
    {
       // Resize the text list
-	  Point2I cellSize;
-	  mTl->getCellSize( cellSize );
-	  cellSize.x = width - mSc->scrollBarThickness() - sbBorder;
-	  mTl->setCellSize( cellSize );
-	  mTl->setWidth( cellSize.x );
+     Point2I cellSize;
+     mTl->getCellSize( cellSize );
+     cellSize.x = width - mSc->scrollBarThickness() - sbBorder;
+     mTl->setCellSize( cellSize );
+     mTl->setWidth( cellSize.x );
 
       if ( mSelIndex )
          mTl->scrollCellVisible( Point2I( 0, mSelIndex ) );
@@ -1536,7 +1536,7 @@ void GuiPopUpMenuCtrlEx::addChildren()
    else
    {
       // Use the children's profile rather than the parent's profile, if it exists.
-	  mSc->setControlProfile( mProfile->getChildrenProfile() ? mProfile->getChildrenProfile() : mProfile );
+     mSc->setControlProfile( mProfile->getChildrenProfile() ? mProfile->getChildrenProfile() : mProfile );
    }
    mSc->setField( "hScrollBar", "AlwaysOff" );
    mSc->setField( "vScrollBar", "dynamic" );

+ 20 - 20
Engine/source/gui/controls/guiTextCtrl.cpp

@@ -37,13 +37,13 @@ ConsoleDocClass( GuiTextCtrl,
    "@brief GUI control object this displays a single line of text, without TorqueML.\n\n"
 
    "@tsexample\n"
-   "	new GuiTextCtrl()\n"
-   "	{\n"
-   "		text = \"Hello World\";\n"
-   "		textID = \"\"STR_HELLO\"\";\n"
-   "		maxlength = \"1024\";\n"
-   "	    //Properties not specific to this control have been omitted from this example.\n"
-   "	};\n"
+   "  new GuiTextCtrl()\n"
+   "  {\n"
+   "     text = \"Hello World\";\n"
+   "     textID = \"\"STR_HELLO\"\";\n"
+   "     maxlength = \"1024\";\n"
+   "      //Properties not specific to this control have been omitted from this example.\n"
+   "  };\n"
    "@endtsexample\n\n"
 
    "@see GuiControl\n"
@@ -84,7 +84,7 @@ DefineEngineMethod( GuiTextCtrl, setTextID, void, (const char* textID),,
    "@see GuiControl"
    "@see Localization")
 {
-	object->setTextID( textID );
+   object->setTextID( textID );
 }
 
 void GuiTextCtrl::initPersistFields()
@@ -117,7 +117,7 @@ void GuiTextCtrl::inspectPostApply()
 {
    Parent::inspectPostApply();
    if(mInitialTextID && *mInitialTextID != 0)
-	   setTextID(mInitialTextID);
+      setTextID(mInitialTextID);
    else if( mConsoleVariable[ 0 ] )
       setText( getVariable() );
    else
@@ -135,7 +135,7 @@ bool GuiTextCtrl::onWake()
       return false;
    }
    if(mInitialTextID && *mInitialTextID != 0)
-	   setTextID(mInitialTextID);
+      setTextID(mInitialTextID);
 
    if ( mConsoleVariable[0] )
    {
@@ -202,19 +202,19 @@ void GuiTextCtrl::setText(const char *txt)
 
 void GuiTextCtrl::setTextID(const char *id)
 {
-	S32 n = Con::getIntVariable(id, -1);
-	if(n != -1)
-	{
-		mInitialTextID = StringTable->insert(id);
-		setTextID(n);
-	}
+   S32 n = Con::getIntVariable(id, -1);
+   if(n != -1)
+   {
+      mInitialTextID = StringTable->insert(id);
+      setTextID(n);
+   }
 }
 void GuiTextCtrl::setTextID(S32 id)
 {
-	const UTF8 *str = getGUIString(id);
-	if(str)
-		setText((const char*)str);
-	//mInitialTextID = id;
+   const UTF8 *str = getGUIString(id);
+   if(str)
+      setText((const char*)str);
+   //mInitialTextID = id;
 }
 
 void GuiTextCtrl::onPreRender()

+ 69 - 69
Engine/source/gui/controls/guiTextEditCtrl.cpp

@@ -46,17 +46,17 @@ ConsoleDocClass( GuiTextEditCtrl,
 
    "@tsexample\n"
    "   new GuiTextEditCtrl(MessageHud_Edit)\n"
-   "	{\n"
-   "		 text = \"Hello World\";\n"
-   "		 validate = \"validateCommand();\"\n"
-   "		 escapeCommand = \"escapeCommand();\";\n"
-   "		 historySize = \"5\";\n"
-   "		 tabComplete = \"true\";\n"
-   "		 deniedSound = \"DeniedSoundProfile\";\n"
-   "		 sinkAllKeyEvents = \"true\";\n"
-   "		 password = \"true\";\n"
-   "		 passwordMask = \"*\";\n"
-   "	     //Properties not specific to this control have been omitted from this example.\n"
+   "  {\n"
+   "      text = \"Hello World\";\n"
+   "      validate = \"validateCommand();\"\n"
+   "      escapeCommand = \"escapeCommand();\";\n"
+   "      historySize = \"5\";\n"
+   "      tabComplete = \"true\";\n"
+   "      deniedSound = \"DeniedSoundProfile\";\n"
+   "      sinkAllKeyEvents = \"true\";\n"
+   "      password = \"true\";\n"
+   "      passwordMask = \"*\";\n"
+   "       //Properties not specific to this control have been omitted from this example.\n"
    "   };\n"
    "@endtsexample\n\n"
 
@@ -72,9 +72,9 @@ IMPLEMENT_CALLBACK( GuiTextEditCtrl, onTabComplete, void, (const char* val),( va
    "@tsexample\n"
    "// Tab key has been pressed, causing the callback to occur.\n"
    "GuiTextEditCtrl::onTabComplete(%this,%val)\n"
-   "	{\n"
-   "		//Code to run when the onTabComplete callback occurs\n"
-   "	}\n"
+   "  {\n"
+   "     //Code to run when the onTabComplete callback occurs\n"
+   "  }\n"
    "@endtsexample\n\n"
    "@see GuiTextCtrl\n"
    "@see GuiControl\n\n"
@@ -85,9 +85,9 @@ IMPLEMENT_CALLBACK( GuiTextEditCtrl, onReturn, void, (),(),
    "@tsexample\n"
    "// Return or Enter key was pressed, causing the callback to occur.\n"
    "GuiTextEditCtrl::onReturn(%this)\n"
-   "	{\n"
-   "		// Code to run when the onReturn callback occurs\n"
-   "	}\n"
+   "  {\n"
+   "     // Code to run when the onReturn callback occurs\n"
+   "  }\n"
    "@endtsexample\n\n"
    "@see GuiTextCtrl\n"
    "@see GuiControl\n\n"
@@ -98,9 +98,9 @@ IMPLEMENT_CALLBACK( GuiTextEditCtrl, onValidate, void, (),(),
    "@tsexample\n"
    "// The control gets validated, causing the callback to occur\n"
    "GuiTextEditCtrl::onValidated(%this)\n"
-   "	{\n"
-   "		// Code to run when the control is validated\n"
-   "	}\n"
+   "  {\n"
+   "     // Code to run when the control is validated\n"
+   "  }\n"
    "@endtsexample\n\n"
    "@see GuiTextCtrl\n"
    "@see GuiControl\n\n"
@@ -139,7 +139,7 @@ GuiTextEditCtrl::GuiTextEditCtrl()
    mHistoryBuf = NULL;
 
 #if defined(__MACOSX__)
-   UTF8	bullet[4] = { 0xE2, 0x80, 0xA2, 0 };
+   UTF8  bullet[4] = { 0xE2, 0x80, 0xA2, 0 };
    
    mPasswordMask = StringTable->insert( bullet );
 #else
@@ -710,10 +710,10 @@ bool GuiTextEditCtrl::onKeyDown(const GuiEvent &event)
             case KEY_TAB:
                if ( mTabComplete )
                {
-				  onTabComplete_callback("1");
+              onTabComplete_callback("1");
                   return true;
                }
-			   break; // We don't want to fall through if we don't handle the TAB here.
+            break; // We don't want to fall through if we don't handle the TAB here.
 
             case KEY_HOME:
                mBlockStart = 0;
@@ -779,10 +779,10 @@ bool GuiTextEditCtrl::onKeyDown(const GuiEvent &event)
                 }
                 return true;
 
-				case KEY_RETURN:
-				case KEY_NUMPADENTER:
+            case KEY_RETURN:
+            case KEY_NUMPADENTER:
            
-					return dealWithEnter(false);
+               return dealWithEnter(false);
 
             default:
                break;
@@ -998,7 +998,7 @@ bool GuiTextEditCtrl::onKeyDown(const GuiEvent &event)
          case KEY_RETURN:
          case KEY_NUMPADENTER:
            
-				return dealWithEnter(true);
+            return dealWithEnter(true);
 
          case KEY_UP:
          {
@@ -1155,7 +1155,7 @@ dealWithBackspace:
       case KEY_TAB:
          if ( mTabComplete )
          {
-			onTabComplete_callback("0");
+         onTabComplete_callback("0");
             return( true );
          }
       case KEY_UP:
@@ -1208,9 +1208,9 @@ bool GuiTextEditCtrl::dealWithEnter( bool clearResponder )
          return true;
       }
    }
-	
-	if( clearResponder )
-		clearFirstResponder();
+   
+   if( clearResponder )
+      clearFirstResponder();
 
    return true;
 }
@@ -1222,13 +1222,13 @@ void GuiTextEditCtrl::setFirstResponder()
    GuiCanvas *root = getRoot();
    if (root != NULL)
    {
-		root->enableKeyboardTranslation();
+      root->enableKeyboardTranslation();
   
 
-	   // If the native OS accelerator keys are not disabled
-		// then some key events like Delete, ctrl+V, etc may
-		// not make it down to us.
-		root->setNativeAcceleratorsEnabled( false );
+      // If the native OS accelerator keys are not disabled
+      // then some key events like Delete, ctrl+V, etc may
+      // not make it down to us.
+      root->setNativeAcceleratorsEnabled( false );
    }
 }
 
@@ -1237,8 +1237,8 @@ void GuiTextEditCtrl::onLoseFirstResponder()
    GuiCanvas *root = getRoot();
    if( root )
    {
-	 root->setNativeAcceleratorsEnabled( true );
-	 root->disableKeyboardTranslation();
+    root->setNativeAcceleratorsEnabled( true );
+    root->disableKeyboardTranslation();
    }
 
    //execute the validate command
@@ -1546,29 +1546,29 @@ void GuiTextEditCtrl::handleCharInput( U16 ascii )
    //see if it's a number field
    if ( mProfile->mNumbersOnly )
    {
-	   if (ascii == '-')
-	   {
-		   //a minus sign only exists at the beginning, and only a single minus sign
-		   if (mCursorPos != 0 && !isAllTextSelected())
-		   {
-			   invalidText();
-			   return;
-		   }
-
-		   if (mInsertOn && (mTextBuffer.getChar(0) == '-'))
-		   {
-			   invalidText();
-			   return;
-		   }
-	   }
-	   // BJTODO: This is probably not unicode safe.
-	   else if (ascii != '.' && (ascii < '0' || ascii > '9'))
-	   {
-		   invalidText();
-		   return;
-	   }
-	   else
-		   validText();
+      if (ascii == '-')
+      {
+         //a minus sign only exists at the beginning, and only a single minus sign
+         if (mCursorPos != 0 && !isAllTextSelected())
+         {
+            invalidText();
+            return;
+         }
+
+         if (mInsertOn && (mTextBuffer.getChar(0) == '-'))
+         {
+            invalidText();
+            return;
+         }
+      }
+      // BJTODO: This is probably not unicode safe.
+      else if (ascii != '.' && (ascii < '0' || ascii > '9'))
+      {
+         invalidText();
+         return;
+      }
+      else
+         validText();
    }
 
    //save the current state
@@ -1778,22 +1778,22 @@ DefineEngineMethod( GuiTextEditCtrl, forceValidateText, void, (),,
 }
 
 DefineEngineMethod(GuiTextEditCtrl, invalidText, void, (bool playSound), (true),
-	"@brief Trigger the invalid sound and make the box red.nn"
-	"@param playSound Play the invalid text sound or not.n")
+   "@brief Trigger the invalid sound and make the box red.nn"
+   "@param playSound Play the invalid text sound or not.n")
 {
-	object->invalidText(playSound);
+   object->invalidText(playSound);
 }
 
 
 DefineEngineMethod(GuiTextEditCtrl, validText, void, (), ,
-	"@brief Restores the box to normal color.nn")
+   "@brief Restores the box to normal color.nn")
 {
-	object->validText();
+   object->validText();
 }
 
 DefineEngineMethod(GuiTextEditCtrl, isValidText, bool, (), ,
-	"@brief Returns if the text is set to valid or not.n"
-	"@Return true if text is set to valid, false if not.nn")
+   "@brief Returns if the text is set to valid or not.n"
+   "@Return true if text is set to valid, false if not.nn")
 {
-	return object->isValidText();
+   return object->isValidText();
 }

+ 187 - 187
Engine/source/gui/controls/guiTreeViewCtrl.cpp

@@ -43,9 +43,9 @@
 IMPLEMENT_CONOBJECT(GuiTreeViewCtrl);
 
 ConsoleDocClass( GuiTreeViewCtrl,
-	"@brief Hierarchical list of text items with optional icons.\n\n"
+   "@brief Hierarchical list of text items with optional icons.\n\n"
 
-	"Can also be used to inspect SimObject hierarchies, primarily within editors.\n\n"
+   "Can also be used to inspect SimObject hierarchies, primarily within editors.\n\n"
 
    "GuiTreeViewCtrls can either display arbitrary user-defined trees or can be used to display SimObject hierarchies where "
    "each parent node in the tree is a SimSet or SimGroup and each leaf node is a SimObject.\n\n"
@@ -59,30 +59,30 @@ ConsoleDocClass( GuiTreeViewCtrl,
    "Each item in the tree has a distinct numeric ID that is unique within its tree.  The ID of the root item, which is always "
    "present on a tree, is 0.\n\n"
 
-	"@tsexample\n"
-	"new GuiTreeViewCtrl(DatablockEditorTree)\n"
-	"{\n"
-	"	tabSize = \"16\";\n"
-   "	textOffset = \"2\";\n"
-	"	fullRowSelect = \"0\";\n"
-	"	itemHeight = \"21\";\n"
-	"	destroyTreeOnSleep = \"0\";\n"
-	"	MouseDragging = \"0\";\n"
-	"	MultipleSelections = \"1\";\n"
-	"	DeleteObjectAllowed = \"1\";\n"
-	"	DragToItemAllowed = \"0\";\n"
-	"	ClearAllOnSingleSelection = \"1\";\n"
-	"	showRoot = \"1\";\n"
-	"	internalNamesOnly = \"0\";\n"
-	"	objectNamesOnly = \"0\";\n"
-	"	compareToObjectID = \"0\";\n"
-	"	Profile = \"GuiTreeViewProfile\";\n"
-	"	tooltipprofile = \"GuiToolTipProfile\";\n"
-	"	hovertime = \"1000\";\n"
-	"};\n"
-	"@endtsexample\n\n"
-
-	"@ingroup GuiContainers\n");
+   "@tsexample\n"
+   "new GuiTreeViewCtrl(DatablockEditorTree)\n"
+   "{\n"
+   "  tabSize = \"16\";\n"
+   "  textOffset = \"2\";\n"
+   "  fullRowSelect = \"0\";\n"
+   "  itemHeight = \"21\";\n"
+   "  destroyTreeOnSleep = \"0\";\n"
+   "  MouseDragging = \"0\";\n"
+   "  MultipleSelections = \"1\";\n"
+   "  DeleteObjectAllowed = \"1\";\n"
+   "  DragToItemAllowed = \"0\";\n"
+   "  ClearAllOnSingleSelection = \"1\";\n"
+   "  showRoot = \"1\";\n"
+   "  internalNamesOnly = \"0\";\n"
+   "  objectNamesOnly = \"0\";\n"
+   "  compareToObjectID = \"0\";\n"
+   "  Profile = \"GuiTreeViewProfile\";\n"
+   "  tooltipprofile = \"GuiToolTipProfile\";\n"
+   "  hovertime = \"1000\";\n"
+   "};\n"
+   "@endtsexample\n\n"
+
+   "@ingroup GuiContainers\n");
 
 IMPLEMENT_CALLBACK( GuiTreeViewCtrl, onDeleteObject, bool, ( SimObject* object ), ( object ), "" );
 IMPLEMENT_CALLBACK( GuiTreeViewCtrl, isValidDragTarget, bool, ( S32 id, const char* value ), ( id, value ), "" );
@@ -511,7 +511,7 @@ void GuiTreeViewCtrl::Item::getDisplayText(U32 bufLen, char *buf)
 
          if( showInternalNameOnly() )
             dSprintf( buf, bufLen, "%s", hasInternalName ? pInternalName : "(none)" );
-			else if( showObjectNameOnly() )
+         else if( showObjectNameOnly() )
          {
             if( !hasObjectName && mState.test( ShowClassNameForUnnamed ) )
                dSprintf( buf, bufLen, "%s", pClassName );
@@ -801,7 +801,7 @@ GuiTreeViewCtrl::GuiTreeViewCtrl()
    mStart         =  0;
    mPossibleRenameItem = NULL;
    mRenamingItem = NULL;
-	mTempItem = NULL;
+   mTempItem = NULL;
    mRenameCtrl = NULL;
 
    mDraggedToItem =  0;
@@ -1902,7 +1902,7 @@ void GuiTreeViewCtrl::onPreRender()
    if(mFlags.test(RebuildVisible))
    {
       buildVisibleTree();
-	  mFlags.clear(RebuildVisible);
+     mFlags.clear(RebuildVisible);
    }
 }
 
@@ -2084,39 +2084,39 @@ void GuiTreeViewCtrl::syncSelection()
          } 
          else if (mVisibleItems[i]->isInspectorData()) 
          {
-			if(mCompareToObjectID)
-			{
-			   if (mVisibleItems[i]->getObject() && mVisibleItems[i]->getObject()->getId() == mSelected[j]) 
-			   {
-				  // check to see if it is on the visible items list.
-				  bool addToSelectedItems = true;
-				  for (S32 k = 0; k < mSelectedItems.size(); k++) 
-				  {
-					 if (mSelectedItems[k]->isInspectorData() && mSelectedItems[k]->getObject() )
-					 {
-						if (mSelected[j] == mSelectedItems[k]->getObject()->getId()) 
-						{
-						   // don't add it
-						   addToSelectedItems = false;
-						}
-					 } 
-					 else 
-					 {
-						if (mSelected[j] == mSelectedItems[k]->mId) 
-						{
-						   // don't add it
-						   addToSelectedItems = false;
-						}
-					 }
-				  }
-				  if (addToSelectedItems) 
-				  {
-					 mVisibleItems[i]->mState.set(Item::Selected, true);
-					 mSelectedItems.push_front(mVisibleItems[i]);
-					 break;
-				  }
-			   }
-			}
+         if(mCompareToObjectID)
+         {
+            if (mVisibleItems[i]->getObject() && mVisibleItems[i]->getObject()->getId() == mSelected[j]) 
+            {
+              // check to see if it is on the visible items list.
+              bool addToSelectedItems = true;
+              for (S32 k = 0; k < mSelectedItems.size(); k++) 
+              {
+                if (mSelectedItems[k]->isInspectorData() && mSelectedItems[k]->getObject() )
+                {
+                  if (mSelected[j] == mSelectedItems[k]->getObject()->getId()) 
+                  {
+                     // don't add it
+                     addToSelectedItems = false;
+                  }
+                } 
+                else 
+                {
+                  if (mSelected[j] == mSelectedItems[k]->mId) 
+                  {
+                     // don't add it
+                     addToSelectedItems = false;
+                  }
+                }
+              }
+              if (addToSelectedItems) 
+              {
+                mVisibleItems[i]->mState.set(Item::Selected, true);
+                mSelectedItems.push_front(mVisibleItems[i]);
+                break;
+              }
+            }
+         }
          }
 
       }
@@ -2200,14 +2200,14 @@ void GuiTreeViewCtrl::addSelection( S32 itemOrObjectId, bool update, bool isLast
    }
 
    const S32 itemId = item->getID();
-	
-	// Ok, we have an item to select which isn't already selected....
+   
+   // Ok, we have an item to select which isn't already selected....
 
    // Do we want to allow more than one selected item?
    if( !mMultipleSelections )
       clearSelection();
 
-	// Add this object id to the vector of selected objectIds
+   // Add this object id to the vector of selected objectIds
    // if it is not already.
    bool foundMatch = false;
    for ( S32 i = 0; i < mSelected.size(); i++)
@@ -2228,21 +2228,21 @@ void GuiTreeViewCtrl::addSelection( S32 itemOrObjectId, bool update, bool isLast
 
    // Callback Start
    // Set and add the selection to the selected items group
-	item->mState.set(Item::Selected, true);
-	mSelectedItems.push_front(item);
+   item->mState.set(Item::Selected, true);
+   mSelectedItems.push_front(item);
 
    if ( item->isInspectorData() && 
         item->getObject() )
    { 
       SimObject *obj = item->getObject();
-		
+      
       onAddSelection_callback( obj->getId(), isLastSelection );
    }
    else
    {
       onAddSelection_callback( item->mId, isLastSelection );
    }
-	// Callback end
+   // Callback end
 
    mFlags.set( RebuildVisible );
    if( update )
@@ -2262,7 +2262,7 @@ void GuiTreeViewCtrl::onItemSelected( Item *item )
    if (item->isInspectorData())
    {
       SimObject* object = item->getObject();
-	   if( object )
+      if( object )
          onSelect_callback( object->getId() );
       if( !item->isParent() && object )
          onInspect_callback( object->getId() );
@@ -2590,9 +2590,9 @@ void GuiTreeViewCtrl::deleteSelection()
    }
    else
    {
-	  Vector<Item*> delSelection;
-	  delSelection = mSelectedItems;
-	  mSelectedItems.clear();
+     Vector<Item*> delSelection;
+     delSelection = mSelectedItems;
+     mSelectedItems.clear();
       while (!delSelection.empty())
       {
          Item * item = delSelection.front();
@@ -2600,7 +2600,7 @@ void GuiTreeViewCtrl::deleteSelection()
          if ( item->mParent )
             _deleteItem( item );
          
-		 delSelection.pop_front();      
+       delSelection.pop_front();      
       }
    }
 
@@ -2642,7 +2642,7 @@ bool GuiTreeViewCtrl::onKeyDown( const GuiEvent& event )
          return true;
       }
  
-	  //call a generic bit of script that will let the subclass know that a key was pressed
+     //call a generic bit of script that will let the subclass know that a key was pressed
      onKeyDown_callback( event.modifier, event.keyCode );
    }
 
@@ -3028,29 +3028,29 @@ void GuiTreeViewCtrl::onMouseUp(const GuiEvent &event)
       return;
    }
 
-	BitSet32 hitFlags = 0;
+   BitSet32 hitFlags = 0;
    Item *item;
-	bool hitCheck = _hitTest( event.mousePoint, item, hitFlags );
+   bool hitCheck = _hitTest( event.mousePoint, item, hitFlags );
    mRenamingItem = NULL;
 
-	if( hitCheck )
-	{
-		if ( event.mouseClickCount == 1 && !mMouseDragged && mPossibleRenameItem != NULL )
-		{
-			if ( item == mPossibleRenameItem )
+   if( hitCheck )
+   {
+      if ( event.mouseClickCount == 1 && !mMouseDragged && mPossibleRenameItem != NULL )
+      {
+         if ( item == mPossibleRenameItem )
             showItemRenameCtrl( item );
-		}
-		else // If mouseUp occurs on the same item as mouse down
-		{
-			bool wasSelected = isSelected( item );
-			bool multiSelect = getSelectedItemsCount() > 1;
-			if( wasSelected && multiSelect && item == mTempItem )
-			{
-				clearSelection();
-				addSelection( item->mId );
-			}
-		}
-	}
+      }
+      else // If mouseUp occurs on the same item as mouse down
+      {
+         bool wasSelected = isSelected( item );
+         bool multiSelect = getSelectedItemsCount() > 1;
+         if( wasSelected && multiSelect && item == mTempItem )
+         {
+            clearSelection();
+            addSelection( item->mId );
+         }
+      }
+   }
 
    mPossibleRenameItem = NULL;
    
@@ -3482,7 +3482,7 @@ void GuiTreeViewCtrl::onMouseDragged(const GuiEvent &event)
    if( mDragStartInSelection )
       onMouseDragged_callback();
       
-	if(!mSupportMouseDragging)
+   if(!mSupportMouseDragging)
       return;
       
    if( !mActive || !mAwake || !mVisible )
@@ -3652,7 +3652,7 @@ void GuiTreeViewCtrl::onMouseDown(const GuiEvent & event)
 
    mPossibleRenameItem = NULL;
    mRenamingItem = NULL;
-	mTempItem = NULL;
+   mTempItem = NULL;
       
    //
    if( event.modifier & SI_MULTISELECT )
@@ -3704,10 +3704,10 @@ void GuiTreeViewCtrl::onMouseDown(const GuiEvent & event)
                //select up
                for (S32 j = (mCurrentDragCell); j < firstSelectedIndex; j++)
                {
-						if( j != (firstSelectedIndex - 1) )
-							addSelection(mVisibleItems[j]->mId, false, false);
-						else
-							addSelection(mVisibleItems[j]->mId, false);
+                  if( j != (firstSelectedIndex - 1) )
+                     addSelection(mVisibleItems[j]->mId, false, false);
+                  else
+                     addSelection(mVisibleItems[j]->mId, false);
                }
             }
             else
@@ -3715,10 +3715,10 @@ void GuiTreeViewCtrl::onMouseDown(const GuiEvent & event)
                // select down
                for (S32 j = firstSelectedIndex+1; j < (mCurrentDragCell+1); j++)
                {
-						if( j != mCurrentDragCell )
-							addSelection(mVisibleItems[j]->mId, false, false);
-						else
-							addSelection(mVisibleItems[j]->mId, false);
+                  if( j != mCurrentDragCell )
+                     addSelection(mVisibleItems[j]->mId, false, false);
+                  else
+                     addSelection(mVisibleItems[j]->mId, false);
                }
             }
 
@@ -3736,39 +3736,39 @@ void GuiTreeViewCtrl::onMouseDown(const GuiEvent & event)
    }
    else if ( !hitFlags.test(OnImage) )
    {      
-		mTempItem = item;
+      mTempItem = item;
 
       bool wasSelected = isSelected( item );
       bool multiSelect = getSelectedItemsCount() > 1;
-		
-		if( !wasSelected || !multiSelect )
-		{
-			if ( mClearAllOnSingleSelection )
-				clearSelection();
-
-			if ( !wasSelected || mClearAllOnSingleSelection )
-				addSelection( item->mId );
-
-			if ( wasSelected &&
-				  !multiSelect &&
-				  mCanRenameObjects &&
-				  hitFlags.test(OnText) && 
-				  mFlags.test(IsEditable) && 
-				  item->isInspectorData() && 
-				  item->getObject() &&
+      
+      if( !wasSelected || !multiSelect )
+      {
+         if ( mClearAllOnSingleSelection )
+            clearSelection();
+
+         if ( !wasSelected || mClearAllOnSingleSelection )
+            addSelection( item->mId );
+
+         if ( wasSelected &&
+              !multiSelect &&
+              mCanRenameObjects &&
+              hitFlags.test(OnText) && 
+              mFlags.test(IsEditable) && 
+              item->isInspectorData() && 
+              item->getObject() &&
               item->getObject()->isNameChangeAllowed() &&
-				  item != mRoot &&
-				  event.mouseClickCount == 1 )
-			{
-				mPossibleRenameItem = item;
-
-				if ( isMethod( "canRenameObject" ) )
-				{
-					if( canRenameObject_callback( item->getObject() ) )
-						mPossibleRenameItem = NULL;
-				}
-			}
-		}
+              item != mRoot &&
+              event.mouseClickCount == 1 )
+         {
+            mPossibleRenameItem = item;
+
+            if ( isMethod( "canRenameObject" ) )
+            {
+               if( canRenameObject_callback( item->getObject() ) )
+                  mPossibleRenameItem = NULL;
+            }
+         }
+      }
       
    }
 
@@ -4221,7 +4221,7 @@ void GuiTreeViewCtrl::onRenderCell(Point2I offset, Point2I cell, bool, bool )
 
    if( item->mState.test(Item::MouseOverText) )
    {
-		fontColor	=	mProfile->mFontColorHL;
+      fontColor   =  mProfile->mFontColorHL;
    }
 
    drawer->setBitmapModulation( fontColor );
@@ -4551,9 +4551,9 @@ void GuiTreeViewCtrl::inspectorSearch(Item * item, Item * parent, SimSet * paren
 
 bool GuiTreeViewCtrl::objectSearch( const SimObject *object, Item **item )
 {
-	for ( U32 i = 0; i < mItems.size(); i++ )
-	{
-		Item *pItem = mItems[i];
+   for ( U32 i = 0; i < mItems.size(); i++ )
+   {
+      Item *pItem = mItems[i];
 
       if ( !pItem )
          continue;
@@ -4565,16 +4565,16 @@ bool GuiTreeViewCtrl::objectSearch( const SimObject *object, Item **item )
          continue;
 #endif
 
-		SimObject *pObj = pItem->getObject();
+      SimObject *pObj = pItem->getObject();
 
-		if ( pObj && pObj == object )
-		{
-			*item = pItem;
-			return true;
-		}
-	}
+      if ( pObj && pObj == object )
+      {
+         *item = pItem;
+         return true;
+      }
+   }
 
-	return false;
+   return false;
 }
 
 //-----------------------------------------------------------------------------
@@ -4592,7 +4592,7 @@ bool GuiTreeViewCtrl::onVirtualParentBuild(Item *item, bool bForceFullUpdate)
    }
 
    // Skip the next stuff unless we're expanded...
-	 if(!item->isExpanded() && !bForceFullUpdate && !( item == mRoot && !mShowRoot ) )
+    if(!item->isExpanded() && !bForceFullUpdate && !( item == mRoot && !mShowRoot ) )
       return true;
 
    // Verify that we have all the kids we should in here...
@@ -4704,8 +4704,8 @@ S32 GuiTreeViewCtrl::findItemByName(const char *name)
    {
       if ( !mItems[i] )
          continue;
-	   if( mItems[i]->mState.test( Item::InspectorData ) )
-		   continue;
+      if( mItems[i]->mState.test( Item::InspectorData ) )
+         continue;
       if (mItems[i] && dStrcmp(mItems[i]->getText(),name) == 0) 
          return mItems[i]->mId;
    }
@@ -4721,10 +4721,10 @@ S32 GuiTreeViewCtrl::findItemByValue(const char *name)
    {
       if (!mItems[i])
          continue;
-	   if( mItems[i]->mState.test( Item::InspectorData ) )
-		   continue;
-	   if (mItems[i] && dStrcmp(mItems[i]->getValue(),name) == 0) 
-		   return mItems[i]->mId;
+      if( mItems[i]->mState.test( Item::InspectorData ) )
+         continue;
+      if (mItems[i] && dStrcmp(mItems[i]->getValue(),name) == 0) 
+         return mItems[i]->mId;
    }
 
    return 0;
@@ -4874,7 +4874,7 @@ DefineEngineMethod( GuiTreeViewCtrl, insertItem, S32, ( S32 parentId, const char
 
 DefineEngineMethod( GuiTreeViewCtrl, insertObject, S32, ( S32 parentId, SimObject* obj, bool OKToEdit ), (false), "Inserts object as a child to the given parent." )
 {
-	return object->insertObject(parentId, obj, OKToEdit);
+   return object->insertObject(parentId, obj, OKToEdit);
 }
 //-----------------------------------------------------------------------------
 
@@ -4967,10 +4967,10 @@ DefineEngineMethod( GuiTreeViewCtrl, removeChildSelectionByValue, void, ( S32 pa
    if(parentItem)
    {
       GuiTreeViewCtrl::Item* child = parentItem->findChildByValue(value);
-	  if(child)
-	  {
+     if(child)
+     {
          object->removeSelection(child->getID());
-	  }
+     }
    }
 }
 
@@ -5038,7 +5038,7 @@ DefineEngineMethod( GuiTreeViewCtrl, open, void, ( const char * objName, bool ok
 DefineEngineMethod( GuiTreeViewCtrl, setItemTooltip, bool, ( S32 itemId, const char* tooltip), ,
    "Set the tooltip to show for the given item.\n\n"
    "@param itemId  TreeItemID of item to set the tooltip for.\n"
-   "@param tooltip	String tooltip to set for the item."
+   "@param tooltip   String tooltip to set for the item."
    "@return True if successfully found the item, false if not")
 {
    GuiTreeViewCtrl::Item* item = object->getItem( itemId );
@@ -5228,11 +5228,11 @@ const char* GuiTreeViewCtrl::getSelectedObjectList()
       {      
          S32 id  = item->getObject()->getId();
          //get the current length of the buffer
-         U32	len = dStrlen(buff);
+         U32   len = dStrlen(buff);
          //the start of the buffer where we want to write
          char* buffPart = buff+len;
          //the size of the remaining buffer (-1 cause dStrlen doesn't count the \0)
-         S32 size	=	bufSize-len-1;
+         S32 size =  bufSize-len-1;
          //write it:
          if(size < 1)
          {
@@ -5283,7 +5283,7 @@ DefineEngineMethod( GuiTreeViewCtrl, getTextToRoot, const char*, (S32 itemId, co
    "@param delimiter (Optional) delimiter to use between each branch concatenation."
    "@return text from the current node to the root.")
 {
-	if (!dStrcmp(delimiter, "" ))
+   if (!dStrcmp(delimiter, "" ))
    {
       Con::warnf("GuiTreeViewCtrl::getTextToRoot - Invalid number of arguments!");
       return ("");
@@ -5296,31 +5296,31 @@ DefineEngineMethod( GuiTreeViewCtrl, getSelectedItemList, const char*, (), ,
    "@return space separated list of selected item ids.")
 {
    const U32 bufSize = 1024;
-	char* buff = Con::getReturnBuffer(bufSize);
-	dSprintf(buff, bufSize, "");
+   char* buff = Con::getReturnBuffer(bufSize);
+   dSprintf(buff, bufSize, "");
 
    const Vector< S32 >& selected = object->getSelected();
-	for(int i = 0; i < selected.size(); i++)
-	{
-		S32 id  = selected[i];
-		//get the current length of the buffer
-		U32	len = dStrlen(buff);
-		//the start of the buffer where we want to write
-		char* buffPart = buff+len;
-		//the size of the remaining buffer (-1 cause dStrlen doesn't count the \0)
-		S32 size	=	bufSize-len-1;
-		//write it:
-		if(size < 1)
-		{
-			Con::errorf("GuiTreeViewCtrl::getSelectedItemList - Not enough room to return our object list");
-			return buff;
-		}
-
-		dSprintf(buffPart,size,"%d ", id);
-	}
+   for(int i = 0; i < selected.size(); i++)
+   {
+      S32 id  = selected[i];
+      //get the current length of the buffer
+      U32   len = dStrlen(buff);
+      //the start of the buffer where we want to write
+      char* buffPart = buff+len;
+      //the size of the remaining buffer (-1 cause dStrlen doesn't count the \0)
+      S32 size =  bufSize-len-1;
+      //write it:
+      if(size < 1)
+      {
+         Con::errorf("GuiTreeViewCtrl::getSelectedItemList - Not enough room to return our object list");
+         return buff;
+      }
+
+      dSprintf(buffPart,size,"%d ", id);
+   }
 //mSelected
 
-	return buff;
+   return buff;
 }
 
 S32 GuiTreeViewCtrl::findItemByObjectId(S32 iObjId)
@@ -5331,8 +5331,8 @@ S32 GuiTreeViewCtrl::findItemByObjectId(S32 iObjId)
          continue;
 
       SimObject* pObj = mItems[i]->getObject();
-	   if( pObj && pObj->getId() == iObjId )
-		   return mItems[i]->mId;
+      if( pObj && pObj->getId() == iObjId )
+         return mItems[i]->mId;
    }
 
    return -1;
@@ -5341,7 +5341,7 @@ S32 GuiTreeViewCtrl::findItemByObjectId(S32 iObjId)
 //------------------------------------------------------------------------------
 DefineEngineMethod( GuiTreeViewCtrl, findItemByObjectId, S32, (S32 objectId), ,
    "Find an item by its object id and returns the Tree Item ID for it.\n\n"
-   "@param objectId	Object id you want the item id for."
+   "@param objectId  Object id you want the item id for."
    "@return Tree Item Id for the given object ID.")
 {
    return(object->findItemByObjectId(objectId));
@@ -5389,7 +5389,7 @@ bool GuiTreeViewCtrl::scrollVisibleByObjectId(S32 objID)
 //------------------------------------------------------------------------------
 DefineEngineMethod( GuiTreeViewCtrl, scrollVisibleByObjectId, S32, (S32 objectId), ,
    "Show item by object id.\n\n"
-   "@param objectId	Object id you want to scroll to."
+   "@param objectId  Object id you want to scroll to."
    "@return True if successful, false if not.")
 {
    return(object->scrollVisibleByObjectId(objectId));
@@ -5400,7 +5400,7 @@ DefineEngineMethod( GuiTreeViewCtrl, scrollVisibleByObjectId, S32, (S32 objectId
 //FIXME: this clashes with SimSet.sort()
 DefineEngineMethod( GuiTreeViewCtrl, sort, void, (S32 parentId, bool traverseHierarchy, bool parentsFirst, bool caseSensitive), (0, false, false, true),
    "Sorts all items of the given parent (or root).  With 'hierarchy', traverses hierarchy."
-   "@param parentId	TreeItemID of parent/root to sort all the items under. Use 0 to sort the entire tree."
+   "@param parentId  TreeItemID of parent/root to sort all the items under. Use 0 to sort the entire tree."
    "@param traverseHierarchy True to traverse the hierarchy, false to not."
    "@param parentsFirst True to sort the parents first."
    "@param caseSensitive True to pay attention to case, false to ignore it.")
@@ -5531,7 +5531,7 @@ DefineEngineMethod( GuiTreeViewCtrl, isItemSelected, bool, ( S32 id ),,
    "@return True if the given item/object is currently selected in the tree." )
 {
    const Vector< GuiTreeViewCtrl::Item* >& selectedItems = object->getSelectedItems();
-	for( S32 i = 0; i < selectedItems.size(); ++ i )
+   for( S32 i = 0; i < selectedItems.size(); ++ i )
       if( selectedItems[ i ]->mId == id )
          return true;
          

+ 244 - 244
Engine/source/gui/core/guiCanvas.cpp

@@ -52,42 +52,42 @@
 IMPLEMENT_CONOBJECT(GuiCanvas);
 
 ConsoleDocClass( GuiCanvas,
-	"@brief A canvas on which rendering occurs.\n\n"
+   "@brief A canvas on which rendering occurs.\n\n"
 
-	"@section GuiCanvas_contents What a GUICanvas Can Contain...\n\n"
+   "@section GuiCanvas_contents What a GUICanvas Can Contain...\n\n"
 
-	"@subsection GuiCanvas_content_contentcontrol Content Control\n"
-	"A content control is the top level GuiControl for a screen. This GuiControl "
-	"will be the parent control for all other GuiControls on that particular "
-	"screen.\n\n"
+   "@subsection GuiCanvas_content_contentcontrol Content Control\n"
+   "A content control is the top level GuiControl for a screen. This GuiControl "
+   "will be the parent control for all other GuiControls on that particular "
+   "screen.\n\n"
 
-	"@subsection GuiCanvas_content_dialogs Dialogs\n\n"
+   "@subsection GuiCanvas_content_dialogs Dialogs\n\n"
 
-	"A dialog is essentially another screen, only it gets overlaid on top of the "
-	"current content control, and all input goes to the dialog. This is most akin "
-	"to the \"Open File\" dialog box found in most operating systems. When you "
-	"choose to open a file, and the \"Open File\" dialog pops up, you can no longer "
-	"send input to the application, and must complete or cancel the open file "
-	"request. Torque keeps track of layers of dialogs. The dialog with the highest "
-	"layer is on top and will get all the input, unless the dialog is "
-	"modeless, which is a profile option.\n\n"
+   "A dialog is essentially another screen, only it gets overlaid on top of the "
+   "current content control, and all input goes to the dialog. This is most akin "
+   "to the \"Open File\" dialog box found in most operating systems. When you "
+   "choose to open a file, and the \"Open File\" dialog pops up, you can no longer "
+   "send input to the application, and must complete or cancel the open file "
+   "request. Torque keeps track of layers of dialogs. The dialog with the highest "
+   "layer is on top and will get all the input, unless the dialog is "
+   "modeless, which is a profile option.\n\n"
 
-	"@see GuiControlProfile\n\n"
+   "@see GuiControlProfile\n\n"
 
-	"@section GuiCanvas_dirty Dirty Rectangles\n\n"
+   "@section GuiCanvas_dirty Dirty Rectangles\n\n"
 
-	"The GuiCanvas is based on dirty regions. "
-	"Every frame the canvas paints only the areas of the canvas that are 'dirty' "
-	"or need updating. In most cases, this only is the area under the mouse cursor. "
-	"This is why if you look in guiCanvas.cc the call to glClear is commented out. "
-	
-	"What you will see is a black screen, except in the dirty regions, where the "
-	"screen will be painted normally. If you are making an animated GuiControl "
-	"you need to add your control to the dirty areas of the canvas.\n\n"
+   "The GuiCanvas is based on dirty regions. "
+   "Every frame the canvas paints only the areas of the canvas that are 'dirty' "
+   "or need updating. In most cases, this only is the area under the mouse cursor. "
+   "This is why if you look in guiCanvas.cc the call to glClear is commented out. "
+   
+   "What you will see is a black screen, except in the dirty regions, where the "
+   "screen will be painted normally. If you are making an animated GuiControl "
+   "you need to add your control to the dirty areas of the canvas.\n\n"
 
-	"@see GuiControl\n\n"
+   "@see GuiControl\n\n"
 
-	"@ingroup GuiCore\n");
+   "@ingroup GuiCore\n");
 
 ColorI gCanvasClearColor( 255, 0, 255 ); ///< For GFX->clear
 
@@ -209,29 +209,29 @@ bool GuiCanvas::onAdd()
    //If we're recording, store the intial video resolution
    if (Journal::IsRecording())
    {
-	   Journal::Write(vm.resolution.x);
-	   Journal::Write(vm.resolution.y);
-	   Journal::Write(vm.fullScreen);
+      Journal::Write(vm.resolution.x);
+      Journal::Write(vm.resolution.y);
+      Journal::Write(vm.fullScreen);
    }
 
    //If we're playing, read the intial video resolution from the journal
    if (Journal::IsPlaying())
    {
-	   Journal::Read(&vm.resolution.x);
-	   Journal::Read(&vm.resolution.y);
-	   Journal::Read(&vm.fullScreen);
+      Journal::Read(&vm.resolution.x);
+      Journal::Read(&vm.resolution.y);
+      Journal::Read(&vm.fullScreen);
    }
 
    if (a && a->mType != NullDevice)
    {
       mPlatformWindow = WindowManager->createWindow(newDevice, vm);
 
-		//Disable window resizing if recording ir playing a journal
-		if (Journal::IsRecording() || Journal::IsPlaying())					
-			mPlatformWindow->lockSize(true);
-		
-		// Set a minimum on the window size so people can't break us by resizing tiny.
-		mPlatformWindow->setMinimumWindowSize(Point2I(640,480));
+      //Disable window resizing if recording ir playing a journal
+      if (Journal::IsRecording() || Journal::IsPlaying())               
+         mPlatformWindow->lockSize(true);
+      
+      // Set a minimum on the window size so people can't break us by resizing tiny.
+      mPlatformWindow->setMinimumWindowSize(Point2I(640,480));
 
       // Now, we have to hook in our event callbacks so we'll get
       // appropriate events from the window.
@@ -326,12 +326,12 @@ CanvasSizeChangeSignal GuiCanvas::smCanvasSizeChangeSignal;
 void GuiCanvas::handleResize( WindowId did, S32 width, S32 height )
 {
    getCanvasSizeChangeSignal().trigger(this);
-	if (Journal::IsPlaying() && mPlatformWindow)
-	{
-		mPlatformWindow->lockSize(false);
-		mPlatformWindow->setSize(Point2I(width, height));	
-		mPlatformWindow->lockSize(true);
-	}
+   if (Journal::IsPlaying() && mPlatformWindow)
+   {
+      mPlatformWindow->lockSize(false);
+      mPlatformWindow->setSize(Point2I(width, height));  
+      mPlatformWindow->lockSize(true);
+   }
 
    // Notify the scripts
    if ( isMethod( "onResize" ) )
@@ -342,9 +342,9 @@ void GuiCanvas::handlePaintEvent(WindowId did)
 {
    bool canRender = mPlatformWindow->isVisible() && GFX->allowRender() && !GFX->canCurrentlyRender();
    
-	// Do the screenshot first.
+   // Do the screenshot first.
    if ( gScreenShot != NULL && gScreenShot->isPending() && canRender )
-		gScreenShot->capture( this );
+      gScreenShot->capture( this );
 
    // If the video capture is waiting for a canvas, start the capture
    if ( VIDCAP->isWaitingForCanvas() && canRender )
@@ -560,19 +560,19 @@ bool GuiCanvas::tabNext(void)
       //save the old
       GuiControl *oldResponder = mFirstResponder;
 
-		GuiControl* newResponder = ctrl->findNextTabable(mFirstResponder);
+      GuiControl* newResponder = ctrl->findNextTabable(mFirstResponder);
       if ( !newResponder )
          newResponder = ctrl->findFirstTabable();
 
-		if ( newResponder && newResponder != oldResponder )
-		{
-			newResponder->setFirstResponder();
+      if ( newResponder && newResponder != oldResponder )
+      {
+         newResponder->setFirstResponder();
 
          // CodeReview Can this get killed? Note tabPrev code. BJG - 3/25/07
-//      	if ( oldResponder )
-//         	oldResponder->onLoseFirstResponder();
+//       if ( oldResponder )
+//          oldResponder->onLoseFirstResponder();
          return true;
-		}
+      }
    }
    return false;
 }
@@ -585,30 +585,30 @@ bool GuiCanvas::tabPrev(void)
       //save the old
       GuiControl *oldResponder = mFirstResponder;
 
-		GuiControl* newResponder = ctrl->findPrevTabable(mFirstResponder);
-		if ( !newResponder )
+      GuiControl* newResponder = ctrl->findPrevTabable(mFirstResponder);
+      if ( !newResponder )
          newResponder = ctrl->findLastTabable();
 
-		if ( newResponder && newResponder != oldResponder )
-		{
-			newResponder->setFirstResponder();
-	
+      if ( newResponder && newResponder != oldResponder )
+      {
+         newResponder->setFirstResponder();
+   
          // CodeReview As with tabNext() above, looks like this can now go. DAW - 7/05/09
-	      //if ( oldResponder )
-	      //   oldResponder->onLoseFirstResponder();
+         //if ( oldResponder )
+         //   oldResponder->onLoseFirstResponder();
 
          return true;
-		}
+      }
    }
    return false;
 }
 
 bool GuiCanvas::processInputEvent(InputEventInfo &inputEvent)
 {
-	// First call the general input handler (on the extremely off-chance that it will be handled):
-	if (mFirstResponder &&  mFirstResponder->onInputEvent(inputEvent))
+   // First call the general input handler (on the extremely off-chance that it will be handled):
+   if (mFirstResponder &&  mFirstResponder->onInputEvent(inputEvent))
    {
-		return(true);
+      return(true);
    }
 
    switch (inputEvent.deviceType)
@@ -1786,9 +1786,9 @@ void GuiCanvas::renderFrame(bool preRenderOnly, bool bufferSwap /* = true */)
       addUpdateRegion(pos - Point2I(2, 2), Point2I(cext.x + 4, cext.y + 4));
    }
 
-	mLastCursorEnabled = cursorVisible;
-	mLastCursor = mouseCursor;
-	mLastCursorPt = cursorPos;
+   mLastCursorEnabled = cursorVisible;
+   mLastCursor = mouseCursor;
+   mLastCursorPt = cursorPos;
 
    // Begin GFX
    PROFILE_START(GFXBeginScene);
@@ -1830,7 +1830,7 @@ void GuiCanvas::renderFrame(bool preRenderOnly, bool bufferSwap /* = true */)
 
    resetUpdateRegions();
 
-	// Make sure we have a clean matrix state 
+   // Make sure we have a clean matrix state 
    // before we start rendering anything!   
    GFX->setWorldMatrix( MatrixF::Identity );
    GFX->setViewMatrix( MatrixF::Identity );
@@ -2039,46 +2039,46 @@ void GuiCanvas::resetUpdateRegions()
 
 void GuiCanvas::setFirstResponder( GuiControl* newResponder )
 {
-	GuiControl* oldResponder = mFirstResponder;
-	Parent::setFirstResponder( newResponder );
+   GuiControl* oldResponder = mFirstResponder;
+   Parent::setFirstResponder( newResponder );
    
    if( oldResponder == mFirstResponder )
       return;
 
-	if( oldResponder && ( oldResponder != newResponder ) )
-		oldResponder->onLoseFirstResponder();
+   if( oldResponder && ( oldResponder != newResponder ) )
+      oldResponder->onLoseFirstResponder();
       
    if( newResponder && ( newResponder != oldResponder ) )
       newResponder->onGainFirstResponder();
 }
 
 DefineEngineMethod( GuiCanvas, getContent, S32, (),,
-				   "@brief Get the GuiControl which is being used as the content.\n\n"
+               "@brief Get the GuiControl which is being used as the content.\n\n"
 
-				   "@tsexample\n"
-				   "Canvas.getContent();\n"
-				   "@endtsexample\n\n"
+               "@tsexample\n"
+               "Canvas.getContent();\n"
+               "@endtsexample\n\n"
 
-				   "@return ID of current content control")
+               "@return ID of current content control")
 {
-	GuiControl *ctrl = object->getContentControl();
+   GuiControl *ctrl = object->getContentControl();
    if(ctrl)
       return ctrl->getId();
    return -1;
 }
 
 DefineEngineMethod( GuiCanvas, setContent, void, (GuiControl* ctrl),,
-				   "@brief Set the content of the canvas to a specified control.\n\n"
+               "@brief Set the content of the canvas to a specified control.\n\n"
 
-				   "@param ctrl ID or name of GuiControl to set content to\n\n"
+               "@param ctrl ID or name of GuiControl to set content to\n\n"
 
-				   "@tsexample\n"
-				   "Canvas.setContent(PlayGui);\n"
-				   "@endtsexample\n\n")
+               "@tsexample\n"
+               "Canvas.setContent(PlayGui);\n"
+               "@endtsexample\n\n")
 {
-	// Not using old error reporting until we modify the engineAPI - mperry
+   // Not using old error reporting until we modify the engineAPI - mperry
 
-	//GuiControl *gui = NULL;
+   //GuiControl *gui = NULL;
  //  if(argv[2][0])
  //  {
  //     if (!Sim::findObject(argv[2], gui))
@@ -2088,11 +2088,11 @@ DefineEngineMethod( GuiCanvas, setContent, void, (GuiControl* ctrl),,
  //     }
  //  }
 
-	if(!ctrl)
-	{
-		Con::errorf("GuiCanvas::setContent - Invalid control specified')");
-		return;
-	}
+   if(!ctrl)
+   {
+      Con::errorf("GuiCanvas::setContent - Invalid control specified')");
+      return;
+   }
 
    //set the new content control
    object->setContentControl(ctrl);
@@ -2111,11 +2111,11 @@ ConsoleDocFragment _pushDialog(
 );
 
 DefineConsoleMethod( GuiCanvas, pushDialog, void, (const char * ctrlName, S32 layer, bool center), ( 0, false), "(GuiControl ctrl, int layer=0, bool center=false)"
-			  "@hide")
+           "@hide")
 {
    GuiControl *gui;
 
-   if (!	Sim::findObject(ctrlName, gui))
+   if (! Sim::findObject(ctrlName, gui))
    {
       Con::printf("pushDialog(): Invalid control: %s", ctrlName);
       return;
@@ -2148,7 +2148,7 @@ ConsoleDocFragment _popDialog2(
 );
 
 DefineConsoleMethod( GuiCanvas, popDialog, void, (GuiControl * gui), (NULL), "(GuiControl ctrl=NULL)"
-			  "@hide")
+           "@hide")
 {
    if (gui)
       object->popDialogControl(gui);
@@ -2157,160 +2157,160 @@ DefineConsoleMethod( GuiCanvas, popDialog, void, (GuiControl * gui), (NULL), "(G
 }
 
 ConsoleDocFragment _popLayer1(
-	"@brief Removes the top most layer of dialogs\n\n"
-	"@tsexample\n"
-	"Canvas.popLayer();\n"
-	"@endtsexample\n\n",
-	"GuiCanvas",
-	"void popLayer();"
+   "@brief Removes the top most layer of dialogs\n\n"
+   "@tsexample\n"
+   "Canvas.popLayer();\n"
+   "@endtsexample\n\n",
+   "GuiCanvas",
+   "void popLayer();"
 );
 
 ConsoleDocFragment _popLayer2(
-	"@brief Removes a specified layer of dialogs\n\n"
-	"@param layer Number of the layer to pop\n\n"
-	"@tsexample\n"
-	"Canvas.popLayer(1);\n"
-	"@endtsexample\n\n",
-	"GuiCanvas",
-	"void popLayer(S32 layer);"
+   "@brief Removes a specified layer of dialogs\n\n"
+   "@param layer Number of the layer to pop\n\n"
+   "@tsexample\n"
+   "Canvas.popLayer(1);\n"
+   "@endtsexample\n\n",
+   "GuiCanvas",
+   "void popLayer(S32 layer);"
 );
 
 DefineConsoleMethod( GuiCanvas, popLayer, void, (S32 layer), (0), "(int layer)" 
-			  "@hide")
+           "@hide")
 {
 
    object->popDialogControl(layer);
 }
 
 DefineEngineMethod( GuiCanvas, cursorOn, void, (),,
-				   "@brief Turns on the mouse cursor.\n\n"
-				   "@tsexample\n"
-				   "Canvas.cursorOn();\n"
-				   "@endtsexample\n\n")
+               "@brief Turns on the mouse cursor.\n\n"
+               "@tsexample\n"
+               "Canvas.cursorOn();\n"
+               "@endtsexample\n\n")
 {
-	object->setCursorON(true);
+   object->setCursorON(true);
 }
 
 DefineEngineMethod( GuiCanvas, cursorOff, void, (),,
-				    "@brief Turns on the mouse off.\n\n"
-				   "@tsexample\n"
-				   "Canvas.cursorOff();\n"
-				   "@endtsexample\n\n")
+                "@brief Turns on the mouse off.\n\n"
+               "@tsexample\n"
+               "Canvas.cursorOff();\n"
+               "@endtsexample\n\n")
 {
-	object->setCursorON(false);
+   object->setCursorON(false);
 }
 
 
 DefineEngineMethod( GuiCanvas, setCursor, void, (GuiCursor* cursor),,
-				   "@brief Sets the cursor for the canvas.\n\n"
+               "@brief Sets the cursor for the canvas.\n\n"
 
-				   "@param cursor Name of the GuiCursor to use\n\n"
+               "@param cursor Name of the GuiCursor to use\n\n"
 
-				   "@tsexample\n"
-				   "Canvas.setCursor(\"DefaultCursor\");\n"
-				   "@endtsexample\n\n")
+               "@tsexample\n"
+               "Canvas.setCursor(\"DefaultCursor\");\n"
+               "@endtsexample\n\n")
 {
-	if(!cursor)
-	{
-		Con::errorf("GuiCanvas::setCursor - Invalid GuiCursor name or ID");
-		return;
-	}
-	object->setCursor(cursor);
+   if(!cursor)
+   {
+      Con::errorf("GuiCanvas::setCursor - Invalid GuiCursor name or ID");
+      return;
+   }
+   object->setCursor(cursor);
 }
 
 DefineEngineMethod( GuiCanvas, renderFront, void, ( bool enable ),,
-				   "@brief This turns on/off front-buffer rendering.\n\n"
+               "@brief This turns on/off front-buffer rendering.\n\n"
 
-				   "@param enable True if all rendering should be done to the front buffer\n\n"
+               "@param enable True if all rendering should be done to the front buffer\n\n"
 
-				   "@tsexample\n"
-				   "Canvas.renderFront(false);\n"
-				   "@endtsexample\n\n")
+               "@tsexample\n"
+               "Canvas.renderFront(false);\n"
+               "@endtsexample\n\n")
 {
-	object->setRenderFront(enable);
+   object->setRenderFront(enable);
 }
 
 DefineEngineMethod( GuiCanvas, showCursor, void, (),,
-				   "@brief Enable rendering of the cursor.\n\n"
+               "@brief Enable rendering of the cursor.\n\n"
 
-				   "@tsexample\n"
-				   "Canvas.showCursor();\n"
-				   "@endtsexample\n\n")
+               "@tsexample\n"
+               "Canvas.showCursor();\n"
+               "@endtsexample\n\n")
 {
-	object->showCursor(true);
+   object->showCursor(true);
 }
 
 DefineEngineMethod( GuiCanvas, hideCursor, void, (),,
-				   "@brief Disable rendering of the cursor.\n\n"
+               "@brief Disable rendering of the cursor.\n\n"
 
-				   "@tsexample\n"
-				   "Canvas.hideCursor();\n"
-				   "@endtsexample\n\n")
+               "@tsexample\n"
+               "Canvas.hideCursor();\n"
+               "@endtsexample\n\n")
 {
-	object->showCursor(false);
+   object->showCursor(false);
 }
 
 DefineEngineMethod( GuiCanvas, isCursorOn, bool, (),,
-				   "@brief Determines if mouse cursor is enabled.\n\n"
+               "@brief Determines if mouse cursor is enabled.\n\n"
 
-				   "@tsexample\n"
-				   "// Is cursor on?\n"
-				   "if(Canvas.isCursorOn())\n"
-				   "	echo(\"Canvas cursor is on\");\n"
-				   "@endtsexample\n\n"
-				   "@return Returns true if the cursor is on.\n\n")
+               "@tsexample\n"
+               "// Is cursor on?\n"
+               "if(Canvas.isCursorOn())\n"
+               "  echo(\"Canvas cursor is on\");\n"
+               "@endtsexample\n\n"
+               "@return Returns true if the cursor is on.\n\n")
 {
-	return object->isCursorON();
+   return object->isCursorON();
 }
 
 DefineEngineMethod( GuiCanvas, isCursorShown, bool, (),,
-				   "@brief Determines if mouse cursor is rendering.\n\n"
+               "@brief Determines if mouse cursor is rendering.\n\n"
 
-				   "@tsexample\n"
-				   "// Is cursor rendering?\n"
-				   "if(Canvas.isCursorShown())\n"
-				   "	echo(\"Canvas cursor is rendering\");\n"
-				   "@endtsexample\n\n"
-				   "@return Returns true if the cursor is rendering.\n\n")
+               "@tsexample\n"
+               "// Is cursor rendering?\n"
+               "if(Canvas.isCursorShown())\n"
+               "  echo(\"Canvas cursor is rendering\");\n"
+               "@endtsexample\n\n"
+               "@return Returns true if the cursor is rendering.\n\n")
 {
-	return object->isCursorShown();
+   return object->isCursorShown();
 }
 
 DefineEngineMethod( GuiCanvas, repaint, void, ( S32 elapsedMS ), (0),
-				   "@brief Force canvas to redraw.\n"
+               "@brief Force canvas to redraw.\n"
                "If the elapsed time is greater than the time since the last paint "
                "then the repaint will be skipped.\n"
                "@param elapsedMS The optional elapsed time in milliseconds.\n\n"
 
-				   "@tsexample\n"
-				   "Canvas.repaint();\n"
-				   "@endtsexample\n\n")
+               "@tsexample\n"
+               "Canvas.repaint();\n"
+               "@endtsexample\n\n")
 {
-	object->repaint(elapsedMS < 0 ? 0 : elapsedMS);
+   object->repaint(elapsedMS < 0 ? 0 : elapsedMS);
 }
 
 DefineEngineMethod( GuiCanvas, reset, void, (),,
-				   "@brief Reset the update regions for the canvas.\n\n"
+               "@brief Reset the update regions for the canvas.\n\n"
 
-				   "@tsexample\n"
-				   "Canvas.reset();\n"
-				   "@endtsexample\n\n")
+               "@tsexample\n"
+               "Canvas.reset();\n"
+               "@endtsexample\n\n")
 {
-	object->resetUpdateRegions();
+   object->resetUpdateRegions();
 }
 
 DefineEngineMethod( GuiCanvas, getCursorPos, Point2I, (),,
-				   "@brief Get the current position of the cursor in screen-space. Note that this position"
+               "@brief Get the current position of the cursor in screen-space. Note that this position"
                " might be outside the Torque window. If you want to get the position within the Canvas,"
                " call screenToClient on the result.\n\n"
                "@see Canvas::screenToClient()\n\n"
-				   "@param param Description\n\n"
-				   "@tsexample\n"
-				   "%cursorPos = Canvas.getCursorPos();\n"
-				   "@endtsexample\n\n"
-				   "@return Screen coordinates of mouse cursor, in format \"X Y\"")
+               "@param param Description\n\n"
+               "@tsexample\n"
+               "%cursorPos = Canvas.getCursorPos();\n"
+               "@endtsexample\n\n"
+               "@return Screen coordinates of mouse cursor, in format \"X Y\"")
 {
-	return object->getCursorPos();
+   return object->getCursorPos();
 }
 
 ConsoleDocFragment _setCursorPos1(
@@ -2334,21 +2334,21 @@ ConsoleDocFragment _setCursorPos2(
 );
 
 DefineConsoleMethod( GuiCanvas, setCursorPos, void, (Point2I pos), , "(Point2I pos)"
-			  "@hide")
+           "@hide")
 {
 
    object->setCursorPos(pos);
 }
 
 DefineEngineMethod( GuiCanvas, getMouseControl, S32, (),,
-				   "@brief Gets the gui control under the mouse.\n\n"
-				   "@tsexample\n"
-				   "%underMouse = Canvas.getMouseControl();\n"
-				   "@endtsexample\n\n"
+               "@brief Gets the gui control under the mouse.\n\n"
+               "@tsexample\n"
+               "%underMouse = Canvas.getMouseControl();\n"
+               "@endtsexample\n\n"
 
-				   "@return ID of the gui control, if one was found. NULL otherwise")
+               "@return ID of the gui control, if one was found. NULL otherwise")
 {
-	GuiControl* control = object->getMouseControl();
+   GuiControl* control = object->getMouseControl();
    if (control)
       return control->getId();
    
@@ -2356,18 +2356,18 @@ DefineEngineMethod( GuiCanvas, getMouseControl, S32, (),,
 }
 
 DefineEngineFunction(excludeOtherInstance, bool, (const char* appIdentifer),,
-					 "@brief Used to exclude/prevent all other instances using the same identifier specified\n\n"
+                "@brief Used to exclude/prevent all other instances using the same identifier specified\n\n"
 
-					 "@note Not used on OSX, Xbox, or in Win debug builds\n\n"
+                "@note Not used on OSX, Xbox, or in Win debug builds\n\n"
 
-					 "@param appIdentifier Name of the app set up for exclusive use.\n"
+                "@param appIdentifier Name of the app set up for exclusive use.\n"
 
-					 "@return False if another app is running that specified the same appIdentifier\n\n"
+                "@return False if another app is running that specified the same appIdentifier\n\n"
 
-					 "@ingroup Platform\n"
-					 "@ingroup GuiCore")
+                "@ingroup Platform\n"
+                "@ingroup GuiCore")
 {
-	   // mac/360 can only run one instance in general.
+      // mac/360 can only run one instance in general.
 #if !defined(TORQUE_OS_MAC) && !defined(TORQUE_OS_XENON) && !defined(TORQUE_DEBUG) && !defined(TORQUE_OS_LINUX)
    return Platform::excludeOtherInstances(appIdentifer);
 #else
@@ -2377,82 +2377,82 @@ DefineEngineFunction(excludeOtherInstance, bool, (const char* appIdentifer),,
 }
 
 DefineEngineMethod( GuiCanvas, getExtent, Point2I, (),,
-				   "@brief Returns the dimensions of the canvas\n\n"
+               "@brief Returns the dimensions of the canvas\n\n"
 
-				   "@tsexample\n"
-				   "%extent = Canvas.getExtent();\n"
-				   "@endtsexample\n\n"
+               "@tsexample\n"
+               "%extent = Canvas.getExtent();\n"
+               "@endtsexample\n\n"
 
-				   "@return Width and height of canvas. Formatted as numerical values in a single string \"# #\"")
+               "@return Width and height of canvas. Formatted as numerical values in a single string \"# #\"")
 {
-	return object->getExtent();
+   return object->getExtent();
 }
 
 
 DefineEngineMethod( GuiCanvas, setWindowTitle, void, ( const char* newTitle),,
-				   "@brief Change the title of the OS window.\n\n"
+               "@brief Change the title of the OS window.\n\n"
 
-				   "@param newTitle String containing the new name\n\n"
+               "@param newTitle String containing the new name\n\n"
 
-				   "@tsexample\n"
-				   "Canvas.setWindowTitle(\"Documentation Rocks!\");\n"
-				   "@endtsexample\n\n")
+               "@tsexample\n"
+               "Canvas.setWindowTitle(\"Documentation Rocks!\");\n"
+               "@endtsexample\n\n")
 {
-	object->setWindowTitle(newTitle);
+   object->setWindowTitle(newTitle);
 }
 
 
 DefineEngineMethod( GuiCanvas, findFirstMatchingMonitor, S32, (const char* name),,
-				   "@brief Find the first monitor index that matches the given name.\n\n"
+               "@brief Find the first monitor index that matches the given name.\n\n"
                "The actual match algorithm depends on the implementation.\n"
                "@param name The name to search for.\n\n"
-				   "@return The number of monitors attached to the system, including the default monoitor.")
+               "@return The number of monitors attached to the system, including the default monoitor.")
 {
    return PlatformWindowManager::get()->findFirstMatchingMonitor(name);
 }
 
 DefineEngineMethod( GuiCanvas, getMonitorCount, S32, (),,
-				   "@brief Gets the number of monitors attached to the system.\n\n"
+               "@brief Gets the number of monitors attached to the system.\n\n"
 
-				   "@return The number of monitors attached to the system, including the default monoitor.")
+               "@return The number of monitors attached to the system, including the default monoitor.")
 {
    return PlatformWindowManager::get()->getMonitorCount();
 }
 
 DefineEngineMethod( GuiCanvas, getMonitorName, const char*, (S32 index),,
-				   "@brief Gets the name of the requested monitor.\n\n"
+               "@brief Gets the name of the requested monitor.\n\n"
                "@param index The monitor index.\n\n"
-				   "@return The name of the requested monitor.")
+               "@return The name of the requested monitor.")
 {
    return PlatformWindowManager::get()->getMonitorName(index);
 }
 
 DefineEngineMethod( GuiCanvas, getMonitorRect, RectI, (S32 index),,
-				   "@brief Gets the region of the requested monitor.\n\n"
+               "@brief Gets the region of the requested monitor.\n\n"
                "@param index The monitor index.\n\n"
-				   "@return The rectangular region of the requested monitor.")
+               "@return The rectangular region of the requested monitor.")
 {
    return PlatformWindowManager::get()->getMonitorRect(index);
 }
 
 
 DefineEngineMethod( GuiCanvas, getVideoMode, const char*, (),,
-				   "@brief Gets the current screen mode as a string.\n\n"
+               "@brief Gets the current screen mode as a string.\n\n"
 
-				   "The return string will contain 5 values (width, height, fullscreen, bitdepth, refreshRate). "
-				   "You will need to parse out each one for individual use.\n\n"
+               "The return string will contain 5 values (width, height, fullscreen, bitdepth, refreshRate). "
+               "You will need to parse out each one for individual use.\n\n"
 
-				   "@tsexample\n"
-				   "%screenWidth = getWord(Canvas.getVideoMode(), 0);\n"
-				   "%screenHeight = getWord(Canvas.getVideoMode(), 1);\n"
-				   "%isFullscreen = getWord(Canvas.getVideoMode(), 2);\n"
-				   "%bitdepth = getWord(Canvas.getVideoMode(), 3);\n"
-				   "%refreshRate = getWord(Canvas.getVideoMode(), 4);\n"
-				   "@endtsexample\n\n"
+               "@tsexample\n"
+               "%screenWidth = getWord(Canvas.getVideoMode(), 0);\n"
+               "%screenHeight = getWord(Canvas.getVideoMode(), 1);\n"
+               "%isFullscreen = getWord(Canvas.getVideoMode(), 2);\n"
+               "%bitdepth = getWord(Canvas.getVideoMode(), 3);\n"
+               "%refreshRate = getWord(Canvas.getVideoMode(), 4);\n"
+               "@endtsexample\n\n"
 
-				   "@return String formatted with screen width, screen height, screen mode, bit depth, and refresh rate.")
+               "@return String formatted with screen width, screen height, screen mode, bit depth, and refresh rate.")
 {
-	// Grab the video mode.
+   // Grab the video mode.
    if (!object->getPlatformWindow())
       return "";
 
@@ -2463,17 +2463,17 @@ DefineEngineMethod( GuiCanvas, getVideoMode, const char*, (),,
 
 
 DefineEngineMethod( GuiCanvas, getModeCount, S32, (),,
-				   "@brief Gets the number of modes available on this device.\n\n"
+               "@brief Gets the number of modes available on this device.\n\n"
 
-				   "@param param Description\n\n"
+               "@param param Description\n\n"
 
-				   "@tsexample\n"
-				   "%modeCount = Canvas.getModeCount()\n"
-				   "@endtsexample\n\n"
+               "@tsexample\n"
+               "%modeCount = Canvas.getModeCount()\n"
+               "@endtsexample\n\n"
 
-				   "@return The number of video modes supported by the device")
+               "@return The number of video modes supported by the device")
 {
-	if (!object->getPlatformWindow())
+   if (!object->getPlatformWindow())
       return 0;
 
    // Grab the available mode list from the device.
@@ -2485,12 +2485,12 @@ DefineEngineMethod( GuiCanvas, getModeCount, S32, (),,
 }
 
 DefineEngineMethod( GuiCanvas, getMode, const char*, (S32 modeId),,
-				   "@brief Gets information on the specified mode of this device.\n\n"
-				   "@param modeId Index of the mode to get data from.\n"
-				   "@return A video mode string given an adapter and mode index.\n\n"
-				   "@see GuiCanvas::getVideoMode()")
+               "@brief Gets information on the specified mode of this device.\n\n"
+               "@param modeId Index of the mode to get data from.\n"
+               "@return A video mode string given an adapter and mode index.\n\n"
+               "@see GuiCanvas::getVideoMode()")
 {
-	if (!object->getPlatformWindow())
+   if (!object->getPlatformWindow())
       return 0;
 
    // Grab the available mode list from the device.
@@ -2515,14 +2515,14 @@ DefineEngineMethod( GuiCanvas, getMode, const char*, (S32 modeId),,
 
 
 DefineEngineMethod( GuiCanvas, toggleFullscreen, void, (),,
-				   "@brief toggle canvas from fullscreen to windowed mode or back.\n\n"
+               "@brief toggle canvas from fullscreen to windowed mode or back.\n\n"
 
-				   "@tsexample\n"
-				   "// If we are in windowed mode, the following will put is in fullscreen\n"
-				   "Canvas.toggleFullscreen();"
-				   "@endtsexample\n\n")
+               "@tsexample\n"
+               "// If we are in windowed mode, the following will put is in fullscreen\n"
+               "Canvas.toggleFullscreen();"
+               "@endtsexample\n\n")
 {
-	if (Platform::getWebDeployment())
+   if (Platform::getWebDeployment())
       return;
 
    if (!object->getPlatformWindow())
@@ -2693,7 +2693,7 @@ DefineConsoleMethod( GuiCanvas, setVideoMode, void,
                "\\param fullscreen Specify true to run fullscreen or false to run in a window\n"
                "\\param bitDepth [optional] The desired bit-depth. Defaults to the current setting. This parameter is ignored if you are running in a window.\n"
                "\\param refreshRate [optional] The desired refresh rate. Defaults to the current setting. This parameter is ignored if you are running in a window"
-					"\\param antialiasLevel [optional] The level of anti-aliasing to apply 0 = none" )
+               "\\param antialiasLevel [optional] The level of anti-aliasing to apply 0 = none" )
 {
    if (!object->getPlatformWindow())
       return;

+ 12 - 12
Engine/source/gui/editor/guiEditCtrl.cpp

@@ -716,16 +716,16 @@ void GuiEditCtrl::onRender(Point2I offset, const RectI &updateRect)
          ctOffset = getCurrentAddSet()->localToGlobalCoord(Point2I(0,0));
          RectI box(ctOffset.x, ctOffset.y, cext.x, cext.y);
 
-			box.inset( -5, -5 );
+         box.inset( -5, -5 );
          drawer->drawRect( box, ColorI( 50, 101, 152, 128 ) );
-			box.inset( 1, 1 );
+         box.inset( 1, 1 );
          drawer->drawRect( box, ColorI( 50, 101, 152, 128 ) );
-			box.inset( 1, 1 );
+         box.inset( 1, 1 );
          drawer->drawRect( box, ColorI( 50, 101, 152, 128 ) );
-			box.inset( 1, 1 );
+         box.inset( 1, 1 );
+         drawer->drawRect( box, ColorI( 50, 101, 152, 128 ) );
+         box.inset( 1, 1 );
          drawer->drawRect( box, ColorI( 50, 101, 152, 128 ) );
-			box.inset( 1, 1 );
-			drawer->drawRect( box, ColorI( 50, 101, 152, 128 ) );
       }
       Vector<GuiControl *>::iterator i;
       bool multisel = mSelectedControls.size() > 1;
@@ -2481,16 +2481,16 @@ DefineConsoleMethod( GuiEditCtrl, getContentControl, S32, (), , "() - Return the
 
 DefineConsoleMethod( GuiEditCtrl, setContentControl, void, (GuiControl *ctrl ), , "( GuiControl ctrl ) - Set the toplevel control to edit in the GUI editor." )
 {
-	if (ctrl)
-		object->setContentControl(ctrl);
+   if (ctrl)
+      object->setContentControl(ctrl);
 }
 
 //-----------------------------------------------------------------------------
 
 DefineConsoleMethod( GuiEditCtrl, addNewCtrl, void, (GuiControl *ctrl), , "(GuiControl ctrl)")
 {
-	if (ctrl)
-		object->addNewControl(ctrl);
+   if (ctrl)
+      object->addNewControl(ctrl);
 }
 
 //-----------------------------------------------------------------------------
@@ -2518,7 +2518,7 @@ DefineConsoleMethod( GuiEditCtrl, clearSelection, void, (), , "Clear selected co
 
 DefineConsoleMethod( GuiEditCtrl, select, void, (GuiControl *ctrl), , "(GuiControl ctrl)")
 {
-	if (ctrl)
+   if (ctrl)
    object->setSelection(ctrl, false);
 }
 
@@ -2526,7 +2526,7 @@ DefineConsoleMethod( GuiEditCtrl, select, void, (GuiControl *ctrl), , "(GuiContr
 
 DefineConsoleMethod( GuiEditCtrl, setCurrentAddSet, void, (GuiControl *addSet), , "(GuiControl ctrl)")
 {
-	if (addSet)
+   if (addSet)
    object->setCurrentAddSet(addSet);
 }
 

+ 124 - 124
Engine/source/gui/editor/guiMenuBar.cpp

@@ -81,8 +81,8 @@ ConsoleDocClass( GuiMenuBar,
    "@tsexample\n"
    "new GuiMenuBar(newMenuBar)\n"
    "{\n"
-   "	Padding = \"0\";\n"
-   "	//Properties not specific to this control have been omitted from this example.\n"
+   "  Padding = \"0\";\n"
+   "  //Properties not specific to this control have been omitted from this example.\n"
    "};\n\n"
    "// Add a menu to the menu bar\n"
    "newMenuBar.addMenu(0,\"New Menu\");\n\n"
@@ -105,7 +105,7 @@ IMPLEMENT_CALLBACK( GuiMenuBar, onMouseInMenu, void, (bool isInMenu),( isInMenu
    "// Mouse enters or persists within the menu, causing the callback to occur.\n"
    "GuiMenuBar::onMouseInMenu(%this,%hasLeftMenu)\n"
    "{\n"
-   "	// Code to run when the callback occurs\n"
+   "  // Code to run when the callback occurs\n"
    "}\n"
    "@endtsexample\n\n"
    "@see GuiTickCtrl\n\n"
@@ -119,14 +119,14 @@ IMPLEMENT_CALLBACK( GuiMenuBar, onMenuSelect, void, ( S32 menuId, const char* me
    "// A menu has been selected, causing the callback to occur.\n"
    "GuiMenuBar::onMenuSelect(%this,%menuId,%menuText)\n"
    "{\n"
-   "	// Code to run when the callback occurs\n"
+   "  // Code to run when the callback occurs\n"
    "}\n"
    "@endtsexample\n\n"
    "@see GuiTickCtrl\n\n"
 );
 
 IMPLEMENT_CALLBACK( GuiMenuBar, onMenuItemSelect, void, ( S32 menuId, const char* menuText, S32 menuItemId, const char* menuItemText ),
-												   ( menuId, menuText, menuItemId, menuItemText ),
+                                       ( menuId, menuText, menuItemId, menuItemText ),
    "@brief Called whenever an item in a menu is selected.\n\n"
    "@param menuId Index id of the menu which contains the selected menu item\n"
    "@param menuText Text of the menu which contains the selected menu item\n\n"
@@ -136,7 +136,7 @@ IMPLEMENT_CALLBACK( GuiMenuBar, onMenuItemSelect, void, ( S32 menuId, const char
    "// A menu item has been selected, causing the callback to occur.\n"
    "GuiMenuBar::onMenuItemSelect(%this,%menuId,%menuText,%menuItemId,%menuItemText)\n"
    "{\n"
-   "	// Code to run when the callback occurs\n"
+   "  // Code to run when the callback occurs\n"
    "}\n"
    "@endtsexample\n\n"
    "@see GuiTickCtrl\n\n"
@@ -149,7 +149,7 @@ IMPLEMENT_CALLBACK( GuiMenuBar, onSubmenuSelect, void, ( S32 submenuId, const ch
    "@tsexample\n"
    "GuiMenuBar::onSubmenuSelect(%this,%submenuId,%submenuText)\n"
    "{\n"
-   "	// Code to run when the callback occurs\n"
+   "  // Code to run when the callback occurs\n"
    "}\n"
    "@endtsexample\n\n"
    "@see GuiTickCtrl\n\n"
@@ -216,7 +216,7 @@ DefineEngineMethod(GuiMenuBar, addMenu, void, (const char* menuText, S32 menuId)
 }
 
 DefineEngineMethod(GuiMenuBar, addMenuItem, void, (const char* targetMenu, const char* menuItemText, S32 menuItemId, const char* accelerator, int checkGroup, const char *cmd),
-												 ("","",0,NULL,-1,""),
+                                     ("","",0,NULL,-1,""),
    "@brief Adds a menu item to the specified menu.  The menu argument can be either the text of a menu or its id.\n\n"
    "@param menu Menu name or menu Id to add the new item to.\n"
    "@param menuItemText Text for the new menu item.\n"
@@ -637,7 +637,7 @@ DefineEngineMethod(GuiMenuBar, setMenuItemSubmenuState, void, (const char* menuT
 }
 
 DefineEngineMethod(GuiMenuBar, addSubmenuItem, void, (const char* menuTarget, const char* menuItem, const char* submenuItemText, 
-													  int submenuItemId, const char* accelerator, int checkGroup),,
+                                         int submenuItemId, const char* accelerator, int checkGroup),,
    "@brief Adds a menu item to the specified menu.  The menu argument can be either the text of a menu or its id.\n\n"
    "@param menuTarget Menu to affect a submenu in\n"
    "@param menuItem Menu item to affect\n"
@@ -814,21 +814,21 @@ void GuiMenuBar::addMenu(const char *menuText, U32 menuId)
 
 GuiMenuBar::Menu *GuiMenuBar::findMenu(const char *menu)
 {
-	if(dIsdigit(menu[0]))
-	{
-		U32 id = dAtoi(menu);
+   if(dIsdigit(menu[0]))
+   {
+      U32 id = dAtoi(menu);
       for (U32 i = 0; i < mMenuList.size(); ++i)
          if (id == mMenuList[i]->id)
             return mMenuList[i];
-		return NULL;
-	}
-	else
-	{
+      return NULL;
+   }
+   else
+   {
       for (U32 i = 0; i < mMenuList.size(); ++i)
          if (!dStricmp(menu, mMenuList[i]->text))
             return mMenuList[i];
-		return NULL;
-	}
+      return NULL;
+   }
 }
 
 GuiMenuBar::MenuItem *GuiMenuBar::findMenuItem(Menu *menu, const char *menuItem)
@@ -981,13 +981,13 @@ GuiMenuBar::MenuItem *GuiMenuBar::findSubmenuItem(Menu *menu, const char *menuIt
       U32 id = dAtoi(menuItem);
       for(MenuItem *walk = menu->firstMenuItem; walk; walk = walk->nextMenuItem)
          if(id == walk->id)
-		 {
-		    if(walk->isSubmenu && walk->submenu)
-			{
+       {
+          if(walk->isSubmenu && walk->submenu)
+         {
             return GuiMenuBar::findMenuItem(walk->submenu, submenuItem);
-			}
-			return NULL;
-		 }
+         }
+         return NULL;
+       }
       return NULL;
    }
    else
@@ -995,13 +995,13 @@ GuiMenuBar::MenuItem *GuiMenuBar::findSubmenuItem(Menu *menu, const char *menuIt
       //  Search by name
       for(MenuItem *walk = menu->firstMenuItem; walk; walk = walk->nextMenuItem)
          if(!dStricmp(menuItem, walk->text))
-		 {
-		    if(walk->isSubmenu && walk->submenu)
-			{
+       {
+          if(walk->isSubmenu && walk->submenu)
+         {
             return GuiMenuBar::findMenuItem(walk->submenu, submenuItem);
-			}
-			return NULL;
-		 }
+         }
+         return NULL;
+       }
       return NULL;
    }
 }
@@ -1021,7 +1021,7 @@ void GuiMenuBar::addSubmenuItem(Menu *menu, MenuItem *submenu, const char *text,
    if(submenu && !submenu->isSubmenu)
    {
       Con::errorf("GuiMenuBar::addSubmenuItem: Attempting to add menuitem '%s' to an invalid submenu",text);
-	  return;
+     return;
    }
 
    // allocate the new menu item
@@ -1074,7 +1074,7 @@ void GuiMenuBar::removeSubmenuItem(MenuItem *menuItem, MenuItem *submenuItem)
    if(menuItem && !menuItem->isSubmenu)
    {
       Con::errorf("GuiMenuBar::removeSubmenuItem: Attempting to remove submenuitem '%s' from an invalid submenu",submenuItem->text);
-	  return;
+     return;
    }
 
    GuiMenuBar::removeMenuItem(menuItem->submenu, submenuItem);
@@ -1087,7 +1087,7 @@ void GuiMenuBar::clearSubmenuItems(MenuItem *menuitem)
    if(menuitem && !menuitem->isSubmenu)
    {
       Con::errorf("GuiMenuBar::clearSubmenuItems: Attempting to clear an invalid submenu");
-	  return;
+     return;
    }
 
    while(menuitem->submenu->firstMenuItem)
@@ -1175,33 +1175,33 @@ void GuiMenuBar::onPreRender()
          if (!mMenuList[i]->visible)
             continue;
 
-		 // Bounds depends on if there is a bitmap to be drawn or not
+       // Bounds depends on if there is a bitmap to be drawn or not
          if (mMenuList[i]->bitmapIndex == -1)
-		 {
+       {
             // Text only
             mMenuList[i]->bounds.set(curX, 0, mProfile->mFont->getStrWidth(mMenuList[i]->text) + (mHorizontalMargin * 2), getHeight() - (mVerticalMargin * 2));
 
          } else
-		 {
+       {
             // Will the bitmap and text be draw?
           if (!mMenuList[i]->drawBitmapOnly)
-			{
+         {
                // Draw the bitmap and the text
                RectI *bitmapBounds = mProfile->mBitmapArrayRects.address();
                mMenuList[i]->bounds.set(curX, 0, bitmapBounds[mMenuList[i]->bitmapIndex].extent.x + mProfile->mFont->getStrWidth(mMenuList[i]->text) + (mHorizontalMargin * 2), getHeight() + (mVerticalMargin * 2));
 
-			} else
-			{
+         } else
+         {
                // Only the bitmap will be drawn
                RectI *bitmapBounds = mProfile->mBitmapArrayRects.address();
                mMenuList[i]->bounds.set(curX, 0, bitmapBounds[mMenuList[i]->bitmapIndex].extent.x + mBitmapMargin + (mHorizontalMargin * 2), getHeight() + (mVerticalMargin * 2));
-			}
-		 }
+         }
+       }
 
          curX += mMenuList[i]->bounds.extent.x;
       }
-		mouseOverMenu = NULL;
-		mouseDownMenu = NULL;
+      mouseOverMenu = NULL;
+      mouseDownMenu = NULL;
    }
 }
 
@@ -1222,35 +1222,35 @@ void GuiMenuBar::checkMenuMouseMove(const GuiEvent &event)
 void GuiMenuBar::onMouseMove(const GuiEvent &event)
 {
    Menu *hit = findHitMenu(event.mousePoint);
-	if(hit != mouseOverMenu)
-	{
-		//  If we need to, reset the mouse over menu counter and indicate
-		// that we should track it.
-		if(hit)
+   if(hit != mouseOverMenu)
+   {
+      //  If we need to, reset the mouse over menu counter and indicate
+      // that we should track it.
+      if(hit)
            mMouseOverCounter = 0;
-		if(!mCountMouseOver)
-		{
+      if(!mCountMouseOver)
+      {
            //  We've never started the counter, so start it.
            if(hit)
               mCountMouseOver = true;
-		}
+      }
 
-		mouseOverMenu = hit;
-		setUpdate();
-	}
+      mouseOverMenu = hit;
+      setUpdate();
+   }
 }
 
 void GuiMenuBar::onMouseLeave(const GuiEvent &event)
 {
    if(mouseOverMenu)
-		setUpdate();
-	mouseOverMenu = NULL;
+      setUpdate();
+   mouseOverMenu = NULL;
 
    //  As we've left the control, don't track how long the mouse has been
    // within it.
    if(mCountMouseOver && mMouseOverCounter >= mMouseHoverAmount)
    {
-	  onMouseInMenu_callback(false); // Last parameter indicates if we've entered or left the menu
+     onMouseInMenu_callback(false); // Last parameter indicates if we've entered or left the menu
    }
    mCountMouseOver = false;
    mMouseOverCounter = 0;
@@ -1259,38 +1259,38 @@ void GuiMenuBar::onMouseLeave(const GuiEvent &event)
 void GuiMenuBar::onMouseDragged(const GuiEvent &event)
 {
    Menu *hit = findHitMenu(event.mousePoint);
-	
-	if(hit != mouseOverMenu)
-	{
-		//  If we need to, reset the mouse over menu counter and indicate
-		// that we should track it.
-		if(hit)
+   
+   if(hit != mouseOverMenu)
+   {
+      //  If we need to, reset the mouse over menu counter and indicate
+      // that we should track it.
+      if(hit)
            mMouseOverCounter = 0;
-		if(!mCountMouseOver)
-		{
+      if(!mCountMouseOver)
+      {
            //  We've never started the counter, so start it.
            if(hit)
               mCountMouseOver = true;
-		}
+      }
 
-		mouseOverMenu = hit;
+      mouseOverMenu = hit;
       mouseDownMenu = hit;
-		setUpdate();
+      setUpdate();
       onAction();
-	}
+   }
 }
 
 void GuiMenuBar::onMouseDown(const GuiEvent &event)
 {
    mouseDownMenu = mouseOverMenu = findHitMenu(event.mousePoint);
-	setUpdate();
+   setUpdate();
    onAction();
 }
 
 void GuiMenuBar::onMouseUp(const GuiEvent &event)
 {
    mouseDownMenu = NULL;
-	setUpdate();
+   setUpdate();
 }
 
 void GuiMenuBar::onRender(Point2I offset, const RectI &updateRect)
@@ -1320,20 +1320,20 @@ void GuiMenuBar::onRender(Point2I offset, const RectI &updateRect)
       start.x = mMenuList[i]->bounds.point.x + mHorizontalMargin;
       start.y = mMenuList[i]->bounds.point.y + (mMenuList[i]->bounds.extent.y - mProfile->mFont->getHeight()) / 2;
 
-	  // Draw the border
+     // Draw the border
       if (mMenuList[i]->drawBorder)
-	  {
+     {
         RectI highlightBounds = bounds;
         highlightBounds.inset(1,1);
         if (mMenuList[i] == mouseDownMenu)
             renderFilledBorder(highlightBounds, mProfile->mBorderColorHL, mProfile->mFillColorHL );
         else if (mMenuList[i] == mouseOverMenu && mouseDownMenu == NULL)
            renderFilledBorder(highlightBounds, mProfile->mBorderColorHL, mProfile->mFillColorHL);
-	  }
+     }
 
-	  // Do we draw a bitmap?
+     // Do we draw a bitmap?
       if (mMenuList[i]->bitmapIndex != -1)
-	  {
+     {
         S32 index = mMenuList[i]->bitmapIndex * 3;
         if (mMenuList[i] == mouseDownMenu)
             ++index;
@@ -1342,24 +1342,24 @@ void GuiMenuBar::onRender(Point2I offset, const RectI &updateRect)
 
          RectI rect = mProfile->mBitmapArrayRects[index];
 
-		 Point2I bitmapstart(start);
+       Point2I bitmapstart(start);
        bitmapstart.y = mMenuList[i]->bounds.point.y + (mMenuList[i]->bounds.extent.y - rect.extent.y) / 2;
 
          drawUtil->clearBitmapModulation();
          drawUtil->drawBitmapSR( mProfile->mTextureObject, offset + bitmapstart, rect);
 
-		 // Should we also draw the text?
+       // Should we also draw the text?
          if (!mMenuList[i]->drawBitmapOnly)
-		 {
+       {
             start.x += mBitmapMargin;
       drawUtil->setBitmapModulation( fontColor );
       drawUtil->drawText(mProfile->mFont, start + offset, mMenuList[i]->text, mProfile->mFontColors);
-		 }
-	  } else
-	  {
+       }
+     } else
+     {
       drawUtil->setBitmapModulation( fontColor );
       drawUtil->drawText(mProfile->mFont, start + offset, mMenuList[i]->text, mProfile->mFontColors);
-	  }
+     }
    }
 
    renderChildControls( offset, updateRect );
@@ -1381,7 +1381,7 @@ void GuiMenuBar::buildWindowAcceleratorMap( WindowInputGenerator &inputGenerator
             continue;
          }
          EventDescriptor accelEvent;
-		 ActionMap::createEventDescriptor(item->accelerator, &accelEvent);
+       ActionMap::createEventDescriptor(item->accelerator, &accelEvent);
    
          //now we have a modifier, and a key, add them to the canvas
          inputGenerator.addAcceleratorKey( this, item->cmd, accelEvent.eventCode, accelEvent.flags);
@@ -1412,7 +1412,7 @@ void GuiMenuBar::acceleratorKeyPress(U32 index)
          {
             // first, call the script callback for menu selection:
             onMenuSelect_callback(mMenuList[i]->id, mMenuList[i]->text);
-			
+         
             if(item->visible)
                menuItemSelected(mMenuList[i], item);
             return;
@@ -1551,15 +1551,15 @@ void GuiMenuTextListCtrl::onMouseUp(const GuiEvent &event)
 
 void GuiMenuTextListCtrl::onCellHighlighted(Point2I cell)
 {
-	// If this text list control is part of a submenu, then don't worry about
-	// passing this along
-	if(!isSubMenu)
-	{
-		RectI globalbounds(getBounds());
-		Point2I globalpoint = localToGlobalCoord(globalbounds.point);
-		globalbounds.point = globalpoint;
-		mMenuBarCtrl->highlightedMenuItem(cell.y, globalbounds, mCellSize);
-	}
+   // If this text list control is part of a submenu, then don't worry about
+   // passing this along
+   if(!isSubMenu)
+   {
+      RectI globalbounds(getBounds());
+      Point2I globalpoint = localToGlobalCoord(globalbounds.point);
+      globalbounds.point = globalpoint;
+      mMenuBarCtrl->highlightedMenuItem(cell.y, globalbounds, mCellSize);
+   }
 }
 
 //------------------------------------------------------------------------------
@@ -1582,9 +1582,9 @@ bool GuiSubmenuBackgroundCtrl::pointInControl(const Point2I& parentCoordPoint)
    S32 yt = parentCoordPoint.y - getTop();
 
    if(findHitControl(Point2I(xt,yt)) == this)
-	   return false;
+      return false;
    else
-	   return true;
+      return true;
 //   return xt >= 0 && yt >= 0 && xt < getWidth() && yt < getHeight();
 }
 
@@ -1609,7 +1609,7 @@ void GuiMenuBar::onSleep()
 void GuiMenuBar::closeMenu()
 {
    //  First close any open submenu
-	closeSubmenu();
+   closeSubmenu();
 
    // Get the selection from the text list:
    S32 selectionIndex = mTextList->getSelectedCell().y;
@@ -1657,25 +1657,25 @@ void GuiMenuBar::highlightedMenuItem(S32 selectionIndex, const RectI& bounds, Po
       }
 
       if(list)
-	  {
+     {
          // If the highlighted item has changed...
          if(mouseOverSubmenu != list)
-		 {
+       {
             closeSubmenu();
             mouseOverSubmenu = NULL;
 
             // Check if this is a submenu.  If so, open the submenu.
             if(list->isSubmenu)
-		    {
-			   // If there are submenu items, then open the submenu
+          {
+            // If there are submenu items, then open the submenu
              if(list->submenu->firstMenuItem)
-			   {
-				   mouseOverSubmenu = list;
-				   onSubmenuAction(selstore, bounds, cellSize);
-			   }
-			}
-		 }
-	  }
+            {
+               mouseOverSubmenu = list;
+               onSubmenuAction(selstore, bounds, cellSize);
+            }
+         }
+       }
+     }
    }
 }
 
@@ -1745,11 +1745,11 @@ void GuiMenuBar::onAction()
 
       char buf[512];
 
-	  //  If this menu item is a submenu, then set the isSubmenu to 2 to indicate
-	  // an arrow should be drawn.  Otherwise set the isSubmenu normally.
-	  char isSubmenu = 1;
-	  if(walk->isSubmenu)
-		  isSubmenu = 2;
+     //  If this menu item is a submenu, then set the isSubmenu to 2 to indicate
+     // an arrow should be drawn.  Otherwise set the isSubmenu normally.
+     char isSubmenu = 1;
+     if(walk->isSubmenu)
+        isSubmenu = 2;
 
       char bitmapIndex = 1;
       if(walk->bitmapIndex >= 0 && (walk->bitmapIndex * 3 <= mProfile->mBitmapArrayRects.size()))
@@ -1861,8 +1861,8 @@ void GuiMenuBar::onSubmenuAction(S32 selectionIndex, const RectI& bounds, Point2
 
       char buf[512];
 
-	  //  Can't have submenus within submenus.
-	  char isSubmenu = 1;
+     //  Can't have submenus within submenus.
+     char isSubmenu = 1;
 
       char bitmapIndex = 1;
       if(walk->bitmapIndex >= 0 && (walk->bitmapIndex * 3 <= mProfile->mBitmapArrayRects.size()))
@@ -1916,7 +1916,7 @@ void GuiMenuBar::onSubmenuAction(S32 selectionIndex, const RectI& bounds, Point2
 void GuiMenuBar::closeSubmenu()
 {
    if(!mSubmenuBackground || !mSubmenuTextList)
-	   return;
+      return;
 
    // Get the selection from the text list:
    S32 selectionIndex = mSubmenuTextList->getSelectedCell().y;
@@ -1934,8 +1934,8 @@ void GuiMenuBar::closeSubmenu()
    if ( selectionIndex != -1 )
    {
       MenuItem *list = NULL;
-	  if(mouseOverSubmenu)
-	  {
+     if(mouseOverSubmenu)
+     {
          list = mouseOverSubmenu->submenu->firstMenuItem;
 
          while(selectionIndex && list)
@@ -1943,7 +1943,7 @@ void GuiMenuBar::closeSubmenu()
             list = list->nextMenuItem;
             selectionIndex--;
          }
-	  }
+     }
       if(list)
          menuItemSelected(list->submenuParentMenu, list);
    }
@@ -1981,13 +1981,13 @@ void GuiMenuBar::processTick()
    {
       //  If we're at a particular number of ticks, notify the script function
       if(mMouseOverCounter < mMouseHoverAmount)
-	  {
+     {
          ++mMouseOverCounter;
 
-	  } else if(mMouseOverCounter == mMouseHoverAmount)
-	  {
+     } else if(mMouseOverCounter == mMouseHoverAmount)
+     {
          ++mMouseOverCounter;
-		 onMouseInMenu_callback(true); // Last parameter indicates if we've entered or left the menu
-	  }
+       onMouseInMenu_callback(true); // Last parameter indicates if we've entered or left the menu
+     }
    }
 }

+ 322 - 322
Engine/source/gui/editor/guiParticleGraphCtrl.cpp

@@ -43,16 +43,16 @@ GuiParticleGraphCtrl::GuiParticleGraphCtrl()
 
    for(S32 i = 0; i < MaxPlots; i++)
    {
-	   mPlots[i].mGraphColor = ColorF(1.0, 1.0, 1.0);
-	   VECTOR_SET_ASSOCIATION(mPlots[i].mGraphData);
-	   mPlots[i].mGraphMax.x = 1;
-	   mPlots[i].mGraphMax.y = 50;
-	   mPlots[i].mGraphMin.x = 0;
-	   mPlots[i].mGraphMin.y = 0;
-	   mPlots[i].mGraphType = Polyline;
-	   mPlots[i].mGraphName = StringTable->insert("");
-	   mPlots[i].mHidden = false;
-	   mPlots[i].mGraphScale = 0.05f;
+      mPlots[i].mGraphColor = ColorF(1.0, 1.0, 1.0);
+      VECTOR_SET_ASSOCIATION(mPlots[i].mGraphData);
+      mPlots[i].mGraphMax.x = 1;
+      mPlots[i].mGraphMax.y = 50;
+      mPlots[i].mGraphMin.x = 0;
+      mPlots[i].mGraphMin.y = 0;
+      mPlots[i].mGraphType = Polyline;
+      mPlots[i].mGraphName = StringTable->insert("");
+      mPlots[i].mHidden = false;
+      mPlots[i].mGraphScale = 0.05f;
    }
 
    mPlots[0].mGraphColor = ColorF(1.0f, 0.2f, 0.2f);
@@ -127,87 +127,87 @@ void GuiParticleGraphCtrl::onRender(Point2I offset, const RectI &updateRect)
    // Fetch Draw Utility.
    GFXDrawUtil* pDrawUtil = GFX->getDrawUtil();
 
-	if (mProfile->mBorder)
-	{
-		const RectI bounds = getBounds();
-		RectI rect(offset.x, offset.y, bounds.extent.x, bounds.extent.y);		
-		pDrawUtil->drawRect(rect, mProfile->mBorderColor);
-	}
+   if (mProfile->mBorder)
+   {
+      const RectI bounds = getBounds();
+      RectI rect(offset.x, offset.y, bounds.extent.x, bounds.extent.y);    
+      pDrawUtil->drawRect(rect, mProfile->mBorderColor);
+   }
 
     GuiControlProfile* profile = dynamic_cast<GuiControlProfile*>(Sim::findObject("GuiDefaultProfile"));
     Resource<GFont> font = profile->mFont;
-	GFXVideoMode videoMode = GFXInit::getDesktopResolution();
+   GFXVideoMode videoMode = GFXInit::getDesktopResolution();
 
-	ColorF color(1.0f, 1.0f, 1.0f, 0.5f);
-	pDrawUtil->drawRectFill(updateRect, color);
+   ColorF color(1.0f, 1.0f, 1.0f, 0.5f);
+   pDrawUtil->drawRectFill(updateRect, color);
 
-	for (S32 k = 0; k < MaxPlots; k++)
-	{
-		// Nothing to graph
-		if ((mPlots[k].mGraphData.size() == 0) || (mPlots[k].mHidden == true))
-			continue;
-	
+   for (S32 k = 0; k < MaxPlots; k++)
+   {
+      // Nothing to graph
+      if ((mPlots[k].mGraphData.size() == 0) || (mPlots[k].mHidden == true))
+         continue;
+   
         Point2F graphExtent = getGraphExtent(k);
 
-		// Adjust scale to max value + 5% so we can see high value
-		F32 ScaleX = (F32(getExtent().x) / (graphExtent.x*(1.00 + (mPlots[k].mGraphScale))));
-		F32 ScaleY = (F32(getExtent().y) / (graphExtent.y*(1.00 + (mPlots[k].mGraphScale))));
+      // Adjust scale to max value + 5% so we can see high value
+      F32 ScaleX = (F32(getExtent().x) / (graphExtent.x*(1.00 + (mPlots[k].mGraphScale))));
+      F32 ScaleY = (F32(getExtent().y) / (graphExtent.y*(1.00 + (mPlots[k].mGraphScale))));
 
-		if((mPlots[k].mGraphType == Point) || (mPlots[k].mGraphType == Polyline))
-		{
+      if((mPlots[k].mGraphType == Point) || (mPlots[k].mGraphType == Polyline))
+      {
          S32 posX;
-			S32 posY;
-			S32 lastPosX = 0;
-			S32 lastPosY = 0;
-			Point2F plotPoint;
+         S32 posY;
+         S32 lastPosX = 0;
+         S32 lastPosY = 0;
+         Point2F plotPoint;
 
-			S32 size = 32;
+         S32 size = 32;
 
-			for (S32 sample = 0; sample < mPlots[k].mGraphData.size(); sample++)
-			{
-				S32 temp;
+         for (S32 sample = 0; sample < mPlots[k].mGraphData.size(); sample++)
+         {
+            S32 temp;
 
-				temp = (S32)(((F32)getExtent().x / (F32)mPlots[k].mGraphData.size()) * (F32)sample);
+            temp = (S32)(((F32)getExtent().x / (F32)mPlots[k].mGraphData.size()) * (F32)sample);
 
-				// calculate the point positions
+            // calculate the point positions
             plotPoint = getPlotPoint(k, sample);
 
-				posX = (S32)((plotPoint.x - mPlots[k].mGraphMin.x) * (ScaleX /(1.00 + mPlots[k].mGraphScale)));
-				posY = (getExtent().y) - (S32)((plotPoint.y  - mPlots[k].mGraphMin.y) * ScaleY);
+            posX = (S32)((plotPoint.x - mPlots[k].mGraphMin.x) * (ScaleX /(1.00 + mPlots[k].mGraphScale)));
+            posY = (getExtent().y) - (S32)((plotPoint.y  - mPlots[k].mGraphMin.y) * ScaleY);
 
             posX += getExtent().x * (mPlots[k].mGraphScale);
-				posY /= (1.00 + (mPlots[k].mGraphScale));
+            posY /= (1.00 + (mPlots[k].mGraphScale));
 
             posX = localToGlobalCoord(Point2I(posX, posY)).x;
-				posY = localToGlobalCoord(Point2I(posX, posY)).y;
+            posY = localToGlobalCoord(Point2I(posX, posY)).y;
 
-				// check if this isn't our first loop through, if it is we won't have starting points
+            // check if this isn't our first loop through, if it is we won't have starting points
             if(sample > 0)
-				{
-					pDrawUtil->drawLine( lastPosX, lastPosY , posX, posY , mPlots[k].mGraphColor );
-				} else
-				{
+            {
+               pDrawUtil->drawLine( lastPosX, lastPosY , posX, posY , mPlots[k].mGraphColor );
+            } else
+            {
                mPlots[k].mNutList.clear();
-				}
+            }
 
             mPlots[k].mNutList.push_back( Point2F(posX, posY) );
 
-				// store the last positions to be the starting points drawn into a line next loop
-				lastPosX = posX;
-				lastPosY = posY;
+            // store the last positions to be the starting points drawn into a line next loop
+            lastPosX = posX;
+            lastPosY = posY;
 
             //Con::printf("red %f green %f blue %f", mPlots[k].mGraphColor.red, mPlots[k].mGraphColor.green, mPlots[k].mGraphColor.blue);
 
 
 
-				if(mSelectedPoint != -1)
-				{
-				   mLastSelectedPoint = mSelectedPoint;
-				}
+            if(mSelectedPoint != -1)
+            {
+               mLastSelectedPoint = mSelectedPoint;
+            }
 
             ColorI nutColor (mPlots[k].mGraphColor);
 
-				if(k == mSelectedPlot && sample == mLastSelectedPoint)
+            if(k == mSelectedPlot && sample == mLastSelectedPoint)
             {
                // grab the colors for the nut
                F32 red = mPlots[k].mGraphColor.red;
@@ -224,51 +224,51 @@ void GuiParticleGraphCtrl::onRender(Point2I offset, const RectI &updateRect)
             } 
 
             // draw the seleciton nut
-				drawNut( Point2I(posX, posY), 3, mOutlineColor, nutColor );
+            drawNut( Point2I(posX, posY), 3, mOutlineColor, nutColor );
 
-				if((mLastSelectedPoint != -1) || (mRenderAllPoints == true))
-				{
+            if((mLastSelectedPoint != -1) || (mRenderAllPoints == true))
+            {
                if((k == mSelectedPlot && sample == mLastSelectedPoint) || (mRenderAllPoints == true))
-				   {
+               {
                   char number[32];
 
-					   Point2I comparePos = localToGlobalCoord(Point2I(getPosition().x, getPosition().y));
+                  Point2I comparePos = localToGlobalCoord(Point2I(getPosition().x, getPosition().y));
 
                   dSprintf(number, 32, "%4.3f %4.3f", plotPoint.x, plotPoint.y);
 
                   S32 textWidth = (S32)font->getStrWidth((const UTF8*)number);;
-				      textWidth /= 2;
+                  textWidth /= 2;
 
-				      if((((S32)posX - (textWidth/2)) < comparePos.x) || (((S32)posX - textWidth) <= 0))
-				      {
+                  if((((S32)posX - (textWidth/2)) < comparePos.x) || (((S32)posX - textWidth) <= 0))
+                  {
                       posX += (textWidth/1.5);
-					  } else if((posX + (textWidth * 1.8)) > (comparePos.x + getExtent().x) || ((posX + textWidth) >= videoMode.resolution.x))
-				      {
+                 } else if((posX + (textWidth * 1.8)) > (comparePos.x + getExtent().x) || ((posX + textWidth) >= videoMode.resolution.x))
+                  {
                       posX -= (textWidth * 1.5);
-				      }
+                  }
 
-				      if((((S32)posY) < comparePos.y) || (((S32)posY - textWidth) <= 0))
-				      {
+                  if((((S32)posY) < comparePos.y) || (((S32)posY - textWidth) <= 0))
+                  {
                       posY += 40;
-				      } 
-				
-					  pDrawUtil->setBitmapModulation( profile->mFontColor );
-					  pDrawUtil->drawText( font, Point2I(posX, posY + 5) - Point2I(size >> 1, size), number );
-					  pDrawUtil->clearBitmapModulation();
-				   }
-				}
-			}
-		}
-	}
-
-	if(mRenderNextGraphTooltip == true && mRenderGraphTooltip == true)
-	{
+                  } 
+            
+                 pDrawUtil->setBitmapModulation( profile->mFontColor );
+                 pDrawUtil->drawText( font, Point2I(posX, posY + 5) - Point2I(size >> 1, size), number );
+                 pDrawUtil->clearBitmapModulation();
+               }
+            }
+         }
+      }
+   }
+
+   if(mRenderNextGraphTooltip == true && mRenderGraphTooltip == true)
+   {
        char argBuffer[1][32];
    
        dSprintf(argBuffer[0], 32, "%s", getGraphName(mTooltipSelectedPlot));
 
-	   renderGraphTooltip(mCursorPos, argBuffer[0]);
-	}
+      renderGraphTooltip(mCursorPos, argBuffer[0]);
+   }
 }
 
 S32 GuiParticleGraphCtrl::addPlotPoint(S32 plotID, Point2F v, bool setAdded)
@@ -302,44 +302,44 @@ S32 GuiParticleGraphCtrl::addPlotPoint(S32 plotID, Point2F v, bool setAdded)
 
    for(S32 i = 0; i < mPlots[plotID].mGraphData.size(); i++)
    {         
-	   if(mFabs(v.x - mPlots[plotID].mGraphData[i].x) < 0.001)
-	   {
-	      if(mAutoRemove == true)
-		   {
+      if(mFabs(v.x - mPlots[plotID].mGraphData[i].x) < 0.001)
+      {
+         if(mAutoRemove == true)
+         {
             changePlotPoint(plotID, i, v);
-			   plotChanged = true;
-			   mPlotIndex = i;
-		   } else
-		   {
+            plotChanged = true;
+            mPlotIndex = i;
+         } else
+         {
             mPlotIndex = -1;
-		   }
-			
-		   plotAdded = true;
-		  
-		   break;
-	   } else if(v.x < mPlots[plotID].mGraphData[i].x)
-	   {
+         }
+         
+         plotAdded = true;
+        
+         break;
+      } else if(v.x < mPlots[plotID].mGraphData[i].x)
+      {
           insertPlotPoint(plotID, i, v); 
-		  plotAdded = true;
-		  mPlotIndex = i;
-		  break;
-	   }
+        plotAdded = true;
+        mPlotIndex = i;
+        break;
+      }
    }
 
    if(plotAdded == false)
    {
-	   mPlots[plotID].mGraphData.push_back( v );
-	   mPlotIndex = mPlots[plotID].mGraphData.size() - 1;
+      mPlots[plotID].mGraphData.push_back( v );
+      mPlotIndex = mPlots[plotID].mGraphData.size() - 1;
    }
 
    if(mAutoMax == true)
    {
       // Keep record of maximum data value for scaling purposes.
       if(v.y > mPlots[plotID].mGraphMax.y)
-	     mPlots[plotID].mGraphMax.y = v.y;
+        mPlots[plotID].mGraphMax.y = v.y;
 
       if(v.x > mPlots[plotID].mGraphMax.x)
-	     mPlots[plotID].mGraphMax.x = v.x;
+        mPlots[plotID].mGraphMax.x = v.x;
    }
 
    if(plotChanged == true)
@@ -348,8 +348,8 @@ S32 GuiParticleGraphCtrl::addPlotPoint(S32 plotID, Point2F v, bool setAdded)
    } else if(mPlotIndex != -1 && setAdded)
    {
       mPointWasAdded = true;
-	   mAddedPoint = v;
-	   mAddedPointIndex = mPlotIndex;
+      mAddedPoint = v;
+      mAddedPointIndex = mPlotIndex;
    }
 
    return mPlotIndex;
@@ -367,10 +367,10 @@ void GuiParticleGraphCtrl::insertPlotPoint(S32 plotID, S32 i, Point2F v)
    {
       // Keep record of maximum data value for scaling purposes.
       if(v.y > mPlots[plotID].mGraphMax.y)
-	     mPlots[plotID].mGraphMax.y = v.y;
+        mPlots[plotID].mGraphMax.y = v.y;
 
       if(v.x > mPlots[plotID].mGraphMax.x)
-	     mPlots[plotID].mGraphMax.x = v.x;
+        mPlots[plotID].mGraphMax.x = v.x;
    }
 
    // Argument Buffer.
@@ -477,7 +477,7 @@ S32 GuiParticleGraphCtrl::getPlotIndex(S32 plotID, F32 x, F32 y)
       compareY = mPlots[plotID].mGraphData[i].y;
 
       //
-	   //if((x == compareX) && (y == compareY))
+      //if((x == compareX) && (y == compareY))
       if((mFabs(x - compareX) < 0.001) && (mFabs(y - compareY) < 0.001))
          return i;
    }
@@ -487,16 +487,16 @@ S32 GuiParticleGraphCtrl::getPlotIndex(S32 plotID, F32 x, F32 y)
 
 void GuiParticleGraphCtrl::setGraphType(S32 plotID, const char *graphType)
 {
-	AssertFatal(plotID > -1 && plotID < MaxPlots, "Invalid plot specified!");
-	if(!dStricmp(graphType,"Bar"))
-		mPlots[plotID].mGraphType = Bar;
-	else if(!dStricmp(graphType,"Filled"))
-		mPlots[plotID].mGraphType = Filled;
-	else if(!dStricmp(graphType,"Point"))
-		mPlots[plotID].mGraphType = Point;
-	else if(!dStricmp(graphType,"Polyline"))
-		mPlots[plotID].mGraphType = Polyline;
-	else AssertWarn(true, "Invalid graph type!");
+   AssertFatal(plotID > -1 && plotID < MaxPlots, "Invalid plot specified!");
+   if(!dStricmp(graphType,"Bar"))
+      mPlots[plotID].mGraphType = Bar;
+   else if(!dStricmp(graphType,"Filled"))
+      mPlots[plotID].mGraphType = Filled;
+   else if(!dStricmp(graphType,"Point"))
+      mPlots[plotID].mGraphType = Point;
+   else if(!dStricmp(graphType,"Polyline"))
+      mPlots[plotID].mGraphType = Polyline;
+   else AssertWarn(true, "Invalid graph type!");
 }
 
 void GuiParticleGraphCtrl::setSelectedPlot(S32 plotID)
@@ -565,8 +565,8 @@ void GuiParticleGraphCtrl::setRenderGraphTooltip(bool renderGraphTooltip)
 
 void GuiParticleGraphCtrl::drawNut(const Point2I &nut, S32 size, ColorI &outlineColor, ColorI &nutColor)
 {
-	// Fetch Draw Utility.
-	GFXDrawUtil* pDrawUtil = GFX->getDrawUtil();
+   // Fetch Draw Utility.
+   GFXDrawUtil* pDrawUtil = GFX->getDrawUtil();
 
    //Con::printf("r %d g %d b %d", nutColor.red, nutColor.green, nutColor.blue);
    S32 NUT_SIZE = size;
@@ -588,17 +588,17 @@ Point2I GuiParticleGraphCtrl::findHitNut( Point2I hitPoint )
 {
    for(S32 i = 0; i < MaxPlots; i++)
    {
-	  if ( (mPlots[i].mGraphData.size() == 0) || (mPlots[i].mHidden == true))
+     if ( (mPlots[i].mGraphData.size() == 0) || (mPlots[i].mHidden == true))
          continue;
 
       for (S32 j = 0 ; j < mPlots[i].mNutList.size(); j++ )
       {
-	     if( inNut (Point2I( mPlots[i].mNutList[j].x, mPlots[i].mNutList[j].y), hitPoint.x, hitPoint.y) )
-		 {
+        if( inNut (Point2I( mPlots[i].mNutList[j].x, mPlots[i].mNutList[j].y), hitPoint.x, hitPoint.y) )
+       {
             mTooltipSelectedPlot = i; 
-			return Point2I(i,j);
-		 }
-	  }
+         return Point2I(i,j);
+       }
+     }
    }
 
    return Point2I(-1,-1);
@@ -718,7 +718,7 @@ StringTableEntry GuiParticleGraphCtrl::getGraphName(S32 plotID)
 void GuiParticleGraphCtrl::onMouseMove(const GuiEvent &event)
 {
    mCursorPos = event.mousePoint;
-	
+   
    Point2I hitNut = findHitNut(event.mousePoint);
 
    if( hitNut != Point2I(-1,-1) )
@@ -745,8 +745,8 @@ void GuiParticleGraphCtrl::onMouseDown(const GuiEvent &event)
 
    if( hitNut != Point2I(-1,-1) )
    {
-	  if(event.mouseClickCount == 2)
-	  {
+     if(event.mouseClickCount == 2)
+     {
         Point2F plotPoint = getPlotPoint(hitNut.x, hitNut.y);
         S32 point = removePlotPoint(hitNut.x, hitNut.y);
 
@@ -755,31 +755,31 @@ void GuiParticleGraphCtrl::onMouseDown(const GuiEvent &event)
    
         dSprintf(argBuffer[0], 32, "%d", mSelectedPlot);
         dSprintf(argBuffer[1], 32, "%d", point);
-		  dSprintf(argBuffer[2], 32, "%f %f", plotPoint.x, plotPoint.y);
+        dSprintf(argBuffer[2], 32, "%f %f", plotPoint.x, plotPoint.y);
 
-		 
+       
 
          // Call Scripts.
          Con::executef(this, "onPlotPointRemoved", argBuffer[0], argBuffer[1], argBuffer[2]);
-	  } else
-	  {
-	     setSelectedPlot(hitNut.x);
+     } else
+     {
+        setSelectedPlot(hitNut.x);
         setSelectedPoint(hitNut.y);
-	     mOriginalSelectedPoint = hitNut.y;
+        mOriginalSelectedPoint = hitNut.y;
 
-		  char argBuffer[32];
+        char argBuffer[32];
 
         dSprintf(argBuffer, 32, "%d", hitNut.y);
 
         // Call Scripts.
         Con::executef(this, "onPlotPointSelectedMouseDown", argBuffer);
-	  }
+     }
    } else if( mSelectedPlot != -1 ) 
    {  
-	   Point2F mousePos = convertToGraphCoord(mSelectedPlot, event.mousePoint);
-	   mLastSelectedPoint = addPlotPoint(mSelectedPlot, mousePos);
+      Point2F mousePos = convertToGraphCoord(mSelectedPlot, event.mousePoint);
+      mLastSelectedPoint = addPlotPoint(mSelectedPlot, mousePos);
 
-	   // Argument Buffer.
+      // Argument Buffer.
       char argBuffer[32];
    
       dSprintf(argBuffer, 32, "%f %f", convertToGraphCoord(mSelectedPlot, event.mousePoint).x, convertToGraphCoord(mSelectedPlot, event.mousePoint).y);
@@ -787,41 +787,41 @@ void GuiParticleGraphCtrl::onMouseDown(const GuiEvent &event)
       // Call Scripts.
       Con::executef(this, "onMouseDragged", argBuffer);
 
-	   return;
+      return;
    }
 }
 
 void GuiParticleGraphCtrl::onMouseUp(const GuiEvent &event)
 {
    if(mSelectedPoint != -1)
-	  mLastSelectedPoint = mSelectedPoint;
+     mLastSelectedPoint = mSelectedPoint;
 
    if(mPointWasAdded == true)
    {
       if(mSelectedPoint == -1)
-	   {
-	     // Argument Buffer.
+      {
+        // Argument Buffer.
          char argBuffer[3][32];
    
          dSprintf(argBuffer[0], 32, "%d", mSelectedPlot);
          dSprintf(argBuffer[1], 32, "%f %f", mAddedPoint.x, mAddedPoint.y);
-		   dSprintf(argBuffer[2], 32, "%d", mAddedPointIndex);
+         dSprintf(argBuffer[2], 32, "%d", mAddedPointIndex);
          
          // Call Scripts.
          Con::executef(this, "onPlotPointAdded", argBuffer[0], argBuffer[1], argBuffer[2]);
-	   } else
-	   {
+      } else
+      {
          // Argument Buffer.
          char argBuffer[4][32];
    
          dSprintf(argBuffer[0], 32, "%d", mSelectedPlot);
          dSprintf(argBuffer[1], 32, "%f %f", mAddedPoint.x, mAddedPoint.y);
-		   dSprintf(argBuffer[2], 32, "%d", mOriginalSelectedPoint);
-		   dSprintf(argBuffer[3], 32, "%d", mAddedPointIndex);
+         dSprintf(argBuffer[2], 32, "%d", mOriginalSelectedPoint);
+         dSprintf(argBuffer[3], 32, "%d", mAddedPointIndex);
 
          // Call Scripts.
          Con::executef(this, "onPlotPointChangedUp", argBuffer[0], argBuffer[1], argBuffer[2], argBuffer[3]);
-	  }
+     }
    }
 
    mPointWasAdded = false;
@@ -835,37 +835,37 @@ void GuiParticleGraphCtrl::onMouseDragged(const GuiEvent &event)
 
    if(mSelectedPoint != -1)
    {
-	   Point2F mousePos = convertToGraphCoord(mSelectedPlot, event.mousePoint);
+      Point2F mousePos = convertToGraphCoord(mSelectedPlot, event.mousePoint);
 
       if(mPointXMovementClamped == true)
-	   {
+      {
          F32 prevXPos = getPlotPoint(mSelectedPlot, mSelectedPoint).x;
-		   if(mousePos.x != prevXPos)
-		   {
-		      mousePos.x = prevXPos;
-		   }
-	   }
-
-	   removePlotPoint(mSelectedPlot, mSelectedPoint);
-	   S32 point = addPlotPoint(mSelectedPlot, mousePos);
+         if(mousePos.x != prevXPos)
+         {
+            mousePos.x = prevXPos;
+         }
+      }
+
+      removePlotPoint(mSelectedPlot, mSelectedPoint);
+      S32 point = addPlotPoint(mSelectedPlot, mousePos);
       if(point != -1)
-	   {
+      {
          setSelectedPoint(point);
-		   mLastMousePos = mousePos;
+         mLastMousePos = mousePos;
 
          // Argument Buffer.
          char argBuffer[3][32];
    
          dSprintf(argBuffer[0], 32, "%d", mSelectedPlot);
          dSprintf(argBuffer[1], 32, "%f %f", mAddedPoint.x, mAddedPoint.y);
-	      dSprintf(argBuffer[2], 32, "%d", point);
+         dSprintf(argBuffer[2], 32, "%d", point);
 
          // Call Scripts.
          Con::executef(this, "onPlotPointChangedMove", argBuffer[0], argBuffer[1], argBuffer[2]);
-	   } else
-	   {
+      } else
+      {
          point = addPlotPoint(mSelectedPlot, mLastMousePos);
-	   }
+      }
    }
 
    // Argument Buffer.
@@ -891,7 +891,7 @@ void GuiParticleGraphCtrl::onRightMouseDown(const GuiEvent &event)
    
       dSprintf(argBuffer[0], 32, "%d", mSelectedPlot);
       dSprintf(argBuffer[1], 32, "%d", point);
-	   dSprintf(argBuffer[2], 32, "%f %f", plotPoint.x, plotPoint.y);
+      dSprintf(argBuffer[2], 32, "%f %f", plotPoint.x, plotPoint.y);
 
       // Call Scripts.
       Con::executef(this, "onPlotPointRemoved", argBuffer[0], argBuffer[1], argBuffer[2]);
@@ -912,12 +912,12 @@ void GuiParticleGraphCtrl::onRightMouseDragged(const GuiEvent &event)
       Point2F plotPoint = getPlotPoint(hitNut.x, hitNut.y);
       S32 point = removePlotPoint(hitNut.x, hitNut.y);
 
-	   // Argument Buffer.
+      // Argument Buffer.
       char argBuffer[3][32];
    
       dSprintf(argBuffer[0], 32, "%d", mSelectedPlot);
       dSprintf(argBuffer[1], 32, "%d", point);
-	   dSprintf(argBuffer[2], 32, "%f %f", plotPoint.x, plotPoint.y);
+      dSprintf(argBuffer[2], 32, "%f %f", plotPoint.x, plotPoint.y);
 
       // Call Scripts.
       Con::executef(this, "onPlotPointRemoved", argBuffer[0], argBuffer[1], argBuffer[2]);
@@ -987,12 +987,12 @@ bool GuiParticleGraphCtrl::renderGraphTooltip(Point2I cursorPos, StringTableEntr
    RectI rect(offset, textBounds);
    GFX->setClipRect(rect);
 
-	// Fetch Draw Utility.
-	GFXDrawUtil* pDrawUtil = GFX->getDrawUtil();
+   // Fetch Draw Utility.
+   GFXDrawUtil* pDrawUtil = GFX->getDrawUtil();
 
    // Draw Filler bit, then border on top of that
-	pDrawUtil->drawRectFill(rect, ColorI(mTooltipProfile->mFillColor.red, mTooltipProfile->mFillColor.green, mTooltipProfile->mFillColor.blue, 200) );
-	pDrawUtil->drawRect( rect, mTooltipProfile->mBorderColor );
+   pDrawUtil->drawRectFill(rect, ColorI(mTooltipProfile->mFillColor.red, mTooltipProfile->mFillColor.green, mTooltipProfile->mFillColor.blue, 200) );
+   pDrawUtil->drawRect( rect, mTooltipProfile->mBorderColor );
 
    // Draw the text centered in the tool tip box
    pDrawUtil->setBitmapModulation( mTooltipProfile->mFontColor );
@@ -1006,102 +1006,102 @@ bool GuiParticleGraphCtrl::renderGraphTooltip(Point2I cursorPos, StringTableEntr
 
 DefineConsoleMethod(GuiParticleGraphCtrl, setSelectedPoint, void, (S32 point), , "(int point)"
               "Set the selected point on the graph.\n"
-			  "@return No return value")
+           "@return No return value")
 {
    if(point >= object->mPlots[object->mSelectedPlot].mGraphData.size() || point < 0)
    {
-	   Con::errorf("Invalid point to select.");
-	   return;
+      Con::errorf("Invalid point to select.");
+      return;
    }
    object->setSelectedPoint( point );
 }
 
 DefineConsoleMethod(GuiParticleGraphCtrl, setSelectedPlot, void, (S32 plotID), , "(int plotID)"
               "Set the selected plot (a.k.a. graph)."
-			  "@return No return value" )
+           "@return No return value" )
 {
    if(plotID > object->MaxPlots)
    {
-	   Con::errorf("Invalid plotID.");
-	   return;
+      Con::errorf("Invalid plotID.");
+      return;
    }
    object->setSelectedPlot( plotID );
 }
 
 DefineConsoleMethod(GuiParticleGraphCtrl, clearGraph, void, (S32 plotID), , "(int plotID)"
               "Clear the graph of the given plot."
-			  "@return No return value")
+           "@return No return value")
 {
    if(plotID > object->MaxPlots)
    {
-	   Con::errorf("Invalid plotID.");
-	   return;
+      Con::errorf("Invalid plotID.");
+      return;
    }
    object->clearGraph( plotID );
 }
 
 DefineConsoleMethod(GuiParticleGraphCtrl, clearAllGraphs, void, (), , "()"
               "Clear all of the graphs."
-			  "@return No return value")
+           "@return No return value")
 {
    object->clearAllGraphs();
 }
 
 DefineConsoleMethod(GuiParticleGraphCtrl, addPlotPoint, S32, (S32 plotID, F32 x, F32 y, bool setAdded), (true), "(int plotID, float x, float y, bool setAdded = true;)"
               "Add a data point to the given plot."
-			  "@return")
+           "@return")
 {
   
    if(plotID > object->MaxPlots)
    {
-	   Con::errorf("Invalid plotID.");
-	   return -2;
+      Con::errorf("Invalid plotID.");
+      return -2;
    }
    return object->addPlotPoint( plotID, Point2F(x, y), setAdded);
 }
 
 DefineConsoleMethod(GuiParticleGraphCtrl, insertPlotPoint, void, (S32 plotID, S32 i, F32 x, F32 y), , "(int plotID, int i, float x, float y)\n"
               "Insert a data point to the given plot and plot position.\n"
-			  "@param plotID The plot you want to access\n"
-			  "@param i The data point.\n"
-			  "@param x,y The plot position.\n"
-			  "@return No return value.")
+           "@param plotID The plot you want to access\n"
+           "@param i The data point.\n"
+           "@param x,y The plot position.\n"
+           "@return No return value.")
 {
    if(plotID > object->MaxPlots)
    {
-	   Con::errorf("Invalid plotID.");
-	   return;
+      Con::errorf("Invalid plotID.");
+      return;
    }
    object->insertPlotPoint( plotID, i, Point2F(x, y));
 }
 
 DefineConsoleMethod(GuiParticleGraphCtrl, changePlotPoint, S32, (S32 plotID, S32 i, F32 x, F32 y), , "(int plotID, int i, float x, float y)"
               "Change a data point to the given plot and plot position.\n"
-			  "@param plotID The plot you want to access\n"
-			  "@param i The data point.\n"
-			  "@param x,y The plot position.\n"
-			  "@return No return value.")
+           "@param plotID The plot you want to access\n"
+           "@param i The data point.\n"
+           "@param x,y The plot position.\n"
+           "@return No return value.")
 {
    if(plotID > object->MaxPlots)
    {
-	   Con::errorf("Invalid plotID.");
-	   return -1;
+      Con::errorf("Invalid plotID.");
+      return -1;
    }
    return object->changePlotPoint( plotID, i, Point2F(x, y));
 }
 
 DefineConsoleMethod(GuiParticleGraphCtrl, getSelectedPlot, S32, (), , "() "
               "Gets the selected Plot (a.k.a. graph).\n"
-			  "@return The plot's ID.")
+           "@return The plot's ID.")
 {
   return object->getSelectedPlot();
 }
 
 DefineConsoleMethod(GuiParticleGraphCtrl, getSelectedPoint, S32, (), , "()"
               "Gets the selected Point on the Plot (a.k.a. graph)."
-			  "@return The last selected point ID")
+           "@return The last selected point ID")
 {
-	return object->getSelectedPoint();
+   return object->getSelectedPoint();
 }
 
 DefineConsoleMethod(GuiParticleGraphCtrl, isExistingPoint, bool, (S32 plotID, S32 samples), , "(int plotID, int samples)"
@@ -1110,27 +1110,27 @@ DefineConsoleMethod(GuiParticleGraphCtrl, isExistingPoint, bool, (S32 plotID, S3
 
    if(plotID > object->MaxPlots)
    {
-	   Con::errorf("Invalid plotID.");
+      Con::errorf("Invalid plotID.");
    }
    if(samples > object->MaxDataPoints)
    {
-	   Con::errorf("Invalid sample.");
+      Con::errorf("Invalid sample.");
    }
    return object->isExistingPoint(plotID, samples);
 }
 
 DefineConsoleMethod(GuiParticleGraphCtrl, getPlotPoint, Point2F, (S32 plotID, S32 samples), , "(int plotID, int samples)"
               "Get a data point from the plot specified, samples from the start of the graph."
-			  "@return The data point ID")
+           "@return The data point ID")
 {
 
    if(plotID > object->MaxPlots)
    {
-	   Con::errorf("Invalid plotID.");
+      Con::errorf("Invalid plotID.");
    }
    if(samples > object->MaxDataPoints)
    {
-	   Con::errorf("Invalid sample.");
+      Con::errorf("Invalid sample.");
    }
 
    
@@ -1139,26 +1139,26 @@ DefineConsoleMethod(GuiParticleGraphCtrl, getPlotPoint, Point2F, (S32 plotID, S3
 
 DefineConsoleMethod(GuiParticleGraphCtrl, getPlotIndex, S32, (S32 plotID, F32 x, F32 y), , "(int plotID, float x, float y)\n"
               "Gets the index of the point passed on the plotID passed (graph ID).\n"
-			  "@param plotID The plot you wish to check.\n"
-			  "@param x,y The coordinates of the point to get.\n"
-			  "@return Returns the index of the point.\n")
+           "@param plotID The plot you wish to check.\n"
+           "@param x,y The coordinates of the point to get.\n"
+           "@return Returns the index of the point.\n")
 {
 
    if(plotID > object->MaxPlots)
    {
-	   Con::errorf("Invalid plotID.");
+      Con::errorf("Invalid plotID.");
    }
    return object->getPlotIndex(plotID, x, y);
 }
 
 DefineConsoleMethod(GuiParticleGraphCtrl, getGraphColor, ColorF, (S32 plotID), , "(int plotID)"
               "Get the color of the graph passed."
-			  "@return Returns the color of the graph as a string of RGB values formatted as \"R G B\"")
+           "@return Returns the color of the graph as a string of RGB values formatted as \"R G B\"")
 {
 
    if(plotID > object->MaxPlots)
    {
-	   Con::errorf("Invalid plotID.");
+      Con::errorf("Invalid plotID.");
    }
   
    return object->getGraphColor(plotID);
@@ -1167,24 +1167,24 @@ DefineConsoleMethod(GuiParticleGraphCtrl, getGraphColor, ColorF, (S32 plotID), ,
 
 DefineConsoleMethod(GuiParticleGraphCtrl, getGraphMin, Point2F, (S32 plotID), , "(int plotID) "
               "Get the minimum values of the graph ranges.\n"
-			  "@return Returns the minimum of the range formatted as \"x-min y-min\"")
+           "@return Returns the minimum of the range formatted as \"x-min y-min\"")
 {
 
    if(plotID > object->MaxPlots)
    {
-	   Con::errorf("Invalid plotID.");
+      Con::errorf("Invalid plotID.");
    }
    return object->getGraphMin(plotID);
 }
 
 DefineConsoleMethod(GuiParticleGraphCtrl, getGraphMax, Point2F, (S32 plotID), , "(int plotID) "
-			  "Get the maximum values of the graph ranges.\n"
-			  "@return Returns the maximum of the range formatted as \"x-max y-max\"")
+           "Get the maximum values of the graph ranges.\n"
+           "@return Returns the maximum of the range formatted as \"x-max y-max\"")
 {
 
    if(plotID > object->MaxPlots)
    {
-	   Con::errorf("Invalid plotID.");
+      Con::errorf("Invalid plotID.");
    }
    return object->getGraphMax(plotID);
     
@@ -1192,12 +1192,12 @@ DefineConsoleMethod(GuiParticleGraphCtrl, getGraphMax, Point2F, (S32 plotID), ,
 
 DefineConsoleMethod(GuiParticleGraphCtrl, getGraphName, const char*, (S32 plotID), , "(int plotID) "
               "Get the name of the graph passed.\n"
-			  "@return Returns the name of the plot")
+           "@return Returns the name of the plot")
 {
 
    if(plotID > object->MaxPlots)
    {
-	   Con::errorf("Invalid plotID.");
+      Con::errorf("Invalid plotID.");
    }
 
    const U32 bufSize = 64;
@@ -1208,170 +1208,170 @@ DefineConsoleMethod(GuiParticleGraphCtrl, getGraphName, const char*, (S32 plotID
 }
 
 DefineConsoleMethod(GuiParticleGraphCtrl, setGraphMin, void, (S32 plotID, F32 minX, F32 minY), , "(int plotID, float minX, float minY) "
-			  "Set the min values of the graph of plotID.\n"
-			  "@param plotID The plot to modify\n"
-			  "@param minX,minY The minimum bound of the value range.\n"
-			  "@return No return value.")
+           "Set the min values of the graph of plotID.\n"
+           "@param plotID The plot to modify\n"
+           "@param minX,minY The minimum bound of the value range.\n"
+           "@return No return value.")
 {
 
-	if(plotID > object->MaxPlots)
-	{
-		Con::errorf("Invalid plotID.");
-		return;
-	}
+   if(plotID > object->MaxPlots)
+   {
+      Con::errorf("Invalid plotID.");
+      return;
+   }
 
-	object->setGraphMin(plotID, Point2F(minX, minY));
+   object->setGraphMin(plotID, Point2F(minX, minY));
 }
 
 DefineConsoleMethod(GuiParticleGraphCtrl, setGraphMinX, void, (S32 plotID, F32 minX), , "(int plotID, float minX) "
-			  "Set the min X value of the graph of plotID.\n"
-			  "@param plotID The plot to modify.\n"
-			  "@param minX The minimum x value.\n"
-			  "@return No return Value.")
+           "Set the min X value of the graph of plotID.\n"
+           "@param plotID The plot to modify.\n"
+           "@param minX The minimum x value.\n"
+           "@return No return Value.")
 {
 
-	if(plotID > object->MaxPlots)
-	{
-		Con::errorf("Invalid plotID.");
-		return;
-	}
+   if(plotID > object->MaxPlots)
+   {
+      Con::errorf("Invalid plotID.");
+      return;
+   }
 
-	object->setGraphMinX(plotID, minX);
+   object->setGraphMinX(plotID, minX);
 }
 
 DefineConsoleMethod(GuiParticleGraphCtrl, setGraphMinY, void, (S32 plotID, F32 minX), , "(int plotID, float minY) "
-			  "Set the min Y value of the graph of plotID."
-			  "@param plotID The plot to modify.\n"
-			  "@param minY The minimum y value.\n"
-			  "@return No return Value.")
+           "Set the min Y value of the graph of plotID."
+           "@param plotID The plot to modify.\n"
+           "@param minY The minimum y value.\n"
+           "@return No return Value.")
 {
 
-	if(plotID > object->MaxPlots)
-	{
-		Con::errorf("Invalid plotID.");
-		return;
-	}
+   if(plotID > object->MaxPlots)
+   {
+      Con::errorf("Invalid plotID.");
+      return;
+   }
 
-	object->setGraphMinY(plotID, minX);
+   object->setGraphMinY(plotID, minX);
 }
 
 DefineConsoleMethod(GuiParticleGraphCtrl, setGraphMax, void, (S32 plotID, F32 maxX, F32 maxY), , "(int plotID, float maxX, float maxY) "
-			  "Set the max values of the graph of plotID."
-			  "@param plotID The plot to modify\n"
-			  "@param maxX,maxY The maximum bound of the value range.\n"
-			  "@return No return value.")
+           "Set the max values of the graph of plotID."
+           "@param plotID The plot to modify\n"
+           "@param maxX,maxY The maximum bound of the value range.\n"
+           "@return No return value.")
 {
 
-	if(plotID > object->MaxPlots)
-	{
-		Con::errorf("Invalid plotID.");
-		return;
-	}
+   if(plotID > object->MaxPlots)
+   {
+      Con::errorf("Invalid plotID.");
+      return;
+   }
 
-	object->setGraphMax(plotID, Point2F(maxX, maxY));
+   object->setGraphMax(plotID, Point2F(maxX, maxY));
 }
 
 DefineConsoleMethod(GuiParticleGraphCtrl, setGraphMaxX, void, (S32 plotID, F32 maxX), , "(int plotID, float maxX)"
-			  "Set the max X value of the graph of plotID."
-			  "@param plotID The plot to modify.\n"
-			  "@param maxX The maximum x value.\n"
-			  "@return No return Value.")
+           "Set the max X value of the graph of plotID."
+           "@param plotID The plot to modify.\n"
+           "@param maxX The maximum x value.\n"
+           "@return No return Value.")
 {
 
-	if(plotID > object->MaxPlots)
-	{
-		Con::errorf("Invalid plotID.");
-		return;
-	}
+   if(plotID > object->MaxPlots)
+   {
+      Con::errorf("Invalid plotID.");
+      return;
+   }
 
-	object->setGraphMaxX(plotID, maxX);
+   object->setGraphMaxX(plotID, maxX);
 }
 
 DefineConsoleMethod(GuiParticleGraphCtrl, setGraphMaxY, void, (S32 plotID, F32 maxX), , "(int plotID, float maxY)"
-			  "Set the max Y value of the graph of plotID."
-			  "@param plotID The plot to modify.\n"
-			  "@param maxY The maximum y value.\n"
-			  "@return No return Value.")
+           "Set the max Y value of the graph of plotID."
+           "@param plotID The plot to modify.\n"
+           "@param maxY The maximum y value.\n"
+           "@return No return Value.")
 {
 
-	if(plotID > object->MaxPlots)
-	{
-		Con::errorf("Invalid plotID.");
-		return;
-	}
+   if(plotID > object->MaxPlots)
+   {
+      Con::errorf("Invalid plotID.");
+      return;
+   }
 
-	object->setGraphMaxY(plotID, maxX);
+   object->setGraphMaxY(plotID, maxX);
 }
 
 DefineConsoleMethod(GuiParticleGraphCtrl, setGraphHidden, void, (S32 plotID, bool isHidden), , "(int plotID, bool isHidden)"
-			  "Set whether the graph number passed is hidden or not."
-			  "@return No return value.")
+           "Set whether the graph number passed is hidden or not."
+           "@return No return value.")
 {
 
-	if(plotID > object->MaxPlots)
-	{
-		Con::errorf("Invalid plotID.");
-		return;
-	}
+   if(plotID > object->MaxPlots)
+   {
+      Con::errorf("Invalid plotID.");
+      return;
+   }
 
-	object->setGraphHidden(plotID, isHidden);
+   object->setGraphHidden(plotID, isHidden);
 }
 
 DefineConsoleMethod(GuiParticleGraphCtrl, setAutoGraphMax, void, (bool autoMax), , "(bool autoMax) "
-			  "Set whether the max will automatically be set when adding points "
-			  "(ie if you add a value over the current max, the max is increased to that value).\n"
-			  "@return No return value.")
+           "Set whether the max will automatically be set when adding points "
+           "(ie if you add a value over the current max, the max is increased to that value).\n"
+           "@return No return value.")
 {
-	object->setAutoGraphMax(autoMax);
+   object->setAutoGraphMax(autoMax);
 }
 
 DefineConsoleMethod(GuiParticleGraphCtrl, setAutoRemove, void, (bool autoRemove), , "(bool autoRemove) "
-			  "Set whether or not a point should be deleted when you drag another one over it."
-			  "@return No return value.")
+           "Set whether or not a point should be deleted when you drag another one over it."
+           "@return No return value.")
 {
-	object->setAutoRemove(autoRemove);
+   object->setAutoRemove(autoRemove);
 }
 
 DefineConsoleMethod(GuiParticleGraphCtrl, setRenderAll, void, (bool autoRemove), , "(bool renderAll)"
-			  "Set whether or not a position should be rendered on every point or just the last selected."
-			  "@return No return value.")
+           "Set whether or not a position should be rendered on every point or just the last selected."
+           "@return No return value.")
 {
-	object->setRenderAll(autoRemove);
+   object->setRenderAll(autoRemove);
 }
 
 DefineConsoleMethod(GuiParticleGraphCtrl, setPointXMovementClamped, void, (bool autoRemove), , "(bool clamped)"
-			  "Set whether the x position of the selected graph point should be clamped"
-			  "@return No return value.")
+           "Set whether the x position of the selected graph point should be clamped"
+           "@return No return value.")
 {
-	object->setPointXMovementClamped(autoRemove);
+   object->setPointXMovementClamped(autoRemove);
 }
 
 DefineConsoleMethod(GuiParticleGraphCtrl, setRenderGraphTooltip, void, (bool autoRemove), , "(bool renderGraphTooltip)"
-			  "Set whether or not to render the graph tooltip."
-			  "@return No return value.")
+           "Set whether or not to render the graph tooltip."
+           "@return No return value.")
 {
-	object->setRenderGraphTooltip(autoRemove);
+   object->setRenderGraphTooltip(autoRemove);
 }
 
 DefineConsoleMethod(GuiParticleGraphCtrl, setGraphName, void, (S32 plotID, const char * graphName), , "(int plotID, string graphName) "
-			  "Set the name of the given plot.\n"
-			  "@param plotID The plot to modify.\n"
-			  "@param graphName The name to set on the plot.\n"
-			  "@return No return value.")
+           "Set the name of the given plot.\n"
+           "@param plotID The plot to modify.\n"
+           "@param graphName The name to set on the plot.\n"
+           "@return No return value.")
 {
 
-	if(plotID > object->MaxPlots)
-	{
-		Con::errorf("Invalid plotID.");
-		return;
-	}
+   if(plotID > object->MaxPlots)
+   {
+      Con::errorf("Invalid plotID.");
+      return;
+   }
 
-	object->setGraphName(plotID, graphName);
+   object->setGraphName(plotID, graphName);
 }
 
 DefineConsoleMethod(GuiParticleGraphCtrl, resetSelectedPoint, void, (), , "()"
-			  "This will reset the currently selected point to nothing."
-			  "@return No return value.")
+           "This will reset the currently selected point to nothing."
+           "@return No return value.")
 {
-	object->resetSelectedPoint();
+   object->resetSelectedPoint();
 }

+ 2 - 2
Engine/source/gui/game/guiChunkedBitmapCtrl.cpp

@@ -65,10 +65,10 @@ ConsoleDocClass( GuiChunkedBitmapCtrl,
 
 void GuiChunkedBitmapCtrl::initPersistFields()
 {
-   addGroup("GuiChunkedBitmapCtrl");		
+   addGroup("GuiChunkedBitmapCtrl");      
    addField( "bitmap",        TypeFilename,  Offset( mBitmapName, GuiChunkedBitmapCtrl ), "This is the bitmap to render to the control." );
    addField( "useVariable",   TypeBool,      Offset( mUseVariable, GuiChunkedBitmapCtrl ), "This decides whether to use the \"bitmap\" file "
-	                                                                                      "or a bitmap stored in \"variable\"");
+                                                                                         "or a bitmap stored in \"variable\"");
    addField( "tile",          TypeBool,      Offset( mTile, GuiChunkedBitmapCtrl ), "This is no longer in use");
    endGroup("GuiChunkedBitmapCtrl");
    Parent::initPersistFields();

+ 11 - 11
Engine/source/gui/worldEditor/undoActions.cpp

@@ -32,9 +32,9 @@
 IMPLEMENT_CONOBJECT( MECreateUndoAction );
 
 ConsoleDocClass( MECreateUndoAction,
-				"@brief Material Editor create undo instance\n\n"
-				"Not intended for game development, for editors or internal use only.\n\n "
-				"@internal");
+            "@brief Material Editor create undo instance\n\n"
+            "Not intended for game development, for editors or internal use only.\n\n "
+            "@internal");
 
 MECreateUndoAction::MECreateUndoAction( const UTF8* actionName )
    :  UndoAction( actionName )
@@ -62,7 +62,7 @@ DefineEngineMethod( MECreateUndoAction, addObject, void, ( SimObject* obj),,
    "Add the object being created to an undo action.\n"
    "@param obj Object being created you want to create the undo for.")
 {
-	if (obj)
+   if (obj)
       object->addObject( obj );
 }
 
@@ -117,9 +117,9 @@ void MECreateUndoAction::redo()
 IMPLEMENT_CONOBJECT( MEDeleteUndoAction );
 
 ConsoleDocClass( MEDeleteUndoAction,
-				"@brief Material Editor delete undo instance\n\n"
-				"Not intended for game development, for editors or internal use only.\n\n "
-				"@internal");
+            "@brief Material Editor delete undo instance\n\n"
+            "Not intended for game development, for editors or internal use only.\n\n "
+            "@internal");
 
 MEDeleteUndoAction::MEDeleteUndoAction( const UTF8 *actionName )
    :  UndoAction( actionName )
@@ -169,7 +169,7 @@ DefineEngineMethod( MEDeleteUndoAction, deleteObject, void, ( SimObject* obj),,
    "Delete the object and add it to the undo action.\n"
    "@param obj Object to delete and add to the undo action.")
 {
-	if (obj)
+   if (obj)
       object->deleteObject( obj );
 }
 
@@ -210,9 +210,9 @@ void MEDeleteUndoAction::redo()
 IMPLEMENT_CONOBJECT( InspectorFieldUndoAction );
 
 ConsoleDocClass( InspectorFieldUndoAction,
-				"@brief Inspector Field undo action instance\n\n"
-				"Not intended for game development, for editors or internal use only.\n\n "
-				"@internal");
+            "@brief Inspector Field undo action instance\n\n"
+            "Not intended for game development, for editors or internal use only.\n\n "
+            "@internal");
 
 InspectorFieldUndoAction::InspectorFieldUndoAction()
 {

+ 7 - 7
Engine/source/lighting/lightManager.cpp

@@ -306,7 +306,7 @@ void LightManager::_update4LightConsts(   const SceneData &sgData,
                                           GFXShaderConstHandle *lightInvRadiusSqSC,
                                           GFXShaderConstHandle *lightSpotDirSC,
                                           GFXShaderConstHandle *lightSpotAngleSC,
-										  GFXShaderConstHandle *lightSpotFalloffSC,
+                                GFXShaderConstHandle *lightSpotFalloffSC,
                                           GFXShaderConstBuffer *shaderConsts )
 {
    PROFILE_SCOPE( LightManager_Update4LightConsts );
@@ -317,7 +317,7 @@ void LightManager::_update4LightConsts(   const SceneData &sgData,
          lightInvRadiusSqSC->isValid() ||
          lightSpotDirSC->isValid() ||
          lightSpotAngleSC->isValid() ||
-		 lightSpotFalloffSC->isValid() )
+       lightSpotFalloffSC->isValid() )
    {
       PROFILE_SCOPE( LightManager_Update4LightConsts_setLights );
 
@@ -326,7 +326,7 @@ void LightManager::_update4LightConsts(   const SceneData &sgData,
       static AlignedArray<Point4F> lightColors( 4, sizeof( Point4F ) );
       static Point4F lightInvRadiusSq;
       static Point4F lightSpotAngle;
-	  static Point4F lightSpotFalloff;
+     static Point4F lightSpotFalloff;
       F32 range;
       
       // Need to clear the buffers so that we don't leak
@@ -359,10 +359,10 @@ void LightManager::_update4LightConsts(   const SceneData &sgData,
             lightSpotDirs[2][i] = lightDir.z;
             
             if ( light->getType() == LightInfo::Spot )
-			{
+         {
                lightSpotAngle[i] = mCos( mDegToRad( light->getOuterConeAngle() / 2.0f ) ); 
-			   lightSpotFalloff[i] = 1.0f / getMax( F32_MIN, mCos( mDegToRad( light->getInnerConeAngle() / 2.0f ) ) - lightSpotAngle[i] );
-			}
+            lightSpotFalloff[i] = 1.0f / getMax( F32_MIN, mCos( mDegToRad( light->getInnerConeAngle() / 2.0f ) ) - lightSpotAngle[i] );
+         }
 
          // Prescale the light color by the brightness to 
          // avoid doing this in the shader.
@@ -379,7 +379,7 @@ void LightManager::_update4LightConsts(   const SceneData &sgData,
 
          shaderConsts->setSafe( lightSpotDirSC, lightSpotDirs );
          shaderConsts->setSafe( lightSpotAngleSC, lightSpotAngle );
-		 shaderConsts->setSafe( lightSpotFalloffSC, lightSpotFalloff );
+       shaderConsts->setSafe( lightSpotFalloffSC, lightSpotFalloff );
 
       
    }

+ 4 - 4
Engine/source/navigation/navMesh.cpp

@@ -1143,10 +1143,10 @@ void NavMesh::buildLinks()
       // Iterate over links
       for(U32 j = 0; j < mLinkIDs.size(); j++)
       {
-			if (mLinksUnsynced[j])
-			{
+         if (mLinksUnsynced[j])
+         {
          if(tile.box.isContained(getLinkStart(j)) ||
-					tile.box.isContained(getLinkEnd(j)))
+               tile.box.isContained(getLinkEnd(j)))
          {
             // Mark tile for build.
             mDirtyTiles.push_back_unique(i);
@@ -1161,7 +1161,7 @@ void NavMesh::buildLinks()
          }
       }
    }
-	}
+   }
    if(mDirtyTiles.size())
       ctx->startTimer(RC_TIMER_TOTAL);
 }

+ 9 - 9
Engine/source/platform/menus/popupMenu.cpp

@@ -54,7 +54,7 @@ PopupMenu::PopupMenu() : mCanvas(NULL)
    mBarTitle = StringTable->insert("");
    mIsPopup = false;
 
-	mPopupGUID = sMaxPopupGUID++;
+   mPopupGUID = sMaxPopupGUID++;
 }
 
 PopupMenu::~PopupMenu()
@@ -126,10 +126,10 @@ void PopupMenu::onMenuSelect()
 //-----------------------------------------------------------------------------
 
 void PopupMenu::handleSelectEvent(U32 popID, U32 command)
-{	
-	if (popID == mPopupGUID && canHandleID(command))	
-		if (handleSelect(command))
-			smSelectionEventHandled = true;
+{  
+   if (popID == mPopupGUID && canHandleID(command))   
+      if (handleSelect(command))
+         smSelectionEventHandled = true;
 }
 
 //-----------------------------------------------------------------------------
@@ -138,8 +138,8 @@ void PopupMenu::onAttachToMenuBar(GuiCanvas *canvas, S32 pos, const char *title)
 {
    mCanvas = canvas;
 
-	// Attached menus must be notified of menu events
-	smPopupMenuEvent.notify(this, &PopupMenu::handleSelectEvent);
+   // Attached menus must be notified of menu events
+   smPopupMenuEvent.notify(this, &PopupMenu::handleSelectEvent);
    
    // Pass on to sub menus
    for(SimSet::iterator i = mSubmenus->begin();i != mSubmenus->end();++i)
@@ -160,8 +160,8 @@ void PopupMenu::onRemoveFromMenuBar(GuiCanvas *canvas)
 {
    mCanvas = NULL;
 
-	// We are no longer interested in select events, remove ourselves from the notification list in a safe way
-	Sim::postCurrentEvent(this, new PopUpNotifyRemoveEvent());
+   // We are no longer interested in select events, remove ourselves from the notification list in a safe way
+   Sim::postCurrentEvent(this, new PopUpNotifyRemoveEvent());
       
    // Pass on to sub menus
    for(SimSet::iterator i = mSubmenus->begin();i != mSubmenus->end();++i)

+ 22 - 22
Engine/source/platform/profiler.cpp

@@ -724,37 +724,37 @@ DefineEngineFunction( profilerMarkerEnable, void, ( const char* markerName, bool
 //-----------------------------------------------------------------------------
 
 DefineEngineFunction( profilerEnable, void, ( bool enable ),,
-				"@brief Enables or disables the profiler.\n\n"
-				"Data is only gathered while the profiler is enabled.\n\n"
-				"@note Profiler is not available in shipping builds.\n"
-				"T3D has predefined profiling areas surrounded by markers, "
-				"but you may need to define additional markers (in C++) around areas you wish to profile,"
-				" by using the PROFILE_START( markerName ); and PROFILE_END(); macros.\n\n"
-				"@ingroup Debugging\n" )
+            "@brief Enables or disables the profiler.\n\n"
+            "Data is only gathered while the profiler is enabled.\n\n"
+            "@note Profiler is not available in shipping builds.\n"
+            "T3D has predefined profiling areas surrounded by markers, "
+            "but you may need to define additional markers (in C++) around areas you wish to profile,"
+            " by using the PROFILE_START( markerName ); and PROFILE_END(); macros.\n\n"
+            "@ingroup Debugging\n" )
 {
    if(gProfiler)
       gProfiler->enable(enable);
 }
 
 DefineEngineFunction(profilerDump, void, (),,
-				"@brief Dumps current profiling stats to the console window.\n\n"
-				"@note Markers disabled with profilerMarkerEnable() will be skipped over. "
-				"If the profiler is currently running, it will be disabled.\n"
-				"@ingroup Debugging")
+            "@brief Dumps current profiling stats to the console window.\n\n"
+            "@note Markers disabled with profilerMarkerEnable() will be skipped over. "
+            "If the profiler is currently running, it will be disabled.\n"
+            "@ingroup Debugging")
 {
    if(gProfiler)
       gProfiler->dumpToConsole();
 }
 
 DefineEngineFunction( profilerDumpToFile, void, ( const char* fileName ),,
-				"@brief Dumps current profiling stats to a file.\n\n"
-				"@note If the profiler is currently running, it will be disabled.\n"
-				"@param fileName Name and path of file to save profiling stats to. Must use forward slashes (/). "
-				"Will attempt to create the file if it does not already exist.\n"
-				"@tsexample\n"
-				"profilerDumpToFile( \"C:/Torque/log1.txt\" );\n"
-				"@endtsexample\n\n"
-				"@ingroup Debugging" )
+            "@brief Dumps current profiling stats to a file.\n\n"
+            "@note If the profiler is currently running, it will be disabled.\n"
+            "@param fileName Name and path of file to save profiling stats to. Must use forward slashes (/). "
+            "Will attempt to create the file if it does not already exist.\n"
+            "@tsexample\n"
+            "profilerDumpToFile( \"C:/Torque/log1.txt\" );\n"
+            "@endtsexample\n\n"
+            "@ingroup Debugging" )
 {
    if(gProfiler)
       gProfiler->dumpToFile(fileName);
@@ -762,9 +762,9 @@ DefineEngineFunction( profilerDumpToFile, void, ( const char* fileName ),,
 
 DefineEngineFunction( profilerReset, void, (),,
                 "@brief Resets the profiler, clearing it of all its data.\n\n"
-				"If the profiler is currently running, it will first be disabled. "
-				"All markers will retain their current enabled/disabled status.\n\n"
-				"@ingroup Debugging" )
+            "If the profiler is currently running, it will first be disabled. "
+            "All markers will retain their current enabled/disabled status.\n\n"
+            "@ingroup Debugging" )
 {
    if(gProfiler)
       gProfiler->reset();

+ 1 - 1
Engine/source/platformMac/macFileIO.mm

@@ -839,7 +839,7 @@ static bool recurseDumpDirectories(const char *basePath, const char *subPath, Ve
    
    while (d = readdir(dip))
    {
-      bool	isDir;
+      bool  isDir;
       isDir = false;
       if (d->d_type == DT_UNKNOWN)
       {

+ 1 - 1
Engine/source/renderInstance/renderPrePassMgr.cpp

@@ -843,7 +843,7 @@ void ProcessedPrePassMaterial::addStateBlockDesc(const GFXStateBlockDesc& desc)
    if ( isTranslucent )
    {
       prePassStateBlock.setBlend( true, GFXBlendSrcAlpha, GFXBlendInvSrcAlpha );
-	   prePassStateBlock.setColorWrites(false, false, false, true);
+      prePassStateBlock.setColorWrites(false, false, false, true);
    }
 
    // Enable z reads, but only enable zwrites if we're not translucent.

+ 3 - 3
Engine/source/scene/sceneContainer.cpp

@@ -892,7 +892,7 @@ bool SceneContainer::_castRay( U32 type, const Point3F& start, const Point3F& en
                   *info = ri;
                   info->point.interpolate(start, end, info->t);
                   currentT = ri.t;
-						info->distance = (start - info->point).len();
+                  info->distance = (start - info->point).len();
                }
             }
          }
@@ -991,7 +991,7 @@ bool SceneContainer::_castRay( U32 type, const Point3F& start, const Point3F& en
                            *info = ri;
                            info->point.interpolate(start, end, info->t);
                            currentT = ri.t;
-						         info->distance = (start - info->point).len();
+                           info->distance = (start - info->point).len();
                         }
                      }
                   }
@@ -1088,7 +1088,7 @@ bool SceneContainer::_castRay( U32 type, const Point3F& start, const Point3F& en
                                  *info = ri;
                                  info->point.interpolate(start, end, info->t);
                                  currentT = ri.t;
-								         info->distance = (start - info->point).len();
+                                 info->distance = (start - info->point).len();
                               }
                            }
                         }

+ 312 - 312
Engine/source/sim/actionMap.cpp

@@ -36,138 +36,138 @@
 IMPLEMENT_CONOBJECT(ActionMap);
 
 ConsoleDocClass( ActionMap,
-	"@brief ActionMaps assign platform input events to console commands.\n\n"
-
-	"Any platform input event can be bound in a single, generic way. In theory, the game doesn't need to know if the event came from the keyboard, mouse, joystick "
-	"or some other input device. This allows users of the game to map keys and actions according to their own preferences. "
-	"Game action maps are arranged in a stack for processing so individual parts of the game can define specific "
-	"actions. For example, when the player jumps into a vehicle it could push a vehicle action map and pop the default player action map.\n\n"
-
-	"@section ActionMap_creation Creating an ActionMap\n"
-
-	"The input system allows for the creation of multiple ActionMaps, so long as they have unique names and do not already exist. It's a simple "
-	"three step process.\n\n"
-	"1. Check to see if the ActionMap exists\n"
-	"2. Delete it if it exists\n"
-	"3. Instantiate the ActionMap\n\n"
-
-	"The following is an example of how to create a new ActionMap:\n"
-
-	"@tsexample\n"
-	"if ( isObject( moveMap ) )\n"
-	"	moveMap.delete();\n"
-	"new ActionMap(moveMap);"
-	"@endtsexample\n\n\n"
-	
-	"@section ActionMap_binding Binding Functions\n"
-	"Once you have created an ActionMap, you can start binding functionality to events. Currently, Torque 3D supports the following devices out of the box\n\n"
-	"* Mouse\n\n"
-	"* Keyboard\n\n"
-	"* Joystick/Gamepad\n\n"
-	"* Xbox 360 Controller\n\n"
-
-	"The two most commonly used binding methods are bind() and bindCmd(). Both are similar in that they will bind functionality to a device and event, "
+   "@brief ActionMaps assign platform input events to console commands.\n\n"
+
+   "Any platform input event can be bound in a single, generic way. In theory, the game doesn't need to know if the event came from the keyboard, mouse, joystick "
+   "or some other input device. This allows users of the game to map keys and actions according to their own preferences. "
+   "Game action maps are arranged in a stack for processing so individual parts of the game can define specific "
+   "actions. For example, when the player jumps into a vehicle it could push a vehicle action map and pop the default player action map.\n\n"
+
+   "@section ActionMap_creation Creating an ActionMap\n"
+
+   "The input system allows for the creation of multiple ActionMaps, so long as they have unique names and do not already exist. It's a simple "
+   "three step process.\n\n"
+   "1. Check to see if the ActionMap exists\n"
+   "2. Delete it if it exists\n"
+   "3. Instantiate the ActionMap\n\n"
+
+   "The following is an example of how to create a new ActionMap:\n"
+
+   "@tsexample\n"
+   "if ( isObject( moveMap ) )\n"
+   "  moveMap.delete();\n"
+   "new ActionMap(moveMap);"
+   "@endtsexample\n\n\n"
+   
+   "@section ActionMap_binding Binding Functions\n"
+   "Once you have created an ActionMap, you can start binding functionality to events. Currently, Torque 3D supports the following devices out of the box\n\n"
+   "* Mouse\n\n"
+   "* Keyboard\n\n"
+   "* Joystick/Gamepad\n\n"
+   "* Xbox 360 Controller\n\n"
+
+   "The two most commonly used binding methods are bind() and bindCmd(). Both are similar in that they will bind functionality to a device and event, "
    "but different in how the event is interpreted. With bind(), "
-	"you specify a device, action to bind, then a function to be called when the event happens.\n\n"
-
-	"@tsexample\n"
-	"// Simple function that prints to console\n"
-	"// %val - Sent by the device letting the user know\n"
-	"// if an input was pressed (true) or released (false)\n"
-	"function testInput(%val)\n"
-	"{\n"
-	"   if(%val)\n"
-	"	  echo(\"Key is down\");\n"
-	"   else\n"
-	"	  echo(\"Key was released\");\n"
-	"}\n\n"
-	"// Bind the \'K\' key to the testInput function\n"
-	"moveMap.bind(keyboard, \"k\", testInput);\n\n"
-	"@endtsexample\n\n\n"
-
-	"bindCmd is an alternative method for binding commands. This function is similar to bind(), "
+   "you specify a device, action to bind, then a function to be called when the event happens.\n\n"
+
+   "@tsexample\n"
+   "// Simple function that prints to console\n"
+   "// %val - Sent by the device letting the user know\n"
+   "// if an input was pressed (true) or released (false)\n"
+   "function testInput(%val)\n"
+   "{\n"
+   "   if(%val)\n"
+   "    echo(\"Key is down\");\n"
+   "   else\n"
+   "    echo(\"Key was released\");\n"
+   "}\n\n"
+   "// Bind the \'K\' key to the testInput function\n"
+   "moveMap.bind(keyboard, \"k\", testInput);\n\n"
+   "@endtsexample\n\n\n"
+
+   "bindCmd is an alternative method for binding commands. This function is similar to bind(), "
    "except two functions are set to be called when the event is processed.\n\n"
-	"One will be called when the event is activated (input down), while the other is activated when the event is broken (input release). "
+   "One will be called when the event is activated (input down), while the other is activated when the event is broken (input release). "
    "When using bindCmd(), pass the functions as strings rather than the function names.\n\n"
 
-	"@tsexample\n"
-	"// Print to the console when the spacebar is pressed\n"
-	"function onSpaceDown()\n"
-	"{\n"
-	"   echo(\"Space bar down!\");\n"
-	"}\n\n"
-
-	"// Print to the console when the spacebar is released\n"
-	"function onSpaceUp()\n"
-	"{\n"
-	"   echo(\"Space bar up!\");\n"
-	"}\n\n"
-
-	"// Bind the commands onSpaceDown and onSpaceUp to spacebar events\n"
-	"moveMap.bindCmd(keyboard, \"space\", \"onSpaceDown();\", \"onSpaceUp();\");\n"
-	"@endtsexample\n\n"
-	
-	"@section ActionMap_switching Switching ActionMaps\n"
-	"Let's say you want to have different ActionMaps activated based on game play situations. A classic example would be first person shooter controls and racing controls "
-	"in the same game. On foot, spacebar may cause your player to jump. In a vehicle, it may cause some kind of \"turbo charge\". You simply need to push/pop the ActionMaps appropriately:\n\n"
-
-	"First, create two separate ActionMaps:\n\n"
-	"@tsexample\n"
-	"// Create the two ActionMaps\n"
-	"if ( isObject( moveMap ) )\n"
-	"	moveMap.delete();\n"
-	"new ActionMap(moveMap);\n\n"
-	"if ( isObject( carMap ) )\n"
-	"	carMap.delete();\n"
-	"new ActionMap(carMap);\n\n"
-	"@endtsexample\n\n"
-
-	"Next, create the two separate functions. Both will be bound to spacebar, but not the same ActionMap:\n\n"
-	"@tsexample\n"
-	"// Print to the console the player is jumping\n"
-	"function playerJump(%val)\n"
-	"{\n"
-	"   if(%val)\n"
-	"	  echo(\"Player jumping!\");\n"
-	"}\n\n"
-	"// Print to the console the vehicle is charging\n"
-	"function turboCharge()\n"
-	"{\n"
-	"   if(%val)\n"
-	"	  echo(\"Vehicle turbo charging!\");\n"
-	"}\n"
-	"@endtsexample\n\n"
-	
-	"You are now ready to bind functions to your ActionMaps' devices:\n\n"
-
-	"@tsexample\n"
-	"// Bind the spacebar to the playerJump function\n"
-	"// when moveMap is the active ActionMap\n"
-	"moveMap.bind(keyboard, \"space\", playerJump);\n\n"
-	"// Bind the spacebar to the turboCharge function\n"
-	"// when carMap is the active ActionMap\n"
-	"carMap.bind(keyboard, \"space\", turboCharge);\n"
-	"@endtsexample\n"
-
-	"Finally, you can use the push() and pop() commands on each ActionMap to toggle activation. To activate an ActionMap, use push():\n\n"
-
-	"@tsexample\n"
-	"// Make moveMap the active action map\n"
-	"// You should now be able to activate playerJump with spacebar\n"
-	"moveMap.push();\n"
-	"@endtsexample\n\n"
-
-	"To switch ActionMaps, first pop() the old one. Then you can push() the new one:\n\n"
-
-	"@tsexample\n"
-	"// Deactivate moveMap\n"
-	"moveMap.pop();\n\n"
-	"// Activate carMap\n"
-	"carMap.push();\n\n"
-	"@endtsexample\n\n\n"
-
-	"@ingroup Input"
-	
+   "@tsexample\n"
+   "// Print to the console when the spacebar is pressed\n"
+   "function onSpaceDown()\n"
+   "{\n"
+   "   echo(\"Space bar down!\");\n"
+   "}\n\n"
+
+   "// Print to the console when the spacebar is released\n"
+   "function onSpaceUp()\n"
+   "{\n"
+   "   echo(\"Space bar up!\");\n"
+   "}\n\n"
+
+   "// Bind the commands onSpaceDown and onSpaceUp to spacebar events\n"
+   "moveMap.bindCmd(keyboard, \"space\", \"onSpaceDown();\", \"onSpaceUp();\");\n"
+   "@endtsexample\n\n"
+   
+   "@section ActionMap_switching Switching ActionMaps\n"
+   "Let's say you want to have different ActionMaps activated based on game play situations. A classic example would be first person shooter controls and racing controls "
+   "in the same game. On foot, spacebar may cause your player to jump. In a vehicle, it may cause some kind of \"turbo charge\". You simply need to push/pop the ActionMaps appropriately:\n\n"
+
+   "First, create two separate ActionMaps:\n\n"
+   "@tsexample\n"
+   "// Create the two ActionMaps\n"
+   "if ( isObject( moveMap ) )\n"
+   "  moveMap.delete();\n"
+   "new ActionMap(moveMap);\n\n"
+   "if ( isObject( carMap ) )\n"
+   "  carMap.delete();\n"
+   "new ActionMap(carMap);\n\n"
+   "@endtsexample\n\n"
+
+   "Next, create the two separate functions. Both will be bound to spacebar, but not the same ActionMap:\n\n"
+   "@tsexample\n"
+   "// Print to the console the player is jumping\n"
+   "function playerJump(%val)\n"
+   "{\n"
+   "   if(%val)\n"
+   "    echo(\"Player jumping!\");\n"
+   "}\n\n"
+   "// Print to the console the vehicle is charging\n"
+   "function turboCharge()\n"
+   "{\n"
+   "   if(%val)\n"
+   "    echo(\"Vehicle turbo charging!\");\n"
+   "}\n"
+   "@endtsexample\n\n"
+   
+   "You are now ready to bind functions to your ActionMaps' devices:\n\n"
+
+   "@tsexample\n"
+   "// Bind the spacebar to the playerJump function\n"
+   "// when moveMap is the active ActionMap\n"
+   "moveMap.bind(keyboard, \"space\", playerJump);\n\n"
+   "// Bind the spacebar to the turboCharge function\n"
+   "// when carMap is the active ActionMap\n"
+   "carMap.bind(keyboard, \"space\", turboCharge);\n"
+   "@endtsexample\n"
+
+   "Finally, you can use the push() and pop() commands on each ActionMap to toggle activation. To activate an ActionMap, use push():\n\n"
+
+   "@tsexample\n"
+   "// Make moveMap the active action map\n"
+   "// You should now be able to activate playerJump with spacebar\n"
+   "moveMap.push();\n"
+   "@endtsexample\n\n"
+
+   "To switch ActionMaps, first pop() the old one. Then you can push() the new one:\n\n"
+
+   "@tsexample\n"
+   "// Deactivate moveMap\n"
+   "moveMap.pop();\n\n"
+   "// Activate carMap\n"
+   "carMap.push();\n\n"
+   "@endtsexample\n\n\n"
+
+   "@ingroup Input"
+   
 );
 
 // This is used for determing keys that have ascii codes for the foreign keyboards. IsAlpha doesn't work on foreign keys.
@@ -775,32 +775,32 @@ const char* ActionMap::getBinding( const char* command )
 //
 const char* ActionMap::getCommand( const char* device, const char* action )
 {
-	U32 deviceType;
-	U32 deviceInst;
-	if ( getDeviceTypeAndInstance( device, deviceType, deviceInst ) )
-	{
-		EventDescriptor eventDescriptor;
-		if ( createEventDescriptor( action, &eventDescriptor ) )
-		{
-			const ActionMap::Node* mapNode = findNode( deviceType, deviceInst, eventDescriptor.flags, eventDescriptor.eventCode );
-			if ( mapNode )
-			{
-				if ( mapNode->flags & Node::BindCmd )
-				{
-					S32 bufferLen = dStrlen( mapNode->makeConsoleCommand ) + dStrlen( mapNode->breakConsoleCommand ) + 2;
-					char* returnString = Con::getReturnBuffer( bufferLen );
-					dSprintf( returnString, bufferLen, "%s\t%s",
-							( mapNode->makeConsoleCommand ? mapNode->makeConsoleCommand : "" ),
-							( mapNode->breakConsoleCommand ? mapNode->breakConsoleCommand : "" ) );					
-					return( returnString );
-				}					
-				else
-					return( mapNode->consoleFunction );					
-			}
-		}
-	}
-
-	return( "" );
+   U32 deviceType;
+   U32 deviceInst;
+   if ( getDeviceTypeAndInstance( device, deviceType, deviceInst ) )
+   {
+      EventDescriptor eventDescriptor;
+      if ( createEventDescriptor( action, &eventDescriptor ) )
+      {
+         const ActionMap::Node* mapNode = findNode( deviceType, deviceInst, eventDescriptor.flags, eventDescriptor.eventCode );
+         if ( mapNode )
+         {
+            if ( mapNode->flags & Node::BindCmd )
+            {
+               S32 bufferLen = dStrlen( mapNode->makeConsoleCommand ) + dStrlen( mapNode->breakConsoleCommand ) + 2;
+               char* returnString = Con::getReturnBuffer( bufferLen );
+               dSprintf( returnString, bufferLen, "%s\t%s",
+                     ( mapNode->makeConsoleCommand ? mapNode->makeConsoleCommand : "" ),
+                     ( mapNode->breakConsoleCommand ? mapNode->breakConsoleCommand : "" ) );             
+               return( returnString );
+            }              
+            else
+               return( mapNode->consoleFunction );             
+         }
+      }
+   }
+
+   return( "" );
 }
 
 //------------------------------------------------------------------------------
@@ -808,92 +808,92 @@ const char* ActionMap::getCommand( const char* device, const char* action )
 // Obviously, this should only be used for axes.
 bool ActionMap::isInverted( const char* device, const char* action )
 {
-	U32 deviceType;
-	U32 deviceInst;
-	if ( getDeviceTypeAndInstance( device, deviceType, deviceInst ) )
-	{
-		EventDescriptor eventDescriptor;
-		if ( createEventDescriptor( action, &eventDescriptor ) )
-		{
-			const ActionMap::Node* mapNode = findNode( deviceType, deviceInst, eventDescriptor.flags, eventDescriptor.eventCode );
-			if ( mapNode )
-				return( mapNode->flags & Node::Inverted );
-		}
-	}
-
-	Con::errorf( "The input event specified by %s %s is not in this action map!", device, action );
-	return( false );
+   U32 deviceType;
+   U32 deviceInst;
+   if ( getDeviceTypeAndInstance( device, deviceType, deviceInst ) )
+   {
+      EventDescriptor eventDescriptor;
+      if ( createEventDescriptor( action, &eventDescriptor ) )
+      {
+         const ActionMap::Node* mapNode = findNode( deviceType, deviceInst, eventDescriptor.flags, eventDescriptor.eventCode );
+         if ( mapNode )
+            return( mapNode->flags & Node::Inverted );
+      }
+   }
+
+   Con::errorf( "The input event specified by %s %s is not in this action map!", device, action );
+   return( false );
 }
 
 //------------------------------------------------------------------------------
 F32 ActionMap::getScale( const char* device, const char* action )
 {
-	U32 deviceType;
-	U32 deviceInst;
-	if ( getDeviceTypeAndInstance( device, deviceType, deviceInst ) )
-	{
-		EventDescriptor eventDescriptor;
-		if ( createEventDescriptor( action, &eventDescriptor ) )
-		{
-			const ActionMap::Node* mapNode = findNode( deviceType, deviceInst, eventDescriptor.flags, eventDescriptor.eventCode );
-			if ( mapNode )
-			{
-			   if ( mapNode->flags & Node::HasScale )
-				   return( mapNode->scaleFactor );
+   U32 deviceType;
+   U32 deviceInst;
+   if ( getDeviceTypeAndInstance( device, deviceType, deviceInst ) )
+   {
+      EventDescriptor eventDescriptor;
+      if ( createEventDescriptor( action, &eventDescriptor ) )
+      {
+         const ActionMap::Node* mapNode = findNode( deviceType, deviceInst, eventDescriptor.flags, eventDescriptor.eventCode );
+         if ( mapNode )
+         {
+            if ( mapNode->flags & Node::HasScale )
+               return( mapNode->scaleFactor );
             else
                return( 1.0f );
          }
-		}
-	}
+      }
+   }
 
-	Con::errorf( "The input event specified by %s %s is not in this action map!", device, action );
-	return( 1.0f );
+   Con::errorf( "The input event specified by %s %s is not in this action map!", device, action );
+   return( 1.0f );
 }
 
 //------------------------------------------------------------------------------
 const char* ActionMap::getDeadZone( const char* device, const char* action )
 {
-	U32 deviceType;
-	U32 deviceInst;
-	if ( getDeviceTypeAndInstance( device, deviceType, deviceInst ) )
-	{
-		EventDescriptor eventDescriptor;
-		if ( createEventDescriptor( action, &eventDescriptor ) )
-		{
-			const ActionMap::Node* mapNode = findNode( deviceType, deviceInst, eventDescriptor.flags, eventDescriptor.eventCode );
-			if ( mapNode )
-			{
-			   if ( mapNode->flags & Node::HasDeadZone )
+   U32 deviceType;
+   U32 deviceInst;
+   if ( getDeviceTypeAndInstance( device, deviceType, deviceInst ) )
+   {
+      EventDescriptor eventDescriptor;
+      if ( createEventDescriptor( action, &eventDescriptor ) )
+      {
+         const ActionMap::Node* mapNode = findNode( deviceType, deviceInst, eventDescriptor.flags, eventDescriptor.eventCode );
+         if ( mapNode )
+         {
+            if ( mapNode->flags & Node::HasDeadZone )
             {
-				   char buf[64];
-				   dSprintf( buf, sizeof( buf ), "%g %g", mapNode->deadZoneBegin, mapNode->deadZoneEnd );
-				   char* returnString = Con::getReturnBuffer( dStrlen( buf ) + 1 );
-				   dStrcpy( returnString, buf );
-				   return( returnString );
-				}
-				else
-				   return( "0 0" );				   		
-			}
-		}
-	}
-
-	Con::errorf( "The input event specified by %s %s is not in this action map!", device, action );
-	return( "" );
+               char buf[64];
+               dSprintf( buf, sizeof( buf ), "%g %g", mapNode->deadZoneBegin, mapNode->deadZoneEnd );
+               char* returnString = Con::getReturnBuffer( dStrlen( buf ) + 1 );
+               dStrcpy( returnString, buf );
+               return( returnString );
+            }
+            else
+               return( "0 0" );                    
+         }
+      }
+   }
+
+   Con::errorf( "The input event specified by %s %s is not in this action map!", device, action );
+   return( "" );
 }
 
 //------------------------------------------------------------------------------
 const char* ActionMap::buildActionString( const InputEventInfo* event )
 {
-	const char* modifierString = getModifierString( event->modifier );
+   const char* modifierString = getModifierString( event->modifier );
 
-	char objectBuffer[64];
-	if ( !getKeyString( event->objInst, objectBuffer ) )
-		return( "" );
+   char objectBuffer[64];
+   if ( !getKeyString( event->objInst, objectBuffer ) )
+      return( "" );
 
-	U32 returnLen = dStrlen( modifierString ) + dStrlen( objectBuffer ) + 2;	
-	char* returnString = Con::getReturnBuffer( returnLen );
-	dSprintf( returnString, returnLen - 1, "%s%s", modifierString, objectBuffer );
-	return( returnString );
+   U32 returnLen = dStrlen( modifierString ) + dStrlen( objectBuffer ) + 2;   
+   char* returnString = Con::getReturnBuffer( returnLen );
+   dSprintf( returnString, returnLen - 1, "%s%s", modifierString, objectBuffer );
+   return( returnString );
 }
 
 //------------------------------------------------------------------------------
@@ -989,15 +989,15 @@ bool ActionMap::getDeviceName(const U32 deviceType, const U32 deviceInstance, ch
 //------------------------------------------------------------------------------
 const char* ActionMap::getModifierString(const U32 modifiers)
 {
-	U32 realModifiers = modifiers;
-	if ( modifiers & SI_LSHIFT || modifiers & SI_RSHIFT )
-		realModifiers |= SI_SHIFT;
-	if ( modifiers & SI_LCTRL || modifiers & SI_RCTRL )
-		realModifiers |= SI_CTRL;
-	if ( modifiers & SI_LALT || modifiers & SI_RALT )
-		realModifiers |= SI_ALT;
-	if ( modifiers & SI_MAC_LOPT || modifiers & SI_MAC_ROPT )
-		realModifiers |= SI_MAC_OPT;
+   U32 realModifiers = modifiers;
+   if ( modifiers & SI_LSHIFT || modifiers & SI_RSHIFT )
+      realModifiers |= SI_SHIFT;
+   if ( modifiers & SI_LCTRL || modifiers & SI_RCTRL )
+      realModifiers |= SI_CTRL;
+   if ( modifiers & SI_LALT || modifiers & SI_RALT )
+      realModifiers |= SI_ALT;
+   if ( modifiers & SI_MAC_LOPT || modifiers & SI_MAC_ROPT )
+      realModifiers |= SI_MAC_OPT;
 
    switch (realModifiers & (SI_SHIFT|SI_CTRL|SI_ALT|SI_MAC_OPT)) 
    {
@@ -1820,19 +1820,19 @@ static ConsoleDocFragment _ActionMapbind1(
    "@param command The function to bind to the action. Function must have a single boolean argument.\n"
    "@return True if the binding was successful, false if the device was unknown or description failed.\n\n"
    "@tsexample\n"
-	"// Simple function that prints to console\n"
-	"// %val - Sent by the device letting the user know\n"
-	"// if an input was pressed (true) or released (false)\n"
-	"function testInput(%val)\n"
-	"{\n"
-	"   if(%val)\n"
-	"	  echo(\"Key is down\");\n"
-	"   else\n"
-	"	  echo(\"Key was released\");\n"
-	"}\n\n"
-	"// Bind the \'K\' key to the testInput function\n"
-	"moveMap.bind(keyboard, k, testInput);\n\n"
-	"@endtsexample\n\n\n",
+   "// Simple function that prints to console\n"
+   "// %val - Sent by the device letting the user know\n"
+   "// if an input was pressed (true) or released (false)\n"
+   "function testInput(%val)\n"
+   "{\n"
+   "   if(%val)\n"
+   "    echo(\"Key is down\");\n"
+   "   else\n"
+   "    echo(\"Key was released\");\n"
+   "}\n\n"
+   "// Bind the \'K\' key to the testInput function\n"
+   "moveMap.bind(keyboard, k, testInput);\n\n"
+   "@endtsexample\n\n\n",
    "ActionMap",
    "bool bind( string device, string action, string command );");
 
@@ -1854,22 +1854,22 @@ static ConsoleDocFragment _ActionMapbind2(
    "@param command The function bound to the action. Must take in a single argument.\n"
    "@return True if the binding was successful, false if the device was unknown or description failed.\n\n"
    "@tsexample\n"
-	"// Simple function that adjusts the pitch of the camera based on the "
+   "// Simple function that adjusts the pitch of the camera based on the "
    "mouse's movement along the X axis.\n"
-	"function testPitch(%val)\n"
-	"{\n"
-	"   %pitchAdj = getMouseAdjustAmount(%val);\n"
-	"	 $mvPitch += %pitchAdj;\n"
-	"}\n\n"
-	"// Bind the mouse's X axis to the testPitch function\n"
-	"// DI is flagged, meaning input is inverted and has a deadzone\n"
-	"%this.bind( mouse, \"xaxis\", \"DI\", \"-0.23 0.23\", testPitch );\n"
-	"@endtsexample\n\n\n",
+   "function testPitch(%val)\n"
+   "{\n"
+   "   %pitchAdj = getMouseAdjustAmount(%val);\n"
+   "   $mvPitch += %pitchAdj;\n"
+   "}\n\n"
+   "// Bind the mouse's X axis to the testPitch function\n"
+   "// DI is flagged, meaning input is inverted and has a deadzone\n"
+   "%this.bind( mouse, \"xaxis\", \"DI\", \"-0.23 0.23\", testPitch );\n"
+   "@endtsexample\n\n\n",
    "ActionMap",
    "bool bind( string device, string action, string flag, string deadZone, string scale, string command );");
 
 ConsoleMethod( ActionMap, bind, bool, 5, 10, "actionMap.bind( device, action, [modifier spec, mod...], command )" 
-			  "@hide")
+           "@hide")
 {
    StringStackWrapper args(argc - 2, argv + 2);
    return object->processBind( args.count(), args, NULL );
@@ -1918,7 +1918,7 @@ static ConsoleDocFragment _ActionMapbindObj2(
    "bool bindObj( string device, string action, string flag, string deadZone, string scale, string command, SimObjectID object );");
 
 ConsoleMethod( ActionMap, bindObj, bool, 6, 11, "(device, action, [modifier spec, mod...], command, object)"
-			  "@hide")
+           "@hide")
 {
    SimObject* simObject = Sim::findObject(argv[argc - 1]);
    if ( simObject == NULL )
@@ -1941,20 +1941,20 @@ DefineEngineMethod( ActionMap, bindCmd, bool, ( const char* device, const char*
     "@param makeCmd The command to execute when the device/action is made.\n"
     "@param breakCmd [optional] The command to execute when the device or action is unmade.\n"
     "@return True the bind was successful, false if the device was unknown or description failed.\n"
-	"@tsexample\n"
-	"// Print to the console when the spacebar is pressed\n"
-	"function onSpaceDown()\n"
-	"{\n"
-	"   echo(\"Space bar down!\");\n"
-	"}\n\n"
-	"// Print to the console when the spacebar is released\n"
-	"function onSpaceUp()\n"
-	"{\n"
-	"   echo(\"Space bar up!\");\n"
-	"}\n\n"
+   "@tsexample\n"
+   "// Print to the console when the spacebar is pressed\n"
+   "function onSpaceDown()\n"
+   "{\n"
+   "   echo(\"Space bar down!\");\n"
+   "}\n\n"
+   "// Print to the console when the spacebar is released\n"
+   "function onSpaceUp()\n"
+   "{\n"
+   "   echo(\"Space bar up!\");\n"
+   "}\n\n"
    "// Bind the commands onSpaceDown() and onSpaceUp() to spacebar events\n\n"
-	"moveMap.bindCmd(keyboard, \"space\", \"onSpaceDown();\", \"onSpaceUp();\");\n"
-	"@endtsexample\n\n")
+   "moveMap.bindCmd(keyboard, \"space\", \"onSpaceDown();\", \"onSpaceUp();\");\n"
+   "@endtsexample\n\n")
 {
    return object->processBindCmd( device, action, makeCmd, breakCmd );
 }
@@ -1964,9 +1964,9 @@ DefineEngineMethod( ActionMap, unbind, bool, ( const char* device, const char* a
    "@param device The device to unbind from. Can be a keyboard, mouse, joystick or a gamepad.\n"
    "@param action The device action to unbind from. The action is dependant upon the device. Specify a key for keyboards.\n"
    "@return True if the unbind was successful, false if the device was unknown or description failed.\n\n"
-	"@tsexample\n"
-	"moveMap.unbind(\"keyboard\", \"space\");\n"
-	"@endtsexample\n\n")
+   "@tsexample\n"
+   "moveMap.unbind(\"keyboard\", \"space\");\n"
+   "@endtsexample\n\n")
 {
    return object->processUnbind( device, action );
 }
@@ -1977,7 +1977,7 @@ DefineEngineMethod( ActionMap, unbindObj, bool, ( const char* device, const char
    "@param action The device action to unbind from. The action is dependant upon the device. Specify a key for keyboards.\n"
    "@param obj The object to perform unbind against.\n"
    "@return True if the unbind was successful, false if the device was unknown or description failed.\n"
-	"@tsexample\n"
+   "@tsexample\n"
    "moveMap.unbindObj(\"keyboard\", \"numpad1\", \"rangeChange\", %player);"
    "@endtsexample\n\n\n")
 {
@@ -1996,10 +1996,10 @@ DefineEngineMethod( ActionMap, save, void, ( const char* fileName, bool append )
    "@param fileName The file path to save the ActionMap to. If a filename is not specified "
    " the ActionMap will be dumped to the console.\n"
    "@param append Whether to write the ActionMap at the end of the file or overwrite it.\n"
-	"@tsexample\n"
-	"// Write out the actionmap into the config.cs file\n"
+   "@tsexample\n"
+   "// Write out the actionmap into the config.cs file\n"
    "moveMap.save( \"scripts/client/config.cs\" );"
-	"@endtsexample\n\n")
+   "@endtsexample\n\n")
 {
    char buffer[1024];
 
@@ -2015,7 +2015,7 @@ DefineEngineMethod( ActionMap, save, void, ( const char* fileName, bool append )
 DefineEngineFunction( getCurrentActionMap, ActionMap*, (),,
    "@brief Returns the current %ActionMap.\n"
    "@see ActionMap"
-	"@ingroup Input")
+   "@ingroup Input")
 {
    SimSet* pActionMapSet = Sim::getActiveActionMapSet();
    return dynamic_cast< ActionMap* >( pActionMapSet->last() );
@@ -2024,10 +2024,10 @@ DefineEngineFunction( getCurrentActionMap, ActionMap*, (),,
 DefineEngineMethod( ActionMap, push, void, (),,
    "@brief Push the ActionMap onto the %ActionMap stack.\n\n"
    "Activates an ActionMap and placees it at the top of the ActionMap stack.\n\n"
-	"@tsexample\n"
-	"// Make moveMap the active action map\n"
-	"moveMap.push();\n"
-	"@endtsexample\n\n"
+   "@tsexample\n"
+   "// Make moveMap the active action map\n"
+   "moveMap.push();\n"
+   "@endtsexample\n\n"
    "@see ActionMap")
 {
    SimSet* pActionMapSet = Sim::getActiveActionMapSet();
@@ -2037,10 +2037,10 @@ DefineEngineMethod( ActionMap, push, void, (),,
 DefineEngineMethod( ActionMap, pop, void, (),,
    "@brief Pop the ActionMap off the %ActionMap stack.\n\n"
    "Deactivates an %ActionMap and removes it from the @ActionMap stack.\n"
-	"@tsexample\n"
-	"// Deactivate moveMap\n"
-	"moveMap.pop();\n"
-	"@endtsexample\n\n"
+   "@tsexample\n"
+   "// Deactivate moveMap\n"
+   "moveMap.pop();\n"
+   "@endtsexample\n\n"
    "@see ActionMap")
 {
    SimSet* pActionMapSet = Sim::getActiveActionMapSet();
@@ -2053,20 +2053,20 @@ DefineEngineMethod( ActionMap, getBinding, const char*, ( const char* command ),
    "@param command The function to search bindings for.\n"
    "@return The binding against the specified command. Returns an empty string(\"\") "
    "if a binding wasn't found.\n"
-	"@tsexample\n"
-	"// Find what the function \"jump()\" is bound to in moveMap\n"
-	"%bind = moveMap.getBinding( \"jump\" );\n\n"
-	"if ( %bind !$= \"\" )\n"
-	"{\n"
-	"// Find out what device is used in the binding\n"
-	"	%device = getField( %bind, 0 );\n\n"
-	"// Find out what action (such as a key) is used in the binding\n"
-	"	%action = getField( %bind, 1 );\n"
-	"}\n"
-	"@endtsexample\n\n"
+   "@tsexample\n"
+   "// Find what the function \"jump()\" is bound to in moveMap\n"
+   "%bind = moveMap.getBinding( \"jump\" );\n\n"
+   "if ( %bind !$= \"\" )\n"
+   "{\n"
+   "// Find out what device is used in the binding\n"
+   "  %device = getField( %bind, 0 );\n\n"
+   "// Find out what action (such as a key) is used in the binding\n"
+   "  %action = getField( %bind, 1 );\n"
+   "}\n"
+   "@endtsexample\n\n"
    "@see getField")
 {
-	return object->getBinding( command );	
+   return object->getBinding( command );  
 }
 
 DefineEngineMethod( ActionMap, getCommand, const char*, ( const char* device, const char* action ),,
@@ -2074,15 +2074,15 @@ DefineEngineMethod( ActionMap, getCommand, const char*, ( const char* device, co
    "@param device The device that was bound. Can be a keyboard, mouse, joystick or a gamepad.\n"
    "@param action The device action that was bound.  The action is dependant upon the device. Specify a key for keyboards.\n"
    "@return The command against the specified device and action.\n"
-	"@tsexample\n"
-	"// Find what function is bound to a device\'s action\n"
-	"// In this example, \"jump()\" was assigned to the space key in another script\n"
-	"%command = moveMap.getCommand(\"keyboard\", \"space\");\n\n"
-	"// Should print \"jump\" in the console\n"
-	"echo(%command)\n"
-	"@endtsexample\n\n")
+   "@tsexample\n"
+   "// Find what function is bound to a device\'s action\n"
+   "// In this example, \"jump()\" was assigned to the space key in another script\n"
+   "%command = moveMap.getCommand(\"keyboard\", \"space\");\n\n"
+   "// Should print \"jump\" in the console\n"
+   "echo(%command)\n"
+   "@endtsexample\n\n")
 {
-	return object->getCommand( device, action );	
+   return object->getCommand( device, action ); 
 }
 
 DefineEngineMethod( ActionMap, isInverted, bool, ( const char* device, const char* action ),,
@@ -2091,12 +2091,12 @@ DefineEngineMethod( ActionMap, isInverted, bool, ( const char* device, const cha
    "@param device The device that was bound. Can be a keyboard, mouse, joystick or a gamepad.\n"
    "@param action The device action that was bound.  The action is dependant upon the device. Specify a key for keyboards.\n"
    "@return True if the specified device and action is inverted.\n"
-	"@tsexample\n"
+   "@tsexample\n"
    "%if ( moveMap.isInverted( \"mouse\", \"xaxis\"))\n"
    "   echo(\"Mouse's xAxis is inverted\");"
-	"@endtsexample\n\n")
+   "@endtsexample\n\n")
 {
-	return object->isInverted( device, action );	
+   return object->isInverted( device, action ); 
 }
 
 DefineEngineMethod( ActionMap, getScale, F32, ( const char* device, const char* action ),,
@@ -2104,11 +2104,11 @@ DefineEngineMethod( ActionMap, getScale, F32, ( const char* device, const char*
    "@param device The device that was bound. Can be keyboard, mouse, joystick or gamepad.\n"
    "@param action The device action that was bound. The action is dependant upon the device. Specify a key for keyboards.\n"
    "@return Any scaling applied to the specified device and action.\n"
-	"@tsexample\n"
-	"%scale = %moveMap.getScale( \"gamepad\", \"thumbrx\");\n"
-	"@endtsexample\n\n")
+   "@tsexample\n"
+   "%scale = %moveMap.getScale( \"gamepad\", \"thumbrx\");\n"
+   "@endtsexample\n\n")
 {
-	return object->getScale( device, action );	
+   return object->getScale( device, action );   
 }
 
 DefineEngineMethod( ActionMap, getDeadZone, const char*, ( const char* device, const char* action ),,
@@ -2117,11 +2117,11 @@ DefineEngineMethod( ActionMap, getDeadZone, const char*, ( const char* device, c
    "@param action The device action that was bound. The action is dependant upon the device. Specify a key for keyboards.\n"
    "@return The dead zone for the specified device and action. Returns \"0 0\" if there is no dead zone " 
    "or an empty string(\"\") if the mapping was not found.\n"
-	"@tsexample\n"
-	"%deadZone = moveMap.getDeadZone( \"gamepad\", \"thumbrx\");\n"
-	"@endtsexample\n\n")
+   "@tsexample\n"
+   "%deadZone = moveMap.getDeadZone( \"gamepad\", \"thumbrx\");\n"
+   "@endtsexample\n\n")
 {
-	return object->getDeadZone( device, action );	
+   return object->getDeadZone( device, action );   
 }
 
 //------------------------------------------------------------------------------