Replaced a ton of ConsoleMethods with the DefineConsoleMethod Macro.

This commit is contained in:
Vincent Gee 2014-11-03 22:42:51 -05:00
parent 378a933894
commit acb192e2a5
133 changed files with 1716 additions and 2087 deletions

View file

@ -25,6 +25,7 @@
#include "core/frameAllocator.h"
#include "core/strings/stringUnit.h"
#include "console/consoleTypes.h"
#include "console/engineAPI.h"
IMPLEMENT_CONOBJECT(GuiFileTreeCtrl);
@ -378,18 +379,19 @@ void GuiFileTreeCtrl::recurseInsert( Item* parent, StringTableEntry path )
}
ConsoleMethod( GuiFileTreeCtrl, getSelectedPath, const char*, 2, 2, "getSelectedPath() - returns the currently selected path in the tree")
//ConsoleMethod( GuiFileTreeCtrl, getSelectedPath, const char*, 2, 2, "getSelectedPath() - returns the currently selected path in the tree")
DefineConsoleMethod( GuiFileTreeCtrl, getSelectedPath, const char*, (), , "getSelectedPath() - returns the currently selected path in the tree")
{
const String& path = object->getSelectedPath();
return Con::getStringArg( path );
}
ConsoleMethod( GuiFileTreeCtrl, setSelectedPath, bool, 3, 3, "setSelectedPath(path) - expands the tree to the specified path")
DefineConsoleMethod( GuiFileTreeCtrl, setSelectedPath, bool, (const char * path), , "setSelectedPath(path) - expands the tree to the specified path")
{
return object->setSelectedPath( argv[ 2 ] );
return object->setSelectedPath( path );
}
ConsoleMethod( GuiFileTreeCtrl, reload, void, 2, 2, "() - Reread the directory tree hierarchy." )
DefineConsoleMethod( GuiFileTreeCtrl, reload, void, (), , "() - Reread the directory tree hierarchy." )
{
object->updateTree();
}