Eliminate DefineConsoleMethod

This commit is contained in:
Lukas Joergensen 2018-04-17 21:01:50 +02:00
parent 5bde18143f
commit 3c99ef73a9
77 changed files with 483 additions and 483 deletions

View file

@ -66,13 +66,13 @@ DbgFileView::DbgFileView()
mSize.set(1, 0);
}
DefineConsoleMethod(DbgFileView, setCurrentLine, void, (S32 line, bool selected), , "(int line, bool selected)"
DefineEngineMethod(DbgFileView, setCurrentLine, void, (S32 line, bool selected), , "(int line, bool selected)"
"Set the current highlighted line.")
{
object->setCurrentLine(line, selected);
}
DefineConsoleMethod(DbgFileView, getCurrentLine, const char *, (), , "()"
DefineEngineMethod(DbgFileView, getCurrentLine, const char *, (), , "()"
"Get the currently executing file and line, if any.\n\n"
"@returns A string containing the file, a tab, and then the line number."
" Use getField() with this.")
@ -84,38 +84,38 @@ DefineConsoleMethod(DbgFileView, getCurrentLine, const char *, (), , "()"
return ret;
}
DefineConsoleMethod(DbgFileView, open, bool, (const char * filename), , "(string filename)"
DefineEngineMethod(DbgFileView, open, bool, (const char * filename), , "(string filename)"
"Open a file for viewing.\n\n"
"@note This loads the file from the local system.")
{
return object->openFile(filename);
}
DefineConsoleMethod(DbgFileView, clearBreakPositions, void, (), , "()"
DefineEngineMethod(DbgFileView, clearBreakPositions, void, (), , "()"
"Clear all break points in the current file.")
{
object->clearBreakPositions();
}
DefineConsoleMethod(DbgFileView, setBreakPosition, void, (U32 line), , "(int line)"
DefineEngineMethod(DbgFileView, setBreakPosition, void, (U32 line), , "(int line)"
"Set a breakpoint at the specified line.")
{
object->setBreakPosition(line);
}
DefineConsoleMethod(DbgFileView, setBreak, void, (U32 line), , "(int line)"
DefineEngineMethod(DbgFileView, setBreak, void, (U32 line), , "(int line)"
"Set a breakpoint at the specified line.")
{
object->setBreakPointStatus(line, true);
}
DefineConsoleMethod(DbgFileView, removeBreak, void, (U32 line), , "(int line)"
DefineEngineMethod(DbgFileView, removeBreak, void, (U32 line), , "(int line)"
"Remove a breakpoint from the specified line.")
{
object->setBreakPointStatus(line, false);
}
DefineConsoleMethod(DbgFileView, findString, bool, (const char * findThis), , "(string findThis)"
DefineEngineMethod(DbgFileView, findString, bool, (const char * findThis), , "(string findThis)"
"Find the specified string in the currently viewed file and "
"scroll it into view.")
{

View file

@ -2468,7 +2468,7 @@ void GuiEditCtrl::startMouseGuideDrag( guideAxis axis, U32 guideIndex, bool lock
//-----------------------------------------------------------------------------
DefineConsoleMethod( GuiEditCtrl, getContentControl, S32, (), , "() - Return the toplevel control edited inside the GUI editor." )
DefineEngineMethod( GuiEditCtrl, getContentControl, S32, (), , "() - Return the toplevel control edited inside the GUI editor." )
{
GuiControl* ctrl = object->getContentControl();
if( ctrl )
@ -2479,7 +2479,7 @@ DefineConsoleMethod( GuiEditCtrl, getContentControl, S32, (), , "() - Return the
//-----------------------------------------------------------------------------
DefineConsoleMethod( GuiEditCtrl, setContentControl, void, (GuiControl *ctrl ), , "( GuiControl ctrl ) - Set the toplevel control to edit in the GUI editor." )
DefineEngineMethod( GuiEditCtrl, setContentControl, void, (GuiControl *ctrl ), , "( GuiControl ctrl ) - Set the toplevel control to edit in the GUI editor." )
{
if (ctrl)
object->setContentControl(ctrl);
@ -2487,7 +2487,7 @@ DefineConsoleMethod( GuiEditCtrl, setContentControl, void, (GuiControl *ctrl ),
//-----------------------------------------------------------------------------
DefineConsoleMethod( GuiEditCtrl, addNewCtrl, void, (GuiControl *ctrl), , "(GuiControl ctrl)")
DefineEngineMethod( GuiEditCtrl, addNewCtrl, void, (GuiControl *ctrl), , "(GuiControl ctrl)")
{
if (ctrl)
object->addNewControl(ctrl);
@ -2495,28 +2495,28 @@ DefineConsoleMethod( GuiEditCtrl, addNewCtrl, void, (GuiControl *ctrl), , "(GuiC
//-----------------------------------------------------------------------------
DefineConsoleMethod( GuiEditCtrl, addSelection, void, (S32 id), , "selects a control.")
DefineEngineMethod( GuiEditCtrl, addSelection, void, (S32 id), , "selects a control.")
{
object->addSelection(id);
}
//-----------------------------------------------------------------------------
DefineConsoleMethod( GuiEditCtrl, removeSelection, void, (S32 id), , "deselects a control.")
DefineEngineMethod( GuiEditCtrl, removeSelection, void, (S32 id), , "deselects a control.")
{
object->removeSelection(id);
}
//-----------------------------------------------------------------------------
DefineConsoleMethod( GuiEditCtrl, clearSelection, void, (), , "Clear selected controls list.")
DefineEngineMethod( GuiEditCtrl, clearSelection, void, (), , "Clear selected controls list.")
{
object->clearSelection();
}
//-----------------------------------------------------------------------------
DefineConsoleMethod( GuiEditCtrl, select, void, (GuiControl *ctrl), , "(GuiControl ctrl)")
DefineEngineMethod( GuiEditCtrl, select, void, (GuiControl *ctrl), , "(GuiControl ctrl)")
{
if (ctrl)
object->setSelection(ctrl, false);
@ -2524,7 +2524,7 @@ DefineConsoleMethod( GuiEditCtrl, select, void, (GuiControl *ctrl), , "(GuiContr
//-----------------------------------------------------------------------------
DefineConsoleMethod( GuiEditCtrl, setCurrentAddSet, void, (GuiControl *addSet), , "(GuiControl ctrl)")
DefineEngineMethod( GuiEditCtrl, setCurrentAddSet, void, (GuiControl *addSet), , "(GuiControl ctrl)")
{
if (addSet)
object->setCurrentAddSet(addSet);
@ -2532,7 +2532,7 @@ DefineConsoleMethod( GuiEditCtrl, setCurrentAddSet, void, (GuiControl *addSet),
//-----------------------------------------------------------------------------
DefineConsoleMethod( GuiEditCtrl, getCurrentAddSet, S32, (), , "Returns the set to which new controls will be added")
DefineEngineMethod( GuiEditCtrl, getCurrentAddSet, S32, (), , "Returns the set to which new controls will be added")
{
const GuiControl* add = object->getCurrentAddSet();
return add ? add->getId() : 0;
@ -2540,49 +2540,49 @@ DefineConsoleMethod( GuiEditCtrl, getCurrentAddSet, S32, (), , "Returns the set
//-----------------------------------------------------------------------------
DefineConsoleMethod( GuiEditCtrl, toggle, void, (), , "Toggle activation.")
DefineEngineMethod( GuiEditCtrl, toggle, void, (), , "Toggle activation.")
{
object->setEditMode( !object->isActive() );
}
//-----------------------------------------------------------------------------
DefineConsoleMethod( GuiEditCtrl, justify, void, (U32 mode), , "(int mode)" )
DefineEngineMethod( GuiEditCtrl, justify, void, (U32 mode), , "(int mode)" )
{
object->justifySelection( (GuiEditCtrl::Justification)mode );
}
//-----------------------------------------------------------------------------
DefineConsoleMethod( GuiEditCtrl, bringToFront, void, (), , "")
DefineEngineMethod( GuiEditCtrl, bringToFront, void, (), , "")
{
object->bringToFront();
}
//-----------------------------------------------------------------------------
DefineConsoleMethod( GuiEditCtrl, pushToBack, void, (), , "")
DefineEngineMethod( GuiEditCtrl, pushToBack, void, (), , "")
{
object->pushToBack();
}
//-----------------------------------------------------------------------------
DefineConsoleMethod( GuiEditCtrl, deleteSelection, void, (), , "() - Delete the selected controls.")
DefineEngineMethod( GuiEditCtrl, deleteSelection, void, (), , "() - Delete the selected controls.")
{
object->deleteSelection();
}
//-----------------------------------------------------------------------------
DefineConsoleMethod( GuiEditCtrl, moveSelection, void, (S32 dx, S32 dy), , "Move all controls in the selection by (dx,dy) pixels.")
DefineEngineMethod( GuiEditCtrl, moveSelection, void, (S32 dx, S32 dy), , "Move all controls in the selection by (dx,dy) pixels.")
{
object->moveAndSnapSelection(Point2I(dx, dy));
}
//-----------------------------------------------------------------------------
DefineConsoleMethod( GuiEditCtrl, saveSelection, void, (const char * filename), (nullAsType<const char*>()), "( string fileName=null ) - Save selection to file or clipboard.")
DefineEngineMethod( GuiEditCtrl, saveSelection, void, (const char * filename), (nullAsType<const char*>()), "( string fileName=null ) - Save selection to file or clipboard.")
{
object->saveSelection( filename );
@ -2590,7 +2590,7 @@ DefineConsoleMethod( GuiEditCtrl, saveSelection, void, (const char * filename),
//-----------------------------------------------------------------------------
DefineConsoleMethod( GuiEditCtrl, loadSelection, void, (const char * filename), (nullAsType<const char*>()), "( string fileName=null ) - Load selection from file or clipboard.")
DefineEngineMethod( GuiEditCtrl, loadSelection, void, (const char * filename), (nullAsType<const char*>()), "( string fileName=null ) - Load selection from file or clipboard.")
{
object->loadSelection( filename );
@ -2598,7 +2598,7 @@ DefineConsoleMethod( GuiEditCtrl, loadSelection, void, (const char * filename),
//-----------------------------------------------------------------------------
DefineConsoleMethod( GuiEditCtrl, selectAll, void, (), , "()")
DefineEngineMethod( GuiEditCtrl, selectAll, void, (), , "()")
{
object->selectAll();
}
@ -2613,14 +2613,14 @@ DefineEngineMethod( GuiEditCtrl, getSelection, SimSet*, (),,
//-----------------------------------------------------------------------------
DefineConsoleMethod( GuiEditCtrl, getNumSelected, S32, (), , "() - Return the number of controls currently selected." )
DefineEngineMethod( GuiEditCtrl, getNumSelected, S32, (), , "() - Return the number of controls currently selected." )
{
return object->getNumSelected();
}
//-----------------------------------------------------------------------------
DefineConsoleMethod( GuiEditCtrl, getSelectionGlobalBounds, const char*, (), , "() - Returns global bounds of current selection as vector 'x y width height'." )
DefineEngineMethod( GuiEditCtrl, getSelectionGlobalBounds, const char*, (), , "() - Returns global bounds of current selection as vector 'x y width height'." )
{
RectI bounds = object->getSelectionGlobalBounds();
String str = String::ToString( "%i %i %i %i", bounds.point.x, bounds.point.y, bounds.extent.x, bounds.extent.y );
@ -2633,7 +2633,7 @@ DefineConsoleMethod( GuiEditCtrl, getSelectionGlobalBounds, const char*, (), , "
//-----------------------------------------------------------------------------
DefineConsoleMethod( GuiEditCtrl, selectParents, void, ( bool addToSelection ), (false), "( bool addToSelection=false ) - Select parents of currently selected controls." )
DefineEngineMethod( GuiEditCtrl, selectParents, void, ( bool addToSelection ), (false), "( bool addToSelection=false ) - Select parents of currently selected controls." )
{
object->selectParents( addToSelection );
@ -2641,7 +2641,7 @@ DefineConsoleMethod( GuiEditCtrl, selectParents, void, ( bool addToSelection ),
//-----------------------------------------------------------------------------
DefineConsoleMethod( GuiEditCtrl, selectChildren, void, ( bool addToSelection ), (false), "( bool addToSelection=false ) - Select children of currently selected controls." )
DefineEngineMethod( GuiEditCtrl, selectChildren, void, ( bool addToSelection ), (false), "( bool addToSelection=false ) - Select children of currently selected controls." )
{
object->selectChildren( addToSelection );
@ -2657,14 +2657,14 @@ DefineEngineMethod( GuiEditCtrl, getTrash, SimGroup*, (),,
//-----------------------------------------------------------------------------
DefineConsoleMethod(GuiEditCtrl, setSnapToGrid, void, (U32 gridsize), , "GuiEditCtrl.setSnapToGrid(gridsize)")
DefineEngineMethod(GuiEditCtrl, setSnapToGrid, void, (U32 gridsize), , "GuiEditCtrl.setSnapToGrid(gridsize)")
{
object->setSnapToGrid(gridsize);
}
//-----------------------------------------------------------------------------
DefineConsoleMethod( GuiEditCtrl, readGuides, void, ( GuiControl* ctrl, S32 axis ), (-1), "( GuiControl ctrl [, int axis ] ) - Read the guides from the given control." )
DefineEngineMethod( GuiEditCtrl, readGuides, void, ( GuiControl* ctrl, S32 axis ), (-1), "( GuiControl ctrl [, int axis ] ) - Read the guides from the given control." )
{
// Find the control.
@ -2694,7 +2694,7 @@ DefineConsoleMethod( GuiEditCtrl, readGuides, void, ( GuiControl* ctrl, S32 axis
//-----------------------------------------------------------------------------
DefineConsoleMethod( GuiEditCtrl, writeGuides, void, ( GuiControl* ctrl, S32 axis ), ( -1), "( GuiControl ctrl [, int axis ] ) - Write the guides to the given control." )
DefineEngineMethod( GuiEditCtrl, writeGuides, void, ( GuiControl* ctrl, S32 axis ), ( -1), "( GuiControl ctrl [, int axis ] ) - Write the guides to the given control." )
{
// Find the control.
@ -2724,7 +2724,7 @@ DefineConsoleMethod( GuiEditCtrl, writeGuides, void, ( GuiControl* ctrl, S32 axi
//-----------------------------------------------------------------------------
DefineConsoleMethod( GuiEditCtrl, clearGuides, void, ( S32 axis ), (-1), "( [ int axis ] ) - Clear all currently set guide lines." )
DefineEngineMethod( GuiEditCtrl, clearGuides, void, ( S32 axis ), (-1), "( [ int axis ] ) - Clear all currently set guide lines." )
{
if( axis != -1 )
{
@ -2745,7 +2745,7 @@ DefineConsoleMethod( GuiEditCtrl, clearGuides, void, ( S32 axis ), (-1), "( [ in
//-----------------------------------------------------------------------------
DefineConsoleMethod( GuiEditCtrl, fitIntoParents, void, (bool width, bool height), (true, true), "( bool width=true, bool height=true ) - Fit selected controls into their parents." )
DefineEngineMethod( GuiEditCtrl, fitIntoParents, void, (bool width, bool height), (true, true), "( bool width=true, bool height=true ) - Fit selected controls into their parents." )
{
object->fitIntoParents( width, height );
@ -2753,7 +2753,7 @@ DefineConsoleMethod( GuiEditCtrl, fitIntoParents, void, (bool width, bool height
//-----------------------------------------------------------------------------
DefineConsoleMethod( GuiEditCtrl, getMouseMode, const char*, (), , "() - Return the current mouse mode." )
DefineEngineMethod( GuiEditCtrl, getMouseMode, const char*, (), , "() - Return the current mouse mode." )
{
switch( object->getMouseMode() )
{

View file

@ -60,7 +60,7 @@ void GuiFilterCtrl::initPersistFields()
Parent::initPersistFields();
}
DefineConsoleMethod( GuiFilterCtrl, getValue, const char*, (), , "Return a tuple containing all the values in the filter."
DefineEngineMethod( GuiFilterCtrl, getValue, const char*, (), , "Return a tuple containing all the values in the filter."
"@internal")
{
static char buffer[512];
@ -89,7 +89,7 @@ ConsoleMethod( GuiFilterCtrl, setValue, void, 3, 20, "(f1, f2, ...)"
object->set(filter);
}
DefineConsoleMethod( GuiFilterCtrl, identity, void, (), , "Reset the filtering."
DefineEngineMethod( GuiFilterCtrl, identity, void, (), , "Reset the filtering."
"@internal")
{
object->identity();

View file

@ -1486,7 +1486,7 @@ PopupMenu* GuiMenuBar::findMenu(StringTableEntry barTitle)
//-----------------------------------------------------------------------------
// Console Methods
//-----------------------------------------------------------------------------
DefineConsoleMethod(GuiMenuBar, attachToCanvas, void, (const char *canvas, S32 pos), , "(GuiCanvas, pos)")
DefineEngineMethod(GuiMenuBar, attachToCanvas, void, (const char *canvas, S32 pos), , "(GuiCanvas, pos)")
{
GuiCanvas* canv = dynamic_cast<GuiCanvas*>(Sim::findObject(canvas));
if (canv)
@ -1495,7 +1495,7 @@ DefineConsoleMethod(GuiMenuBar, attachToCanvas, void, (const char *canvas, S32 p
}
}
DefineConsoleMethod(GuiMenuBar, removeFromCanvas, void, (), , "()")
DefineEngineMethod(GuiMenuBar, removeFromCanvas, void, (), , "()")
{
GuiCanvas* canvas = object->getRoot();
@ -1503,23 +1503,23 @@ DefineConsoleMethod(GuiMenuBar, removeFromCanvas, void, (), , "()")
canvas->setMenuBar(nullptr);
}
DefineConsoleMethod(GuiMenuBar, getMenuCount, S32, (), , "()")
DefineEngineMethod(GuiMenuBar, getMenuCount, S32, (), , "()")
{
return object->getMenuListCount();
}
DefineConsoleMethod(GuiMenuBar, getMenu, S32, (S32 index), (0), "(Index)")
DefineEngineMethod(GuiMenuBar, getMenu, S32, (S32 index), (0), "(Index)")
{
return object->getMenu(index)->getId();
}
//-----------------------------------------------------------------------------
DefineConsoleMethod(GuiMenuBar, insert, void, (SimObject* pObject, S32 pos), (nullAsType<SimObject*>(), -1), "(object, pos) insert object at position")
DefineEngineMethod(GuiMenuBar, insert, void, (SimObject* pObject, S32 pos), (nullAsType<SimObject*>(), -1), "(object, pos) insert object at position")
{
object->insert(pObject, pos);
}
DefineConsoleMethod(GuiMenuBar, findMenu, S32, (const char* barTitle), (""), "(barTitle)")
DefineEngineMethod(GuiMenuBar, findMenu, S32, (const char* barTitle), (""), "(barTitle)")
{
StringTableEntry barTitleStr = StringTable->insert(barTitle);
PopupMenu* menu = object->findMenu(barTitleStr);

View file

@ -1004,7 +1004,7 @@ bool GuiParticleGraphCtrl::renderGraphTooltip(Point2I cursorPos, StringTableEntr
return true;
}
DefineConsoleMethod(GuiParticleGraphCtrl, setSelectedPoint, void, (S32 point), , "(int point)"
DefineEngineMethod(GuiParticleGraphCtrl, setSelectedPoint, void, (S32 point), , "(int point)"
"Set the selected point on the graph.\n"
"@return No return value")
{
@ -1016,7 +1016,7 @@ DefineConsoleMethod(GuiParticleGraphCtrl, setSelectedPoint, void, (S32 point), ,
object->setSelectedPoint( point );
}
DefineConsoleMethod(GuiParticleGraphCtrl, setSelectedPlot, void, (S32 plotID), , "(int plotID)"
DefineEngineMethod(GuiParticleGraphCtrl, setSelectedPlot, void, (S32 plotID), , "(int plotID)"
"Set the selected plot (a.k.a. graph)."
"@return No return value" )
{
@ -1028,7 +1028,7 @@ DefineConsoleMethod(GuiParticleGraphCtrl, setSelectedPlot, void, (S32 plotID), ,
object->setSelectedPlot( plotID );
}
DefineConsoleMethod(GuiParticleGraphCtrl, clearGraph, void, (S32 plotID), , "(int plotID)"
DefineEngineMethod(GuiParticleGraphCtrl, clearGraph, void, (S32 plotID), , "(int plotID)"
"Clear the graph of the given plot."
"@return No return value")
{
@ -1040,14 +1040,14 @@ DefineConsoleMethod(GuiParticleGraphCtrl, clearGraph, void, (S32 plotID), , "(in
object->clearGraph( plotID );
}
DefineConsoleMethod(GuiParticleGraphCtrl, clearAllGraphs, void, (), , "()"
DefineEngineMethod(GuiParticleGraphCtrl, clearAllGraphs, void, (), , "()"
"Clear all of the graphs."
"@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;)"
DefineEngineMethod(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")
{
@ -1060,7 +1060,7 @@ DefineConsoleMethod(GuiParticleGraphCtrl, addPlotPoint, S32, (S32 plotID, F32 x,
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"
DefineEngineMethod(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"
@ -1075,7 +1075,7 @@ DefineConsoleMethod(GuiParticleGraphCtrl, insertPlotPoint, void, (S32 plotID, S3
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)"
DefineEngineMethod(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"
@ -1090,21 +1090,21 @@ DefineConsoleMethod(GuiParticleGraphCtrl, changePlotPoint, S32, (S32 plotID, S32
return object->changePlotPoint( plotID, i, Point2F(x, y));
}
DefineConsoleMethod(GuiParticleGraphCtrl, getSelectedPlot, S32, (), , "() "
DefineEngineMethod(GuiParticleGraphCtrl, getSelectedPlot, S32, (), , "() "
"Gets the selected Plot (a.k.a. graph).\n"
"@return The plot's ID.")
{
return object->getSelectedPlot();
}
DefineConsoleMethod(GuiParticleGraphCtrl, getSelectedPoint, S32, (), , "()"
DefineEngineMethod(GuiParticleGraphCtrl, getSelectedPoint, S32, (), , "()"
"Gets the selected Point on the Plot (a.k.a. graph)."
"@return The last selected point ID")
{
return object->getSelectedPoint();
}
DefineConsoleMethod(GuiParticleGraphCtrl, isExistingPoint, bool, (S32 plotID, S32 samples), , "(int plotID, int samples)"
DefineEngineMethod(GuiParticleGraphCtrl, isExistingPoint, bool, (S32 plotID, S32 samples), , "(int plotID, int samples)"
"@return Returns true or false whether or not the point in the plot passed is an existing point.")
{
@ -1119,7 +1119,7 @@ DefineConsoleMethod(GuiParticleGraphCtrl, isExistingPoint, bool, (S32 plotID, S3
return object->isExistingPoint(plotID, samples);
}
DefineConsoleMethod(GuiParticleGraphCtrl, getPlotPoint, Point2F, (S32 plotID, S32 samples), , "(int plotID, int samples)"
DefineEngineMethod(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")
{
@ -1137,7 +1137,7 @@ DefineConsoleMethod(GuiParticleGraphCtrl, getPlotPoint, Point2F, (S32 plotID, S3
return object->getPlotPoint(plotID, samples);
}
DefineConsoleMethod(GuiParticleGraphCtrl, getPlotIndex, S32, (S32 plotID, F32 x, F32 y), , "(int plotID, float x, float y)\n"
DefineEngineMethod(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"
@ -1151,7 +1151,7 @@ DefineConsoleMethod(GuiParticleGraphCtrl, getPlotIndex, S32, (S32 plotID, F32 x,
return object->getPlotIndex(plotID, x, y);
}
DefineConsoleMethod(GuiParticleGraphCtrl, getGraphColor, LinearColorF, (S32 plotID), , "(int plotID)"
DefineEngineMethod(GuiParticleGraphCtrl, getGraphColor, LinearColorF, (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\"")
{
@ -1165,7 +1165,7 @@ DefineConsoleMethod(GuiParticleGraphCtrl, getGraphColor, LinearColorF, (S32 plot
}
DefineConsoleMethod(GuiParticleGraphCtrl, getGraphMin, Point2F, (S32 plotID), , "(int plotID) "
DefineEngineMethod(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\"")
{
@ -1177,7 +1177,7 @@ DefineConsoleMethod(GuiParticleGraphCtrl, getGraphMin, Point2F, (S32 plotID), ,
return object->getGraphMin(plotID);
}
DefineConsoleMethod(GuiParticleGraphCtrl, getGraphMax, Point2F, (S32 plotID), , "(int plotID) "
DefineEngineMethod(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\"")
{
@ -1190,7 +1190,7 @@ DefineConsoleMethod(GuiParticleGraphCtrl, getGraphMax, Point2F, (S32 plotID), ,
}
DefineConsoleMethod(GuiParticleGraphCtrl, getGraphName, const char*, (S32 plotID), , "(int plotID) "
DefineEngineMethod(GuiParticleGraphCtrl, getGraphName, const char*, (S32 plotID), , "(int plotID) "
"Get the name of the graph passed.\n"
"@return Returns the name of the plot")
{
@ -1207,7 +1207,7 @@ DefineConsoleMethod(GuiParticleGraphCtrl, getGraphName, const char*, (S32 plotID
return retBuffer;
}
DefineConsoleMethod(GuiParticleGraphCtrl, setGraphMin, void, (S32 plotID, F32 minX, F32 minY), , "(int plotID, float minX, float minY) "
DefineEngineMethod(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"
@ -1223,7 +1223,7 @@ DefineConsoleMethod(GuiParticleGraphCtrl, setGraphMin, void, (S32 plotID, F32 mi
object->setGraphMin(plotID, Point2F(minX, minY));
}
DefineConsoleMethod(GuiParticleGraphCtrl, setGraphMinX, void, (S32 plotID, F32 minX), , "(int plotID, float minX) "
DefineEngineMethod(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"
@ -1239,7 +1239,7 @@ DefineConsoleMethod(GuiParticleGraphCtrl, setGraphMinX, void, (S32 plotID, F32 m
object->setGraphMinX(plotID, minX);
}
DefineConsoleMethod(GuiParticleGraphCtrl, setGraphMinY, void, (S32 plotID, F32 minX), , "(int plotID, float minY) "
DefineEngineMethod(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"
@ -1255,7 +1255,7 @@ DefineConsoleMethod(GuiParticleGraphCtrl, setGraphMinY, void, (S32 plotID, F32 m
object->setGraphMinY(plotID, minX);
}
DefineConsoleMethod(GuiParticleGraphCtrl, setGraphMax, void, (S32 plotID, F32 maxX, F32 maxY), , "(int plotID, float maxX, float maxY) "
DefineEngineMethod(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"
@ -1271,7 +1271,7 @@ DefineConsoleMethod(GuiParticleGraphCtrl, setGraphMax, void, (S32 plotID, F32 ma
object->setGraphMax(plotID, Point2F(maxX, maxY));
}
DefineConsoleMethod(GuiParticleGraphCtrl, setGraphMaxX, void, (S32 plotID, F32 maxX), , "(int plotID, float maxX)"
DefineEngineMethod(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"
@ -1287,7 +1287,7 @@ DefineConsoleMethod(GuiParticleGraphCtrl, setGraphMaxX, void, (S32 plotID, F32 m
object->setGraphMaxX(plotID, maxX);
}
DefineConsoleMethod(GuiParticleGraphCtrl, setGraphMaxY, void, (S32 plotID, F32 maxX), , "(int plotID, float maxY)"
DefineEngineMethod(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"
@ -1303,7 +1303,7 @@ DefineConsoleMethod(GuiParticleGraphCtrl, setGraphMaxY, void, (S32 plotID, F32 m
object->setGraphMaxY(plotID, maxX);
}
DefineConsoleMethod(GuiParticleGraphCtrl, setGraphHidden, void, (S32 plotID, bool isHidden), , "(int plotID, bool isHidden)"
DefineEngineMethod(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.")
{
@ -1317,7 +1317,7 @@ DefineConsoleMethod(GuiParticleGraphCtrl, setGraphHidden, void, (S32 plotID, boo
object->setGraphHidden(plotID, isHidden);
}
DefineConsoleMethod(GuiParticleGraphCtrl, setAutoGraphMax, void, (bool autoMax), , "(bool autoMax) "
DefineEngineMethod(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.")
@ -1325,35 +1325,35 @@ DefineConsoleMethod(GuiParticleGraphCtrl, setAutoGraphMax, void, (bool autoMax),
object->setAutoGraphMax(autoMax);
}
DefineConsoleMethod(GuiParticleGraphCtrl, setAutoRemove, void, (bool autoRemove), , "(bool autoRemove) "
DefineEngineMethod(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.")
{
object->setAutoRemove(autoRemove);
}
DefineConsoleMethod(GuiParticleGraphCtrl, setRenderAll, void, (bool autoRemove), , "(bool renderAll)"
DefineEngineMethod(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.")
{
object->setRenderAll(autoRemove);
}
DefineConsoleMethod(GuiParticleGraphCtrl, setPointXMovementClamped, void, (bool autoRemove), , "(bool clamped)"
DefineEngineMethod(GuiParticleGraphCtrl, setPointXMovementClamped, void, (bool autoRemove), , "(bool clamped)"
"Set whether the x position of the selected graph point should be clamped"
"@return No return value.")
{
object->setPointXMovementClamped(autoRemove);
}
DefineConsoleMethod(GuiParticleGraphCtrl, setRenderGraphTooltip, void, (bool autoRemove), , "(bool renderGraphTooltip)"
DefineEngineMethod(GuiParticleGraphCtrl, setRenderGraphTooltip, void, (bool autoRemove), , "(bool renderGraphTooltip)"
"Set whether or not to render the graph tooltip."
"@return No return value.")
{
object->setRenderGraphTooltip(autoRemove);
}
DefineConsoleMethod(GuiParticleGraphCtrl, setGraphName, void, (S32 plotID, const char * graphName), , "(int plotID, string graphName) "
DefineEngineMethod(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"
@ -1369,7 +1369,7 @@ DefineConsoleMethod(GuiParticleGraphCtrl, setGraphName, void, (S32 plotID, const
object->setGraphName(plotID, graphName);
}
DefineConsoleMethod(GuiParticleGraphCtrl, resetSelectedPoint, void, (), , "()"
DefineEngineMethod(GuiParticleGraphCtrl, resetSelectedPoint, void, (), , "()"
"This will reset the currently selected point to nothing."
"@return No return value.")
{

View file

@ -524,7 +524,7 @@ ConsoleMethod(GuiInspectorComponentGroup, removeDynamicField, void, 3, 3, "")
{
}
DefineConsoleMethod(GuiInspectorComponentGroup, getComponent, S32, (), ,"")
DefineEngineMethod(GuiInspectorComponentGroup, getComponent, S32, (), ,"")
{
return object->getComponent()->getId();
}

View file

@ -316,7 +316,7 @@ void GuiInspectorDynamicField::_executeSelectedCallback()
Con::executef( mInspector, "onFieldSelected", mDynField->slotName, "TypeDynamicField" );
}
DefineConsoleMethod( GuiInspectorDynamicField, renameField, void, (const char* newDynamicFieldName),, "field.renameField(newDynamicFieldName);" )
DefineEngineMethod( GuiInspectorDynamicField, renameField, void, (const char* newDynamicFieldName),, "field.renameField(newDynamicFieldName);" )
{
object->renameField( newDynamicFieldName );
}

View file

@ -188,7 +188,7 @@ void GuiInspectorDynamicGroup::updateAllFields()
inspectGroup();
}
DefineConsoleMethod(GuiInspectorDynamicGroup, inspectGroup, bool, (), , "Refreshes the dynamic fields in the inspector.")
DefineEngineMethod(GuiInspectorDynamicGroup, inspectGroup, bool, (), , "Refreshes the dynamic fields in the inspector.")
{
return object->inspectGroup();
}
@ -263,11 +263,11 @@ void GuiInspectorDynamicGroup::addDynamicField()
instantExpand();
}
DefineConsoleMethod( GuiInspectorDynamicGroup, addDynamicField, void, (), , "obj.addDynamicField();" )
DefineEngineMethod( GuiInspectorDynamicGroup, addDynamicField, void, (), , "obj.addDynamicField();" )
{
object->addDynamicField();
}
DefineConsoleMethod( GuiInspectorDynamicGroup, removeDynamicField, void, (), , "" )
DefineEngineMethod( GuiInspectorDynamicGroup, removeDynamicField, void, (), , "" )
{
}

View file

@ -688,59 +688,59 @@ void GuiInspectorField::_setFieldDocs( StringTableEntry docs )
//-----------------------------------------------------------------------------
DefineConsoleMethod( GuiInspectorField, getInspector, S32, (), , "() - Return the GuiInspector to which this field belongs." )
DefineEngineMethod( GuiInspectorField, getInspector, S32, (), , "() - Return the GuiInspector to which this field belongs." )
{
return object->getInspector()->getId();
}
//-----------------------------------------------------------------------------
DefineConsoleMethod( GuiInspectorField, getInspectedFieldName, const char*, (), , "() - Return the name of the field edited by this inspector field." )
DefineEngineMethod( GuiInspectorField, getInspectedFieldName, const char*, (), , "() - Return the name of the field edited by this inspector field." )
{
return object->getFieldName();
}
//-----------------------------------------------------------------------------
DefineConsoleMethod( GuiInspectorField, getInspectedFieldType, const char*, (), , "() - Return the type of the field edited by this inspector field." )
DefineEngineMethod( GuiInspectorField, getInspectedFieldType, const char*, (), , "() - Return the type of the field edited by this inspector field." )
{
return object->getFieldType();
}
//-----------------------------------------------------------------------------
DefineConsoleMethod( GuiInspectorField, apply, void, ( const char * newValue, bool callbacks ), (true), "( string newValue, bool callbacks=true ) - Set the field's value. Suppress callbacks for undo if callbacks=false." )
DefineEngineMethod( GuiInspectorField, apply, void, ( const char * newValue, bool callbacks ), (true), "( string newValue, bool callbacks=true ) - Set the field's value. Suppress callbacks for undo if callbacks=false." )
{
object->setData( newValue, callbacks );
}
//-----------------------------------------------------------------------------
DefineConsoleMethod( GuiInspectorField, applyWithoutUndo, void, (const char * data), , "() - Set field value without recording undo (same as 'apply( value, false )')." )
DefineEngineMethod( GuiInspectorField, applyWithoutUndo, void, (const char * data), , "() - Set field value without recording undo (same as 'apply( value, false )')." )
{
object->setData( data, false );
}
//-----------------------------------------------------------------------------
DefineConsoleMethod( GuiInspectorField, getData, const char*, (), , "() - Return the value currently displayed on the field." )
DefineEngineMethod( GuiInspectorField, getData, const char*, (), , "() - Return the value currently displayed on the field." )
{
return object->getData();
}
//-----------------------------------------------------------------------------
DefineConsoleMethod( GuiInspectorField, reset, void, (), , "() - Reset to default value." )
DefineEngineMethod( GuiInspectorField, reset, void, (), , "() - Reset to default value." )
{
object->resetData();
}
DefineConsoleMethod(GuiInspectorField, setCaption, void, (String newCaption),, "() - Reset to default value.")
DefineEngineMethod(GuiInspectorField, setCaption, void, (String newCaption),, "() - Reset to default value.")
{
object->setCaption(StringTable->insert(newCaption.c_str()));
}
DefineConsoleMethod(GuiInspectorField, setEditControl, void, (GuiControl* editCtrl), (nullAsType<GuiControl*>()), "() - Reset to default value.")
DefineEngineMethod(GuiInspectorField, setEditControl, void, (GuiControl* editCtrl), (nullAsType<GuiControl*>()), "() - Reset to default value.")
{
object->setEditControl(editCtrl);
}

View file

@ -250,12 +250,12 @@ GuiInspectorField* GuiInspectorVariableGroup::createInspectorField()
return NULL;
}
DefineConsoleMethod(GuiInspectorVariableGroup, createInspectorField, GuiInspectorField*, (),, "createInspectorField()")
DefineEngineMethod(GuiInspectorVariableGroup, createInspectorField, GuiInspectorField*, (),, "createInspectorField()")
{
return object->createInspectorField();
}
DefineConsoleMethod(GuiInspectorVariableGroup, addInspectorField, void, (GuiInspectorField* field), (nullAsType<GuiInspectorField*>()), "addInspectorField( GuiInspectorFieldObject )")
DefineEngineMethod(GuiInspectorVariableGroup, addInspectorField, void, (GuiInspectorField* field), (nullAsType<GuiInspectorField*>()), "addInspectorField( GuiInspectorFieldObject )")
{
object->addInspectorField(field);
}

View file

@ -216,17 +216,17 @@ void GuiVariableInspector::setFieldEnabled(const char* name, bool enabled)
}
}
DefineConsoleMethod(GuiVariableInspector, startGroup, void, (const char* name),, "startGroup( groupName )")
DefineEngineMethod(GuiVariableInspector, startGroup, void, (const char* name),, "startGroup( groupName )")
{
object->startGroup(name);
}
DefineConsoleMethod(GuiVariableInspector, endGroup, void, (),, "endGroup()")
DefineEngineMethod(GuiVariableInspector, endGroup, void, (),, "endGroup()")
{
object->endGroup();
}
DefineConsoleMethod(GuiVariableInspector, addField, void, (const char* name, const char* label, const char* typeName,
DefineEngineMethod(GuiVariableInspector, addField, void, (const char* name, const char* label, const char* typeName,
const char* description, const char* defaultValue, const char* dataValues, SimObject* ownerObj),
("","","","","", "", nullAsType<SimObject*>()), "addField( fieldName/varName, fieldLabel, fieldTypeName, description, defaultValue, defaultValues, ownerObject )")
{
@ -236,7 +236,7 @@ DefineConsoleMethod(GuiVariableInspector, addField, void, (const char* name, con
object->addField(name, label, typeName, description, defaultValue, dataValues, ownerObj);
}
DefineConsoleMethod(GuiVariableInspector, addCallbackField, void, (const char* name, const char* label, const char* typeName,
DefineEngineMethod(GuiVariableInspector, addCallbackField, void, (const char* name, const char* label, const char* typeName,
const char* description, const char* defaultValue, const char* dataValues, const char* callbackName, SimObject* ownerObj),
("", "", "", "", "", "", nullAsType<SimObject*>()), "addField( fieldName/varName, fieldLabel, fieldTypeName, description, defaultValue, defaultValues, callbackName, ownerObject )")
{
@ -246,22 +246,22 @@ DefineConsoleMethod(GuiVariableInspector, addCallbackField, void, (const char* n
object->addCallbackField(name, label, typeName, description, defaultValue, dataValues, callbackName, ownerObj);
}
DefineConsoleMethod(GuiVariableInspector, update, void, (), , "update()")
DefineEngineMethod(GuiVariableInspector, update, void, (), , "update()")
{
object->update();
}
DefineConsoleMethod(GuiVariableInspector, clearFields, void, (), , "clearFields()")
DefineEngineMethod(GuiVariableInspector, clearFields, void, (), , "clearFields()")
{
object->clearFields();
}
DefineConsoleMethod(GuiVariableInspector, setFieldEnabled, void, (const char* fieldName, bool isEnabled), (true), "setFieldEnabled( fieldName, isEnabled )")
DefineEngineMethod(GuiVariableInspector, setFieldEnabled, void, (const char* fieldName, bool isEnabled), (true), "setFieldEnabled( fieldName, isEnabled )")
{
object->setFieldEnabled(fieldName, isEnabled);
}
DefineConsoleMethod( GuiVariableInspector, loadVars, void, ( const char * searchString ), , "loadVars( searchString )" )
DefineEngineMethod( GuiVariableInspector, loadVars, void, ( const char * searchString ), , "loadVars( searchString )" )
{
object->loadVars( searchString );
}

View file

@ -445,17 +445,17 @@ void PopupMenu::hidePopupSubmenus()
//-----------------------------------------------------------------------------
// Console Methods
//-----------------------------------------------------------------------------
DefineConsoleMethod(PopupMenu, insertItem, S32, (S32 pos, const char * title, const char * accelerator, const char* cmd), ("", "", ""), "(pos[, title][, accelerator][, cmd])")
DefineEngineMethod(PopupMenu, insertItem, S32, (S32 pos, const char * title, const char * accelerator, const char* cmd), ("", "", ""), "(pos[, title][, accelerator][, cmd])")
{
return object->insertItem(pos, title, accelerator, cmd);
}
DefineConsoleMethod(PopupMenu, removeItem, void, (S32 pos), , "(pos)")
DefineEngineMethod(PopupMenu, removeItem, void, (S32 pos), , "(pos)")
{
object->removeItem(pos);
}
DefineConsoleMethod(PopupMenu, insertSubMenu, S32, (S32 pos, String title, String subMenu), , "(pos, title, subMenu)")
DefineEngineMethod(PopupMenu, insertSubMenu, S32, (S32 pos, String title, String subMenu), , "(pos, title, subMenu)")
{
PopupMenu *mnu = dynamic_cast<PopupMenu *>(Sim::findObject(subMenu));
if(mnu == NULL)
@ -466,40 +466,40 @@ DefineConsoleMethod(PopupMenu, insertSubMenu, S32, (S32 pos, String title, Strin
return object->insertSubMenu(pos, title, mnu);
}
DefineConsoleMethod(PopupMenu, setItem, bool, (S32 pos, const char * title, const char * accelerator, const char *cmd), (""), "(pos, title[, accelerator][, cmd])")
DefineEngineMethod(PopupMenu, setItem, bool, (S32 pos, const char * title, const char * accelerator, const char *cmd), (""), "(pos, title[, accelerator][, cmd])")
{
return object->setItem(pos, title, accelerator, cmd);
}
//-----------------------------------------------------------------------------
DefineConsoleMethod(PopupMenu, enableItem, void, (S32 pos, bool enabled), , "(pos, enabled)")
DefineEngineMethod(PopupMenu, enableItem, void, (S32 pos, bool enabled), , "(pos, enabled)")
{
object->enableItem(pos, enabled);
}
DefineConsoleMethod(PopupMenu, checkItem, void, (S32 pos, bool checked), , "(pos, checked)")
DefineEngineMethod(PopupMenu, checkItem, void, (S32 pos, bool checked), , "(pos, checked)")
{
object->checkItem(pos, checked);
}
DefineConsoleMethod(PopupMenu, checkRadioItem, void, (S32 firstPos, S32 lastPos, S32 checkPos), , "(firstPos, lastPos, checkPos)")
DefineEngineMethod(PopupMenu, checkRadioItem, void, (S32 firstPos, S32 lastPos, S32 checkPos), , "(firstPos, lastPos, checkPos)")
{
object->checkRadioItem(firstPos, lastPos, checkPos);
}
DefineConsoleMethod(PopupMenu, isItemChecked, bool, (S32 pos), , "(pos)")
DefineEngineMethod(PopupMenu, isItemChecked, bool, (S32 pos), , "(pos)")
{
return object->isItemChecked(pos);
}
DefineConsoleMethod(PopupMenu, getItemCount, S32, (), , "()")
DefineEngineMethod(PopupMenu, getItemCount, S32, (), , "()")
{
return object->getItemCount();
}
//-----------------------------------------------------------------------------
DefineConsoleMethod(PopupMenu, showPopup, void, (const char * canvasName, S32 x, S32 y), ( -1, -1), "(Canvas,[x, y])")
DefineEngineMethod(PopupMenu, showPopup, void, (const char * canvasName, S32 x, S32 y), ( -1, -1), "(Canvas,[x, y])")
{
GuiCanvas *pCanvas = dynamic_cast<GuiCanvas*>(Sim::findObject(canvasName));
object->showPopup(pCanvas, x, y);