mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
Replaced a ton of ConsoleMethods with the DefineConsoleMethod Macro.
This commit is contained in:
parent
378a933894
commit
acb192e2a5
133 changed files with 1716 additions and 2087 deletions
|
|
@ -25,6 +25,7 @@
|
|||
|
||||
#include "core/stringTable.h"
|
||||
#include "console/console.h"
|
||||
#include "console/engineAPI.h"
|
||||
#include "core/stream/fileStream.h"
|
||||
#include "sim/actionMap.h"
|
||||
#include "core/fileObject.h"
|
||||
|
|
@ -950,7 +951,7 @@ DefineEngineMethod( SimSet, clear, void, (),,
|
|||
//-----------------------------------------------------------------------------
|
||||
|
||||
//UNSAFE; don't want this in the new API
|
||||
ConsoleMethod( SimSet, deleteAllObjects, void, 2, 2, "() Delete all objects in the set." )
|
||||
DefineConsoleMethod( SimSet, deleteAllObjects, void, (), , "() Delete all objects in the set." )
|
||||
{
|
||||
object->deleteAllObjects();
|
||||
}
|
||||
|
|
@ -1022,7 +1023,7 @@ DEFINE_CALLIN( fnSimSet_getCountRecursive, getCountRecursive, SimSet, U32, ( Sim
|
|||
return set->sizeRecursive();
|
||||
}
|
||||
|
||||
ConsoleMethod( SimSet, getFullCount, S32, 2, 2, "() Get the number of direct and indirect child objects contained in the set.\n"
|
||||
DefineConsoleMethod( SimSet, getFullCount, S32, (), , "() Get the number of direct and indirect child objects contained in the set.\n"
|
||||
"@return The number of objects contained in the set as well as in other sets contained directly or indirectly in the set." )
|
||||
{
|
||||
return object->sizeRecursive();
|
||||
|
|
@ -1118,10 +1119,10 @@ DefineEngineMethod( SimSet, pushToBack, void, ( SimObject* obj ),,
|
|||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
ConsoleMethod( SimSet, sort, void, 3, 3, "( string callbackFunction ) Sort the objects in the set using the given comparison function.\n"
|
||||
DefineConsoleMethod( SimSet, sort, void, ( const char * callbackFunction ), , "( string callbackFunction ) Sort the objects in the set using the given comparison function.\n"
|
||||
"@param callbackFunction Name of a function that takes two object arguments A and B and returns -1 if A is less, 1 if B is less, and 0 if both are equal." )
|
||||
{
|
||||
object->scriptSort( (const char*)argv[2] );
|
||||
object->scriptSort( callbackFunction );
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue