mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-11 14:44:36 +00:00
Merge branch 'method_Unmangle' into PBR_PR
This commit is contained in:
commit
8e534dd0c9
636 changed files with 3939 additions and 3454 deletions
|
|
@ -92,17 +92,17 @@ void GuiToolboxButtonCtrl::onSleep()
|
|||
|
||||
//-------------------------------------
|
||||
|
||||
DefineConsoleMethod( GuiToolboxButtonCtrl, setNormalBitmap, void, ( const char * name ), , "( filepath name ) sets the bitmap that shows when the button is active")
|
||||
DefineEngineMethod( GuiToolboxButtonCtrl, setNormalBitmap, void, ( const char * name ), , "( filepath name ) sets the bitmap that shows when the button is active")
|
||||
{
|
||||
object->setNormalBitmap(name);
|
||||
}
|
||||
|
||||
DefineConsoleMethod( GuiToolboxButtonCtrl, setLoweredBitmap, void, ( const char * name ), , "( filepath name ) sets the bitmap that shows when the button is disabled")
|
||||
DefineEngineMethod( GuiToolboxButtonCtrl, setLoweredBitmap, void, ( const char * name ), , "( filepath name ) sets the bitmap that shows when the button is disabled")
|
||||
{
|
||||
object->setLoweredBitmap(name);
|
||||
}
|
||||
|
||||
DefineConsoleMethod( GuiToolboxButtonCtrl, setHoverBitmap, void, ( const char * name ), , "( filepath name ) sets the bitmap that shows when the button is disabled")
|
||||
DefineEngineMethod( GuiToolboxButtonCtrl, setHoverBitmap, void, ( const char * name ), , "( filepath name ) sets the bitmap that shows when the button is disabled")
|
||||
{
|
||||
object->setHoverBitmap(name);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -261,7 +261,7 @@ static ConsoleDocFragment _sGuiBitmapCtrlSetBitmap2(
|
|||
|
||||
|
||||
//"Set the bitmap displayed in the control. Note that it is limited in size, to 256x256."
|
||||
DefineConsoleMethod( GuiBitmapCtrl, setBitmap, void, ( const char * fileRoot, bool resize), ( false),
|
||||
DefineEngineMethod( GuiBitmapCtrl, setBitmap, void, ( const char * fileRoot, bool resize), ( false),
|
||||
"( String filename | String filename, bool resize ) Assign an image to the control.\n\n"
|
||||
"@hide" )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -658,17 +658,17 @@ void GuiColorPickerCtrl::setScriptValue(const char *value)
|
|||
setValue(newValue);
|
||||
}
|
||||
|
||||
DefineConsoleMethod(GuiColorPickerCtrl, getSelectorPos, Point2I, (), , "Gets the current position of the selector")
|
||||
DefineEngineMethod(GuiColorPickerCtrl, getSelectorPos, Point2I, (), , "Gets the current position of the selector")
|
||||
{
|
||||
return object->getSelectorPos();
|
||||
}
|
||||
|
||||
DefineConsoleMethod(GuiColorPickerCtrl, setSelectorPos, void, (Point2I newPos), , "Sets the current position of the selector")
|
||||
DefineEngineMethod(GuiColorPickerCtrl, setSelectorPos, void, (Point2I newPos), , "Sets the current position of the selector")
|
||||
{
|
||||
object->setSelectorPos(newPos);
|
||||
}
|
||||
|
||||
DefineConsoleMethod(GuiColorPickerCtrl, updateColor, void, (), , "Forces update of pick color")
|
||||
DefineEngineMethod(GuiColorPickerCtrl, updateColor, void, (), , "Forces update of pick color")
|
||||
{
|
||||
object->updateColor();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -379,18 +379,18 @@ void GuiFileTreeCtrl::recurseInsert( Item* parent, StringTableEntry path )
|
|||
|
||||
}
|
||||
|
||||
DefineConsoleMethod( GuiFileTreeCtrl, getSelectedPath, const char*, (), , "getSelectedPath() - returns the currently selected path in the tree")
|
||||
DefineEngineMethod( GuiFileTreeCtrl, getSelectedPath, const char*, (), , "getSelectedPath() - returns the currently selected path in the tree")
|
||||
{
|
||||
const String& path = object->getSelectedPath();
|
||||
return Con::getStringArg( path );
|
||||
}
|
||||
|
||||
DefineConsoleMethod( GuiFileTreeCtrl, setSelectedPath, bool, (const char * path), , "setSelectedPath(path) - expands the tree to the specified path")
|
||||
DefineEngineMethod( GuiFileTreeCtrl, setSelectedPath, bool, (const char * path), , "setSelectedPath(path) - expands the tree to the specified path")
|
||||
{
|
||||
return object->setSelectedPath( path );
|
||||
}
|
||||
|
||||
DefineConsoleMethod( GuiFileTreeCtrl, reload, void, (), , "() - Reread the directory tree hierarchy." )
|
||||
DefineEngineMethod( GuiFileTreeCtrl, reload, void, (), , "() - Reread the directory tree hierarchy." )
|
||||
{
|
||||
object->updateTree();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -601,7 +601,7 @@ void GuiGradientCtrl::sortColorRange()
|
|||
dQsort( mAlphaRange.address(), mAlphaRange.size(), sizeof(ColorRange), _numIncreasing);
|
||||
}
|
||||
|
||||
DefineConsoleMethod(GuiGradientCtrl, getColorCount, S32, (), , "Get color count")
|
||||
DefineEngineMethod(GuiGradientCtrl, getColorCount, S32, (), , "Get color count")
|
||||
{
|
||||
if( object->getDisplayMode() == GuiGradientCtrl::pHorizColorRange )
|
||||
return object->mColorRange.size();
|
||||
|
|
@ -611,7 +611,7 @@ DefineConsoleMethod(GuiGradientCtrl, getColorCount, S32, (), , "Get color count"
|
|||
return 0;
|
||||
}
|
||||
|
||||
DefineConsoleMethod(GuiGradientCtrl, getColor, LinearColorF, (S32 idx), , "Get color value")
|
||||
DefineEngineMethod(GuiGradientCtrl, getColor, LinearColorF, (S32 idx), , "Get color value")
|
||||
{
|
||||
|
||||
if( object->getDisplayMode() == GuiGradientCtrl::pHorizColorRange )
|
||||
|
|
|
|||
|
|
@ -167,7 +167,7 @@ void GuiMaterialCtrl::onRender( Point2I offset, const RectI &updateRect )
|
|||
GFX->setTexture( 0, NULL );
|
||||
}
|
||||
|
||||
DefineConsoleMethod( GuiMaterialCtrl, setMaterial, bool, ( const char * materialName ), , "( string materialName )"
|
||||
DefineEngineMethod( GuiMaterialCtrl, setMaterial, bool, ( const char * materialName ), , "( string materialName )"
|
||||
"Set the material to be displayed in the control." )
|
||||
{
|
||||
return object->setMaterial( materialName );
|
||||
|
|
|
|||
|
|
@ -300,82 +300,82 @@ void GuiPopUpMenuCtrl::initPersistFields(void)
|
|||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
DefineConsoleMethod( GuiPopUpMenuCtrl, add, void, (const char * name, S32 idNum, U32 scheme), ("", -1, 0), "(string name, int idNum, int scheme=0)")
|
||||
DefineEngineMethod( GuiPopUpMenuCtrl, add, void, (const char * name, S32 idNum, U32 scheme), ("", -1, 0), "(string name, int idNum, int scheme=0)")
|
||||
{
|
||||
object->addEntry(name, idNum, scheme);
|
||||
}
|
||||
|
||||
DefineConsoleMethod( GuiPopUpMenuCtrl, addScheme, void, (U32 id, ColorI fontColor, ColorI fontColorHL, ColorI fontColorSEL), ,
|
||||
DefineEngineMethod( GuiPopUpMenuCtrl, addScheme, void, (U32 id, ColorI fontColor, ColorI fontColorHL, ColorI fontColorSEL), ,
|
||||
"(int id, ColorI fontColor, ColorI fontColorHL, ColorI fontColorSEL)")
|
||||
{
|
||||
|
||||
object->addScheme( id, fontColor, fontColorHL, fontColorSEL );
|
||||
}
|
||||
|
||||
DefineConsoleMethod( GuiPopUpMenuCtrl, getText, const char*, (), , "")
|
||||
DefineEngineMethod( GuiPopUpMenuCtrl, getText, const char*, (), , "")
|
||||
{
|
||||
return object->getText();
|
||||
}
|
||||
|
||||
DefineConsoleMethod( GuiPopUpMenuCtrl, clear, void, (), , "Clear the popup list.")
|
||||
DefineEngineMethod( GuiPopUpMenuCtrl, clear, void, (), , "Clear the popup list.")
|
||||
{
|
||||
object->clear();
|
||||
}
|
||||
|
||||
//FIXME: clashes with SimSet.sort
|
||||
DefineConsoleMethod(GuiPopUpMenuCtrl, sort, void, (), , "Sort the list alphabetically.")
|
||||
DefineEngineMethod(GuiPopUpMenuCtrl, sort, void, (), , "Sort the list alphabetically.")
|
||||
{
|
||||
object->sort();
|
||||
}
|
||||
|
||||
// Added to sort the entries by ID
|
||||
DefineConsoleMethod(GuiPopUpMenuCtrl, sortID, void, (), , "Sort the list by ID.")
|
||||
DefineEngineMethod(GuiPopUpMenuCtrl, sortID, void, (), , "Sort the list by ID.")
|
||||
{
|
||||
object->sortID();
|
||||
}
|
||||
|
||||
DefineConsoleMethod( GuiPopUpMenuCtrl, forceOnAction, void, (), , "")
|
||||
DefineEngineMethod( GuiPopUpMenuCtrl, forceOnAction, void, (), , "")
|
||||
{
|
||||
object->onAction();
|
||||
}
|
||||
|
||||
DefineConsoleMethod( GuiPopUpMenuCtrl, forceClose, void, (), , "")
|
||||
DefineEngineMethod( GuiPopUpMenuCtrl, forceClose, void, (), , "")
|
||||
{
|
||||
object->closePopUp();
|
||||
}
|
||||
|
||||
DefineConsoleMethod( GuiPopUpMenuCtrl, getSelected, S32, (), , "Gets the selected index")
|
||||
DefineEngineMethod( GuiPopUpMenuCtrl, getSelected, S32, (), , "Gets the selected index")
|
||||
{
|
||||
return object->getSelected();
|
||||
}
|
||||
|
||||
DefineConsoleMethod( GuiPopUpMenuCtrl, setSelected, void, (S32 id, bool scriptCallback), (true), "(int id, [scriptCallback=true])")
|
||||
DefineEngineMethod( GuiPopUpMenuCtrl, setSelected, void, (S32 id, bool scriptCallback), (true), "(int id, [scriptCallback=true])")
|
||||
{
|
||||
object->setSelected( id, scriptCallback );
|
||||
}
|
||||
|
||||
DefineConsoleMethod( GuiPopUpMenuCtrl, setFirstSelected, void, (bool scriptCallback), (true), "([scriptCallback=true])")
|
||||
DefineEngineMethod( GuiPopUpMenuCtrl, setFirstSelected, void, (bool scriptCallback), (true), "([scriptCallback=true])")
|
||||
{
|
||||
object->setFirstSelected( scriptCallback );
|
||||
|
||||
}
|
||||
|
||||
DefineConsoleMethod( GuiPopUpMenuCtrl, setNoneSelected, void, (), , "")
|
||||
DefineEngineMethod( GuiPopUpMenuCtrl, setNoneSelected, void, (), , "")
|
||||
{
|
||||
object->setNoneSelected();
|
||||
}
|
||||
|
||||
DefineConsoleMethod( GuiPopUpMenuCtrl, getTextById, const char*, (S32 id), , "(int id)")
|
||||
DefineEngineMethod( GuiPopUpMenuCtrl, getTextById, const char*, (S32 id), , "(int id)")
|
||||
{
|
||||
return(object->getTextById(id));
|
||||
}
|
||||
|
||||
DefineConsoleMethod( GuiPopUpMenuCtrl, changeTextById, void, ( S32 id, const char * text ), , "( int id, string text )" )
|
||||
DefineEngineMethod( GuiPopUpMenuCtrl, changeTextById, void, ( S32 id, const char * text ), , "( int id, string text )" )
|
||||
{
|
||||
object->setEntryText( id, text );
|
||||
}
|
||||
|
||||
DefineConsoleMethod( GuiPopUpMenuCtrl, setEnumContent, void, (const char * className, const char * enumName), , "(string class, string enum)"
|
||||
DefineEngineMethod( GuiPopUpMenuCtrl, setEnumContent, void, (const char * className, const char * enumName), , "(string class, string enum)"
|
||||
"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..")
|
||||
|
|
@ -429,20 +429,20 @@ DefineConsoleMethod( GuiPopUpMenuCtrl, setEnumContent, void, (const char * class
|
|||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
DefineConsoleMethod( GuiPopUpMenuCtrl, findText, S32, (const char * text), , "(string text)"
|
||||
DefineEngineMethod( GuiPopUpMenuCtrl, findText, S32, (const char * text), , "(string text)"
|
||||
"Returns the position of the first entry containing the specified text or -1 if not found.")
|
||||
{
|
||||
return( object->findText( text ) );
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
DefineConsoleMethod( GuiPopUpMenuCtrl, size, S32, (), , "Get the size of the menu - the number of entries in it.")
|
||||
DefineEngineMethod( GuiPopUpMenuCtrl, size, S32, (), , "Get the size of the menu - the number of entries in it.")
|
||||
{
|
||||
return( object->getNumEntries() );
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
DefineConsoleMethod( GuiPopUpMenuCtrl, replaceText, void, (bool doReplaceText), , "(bool doReplaceText)")
|
||||
DefineEngineMethod( GuiPopUpMenuCtrl, replaceText, void, (bool doReplaceText), , "(bool doReplaceText)")
|
||||
{
|
||||
object->replaceText(S32(doReplaceText));
|
||||
}
|
||||
|
|
@ -532,7 +532,7 @@ void GuiPopUpMenuCtrl::clearEntry( S32 entry )
|
|||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
DefineConsoleMethod( GuiPopUpMenuCtrl, clearEntry, void, (S32 entry), , "(S32 entry)")
|
||||
DefineEngineMethod( GuiPopUpMenuCtrl, clearEntry, void, (S32 entry), , "(S32 entry)")
|
||||
{
|
||||
object->clearEntry(entry);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -364,7 +364,7 @@ ConsoleDocFragment _GuiPopUpMenuCtrlExAdd(
|
|||
"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)")
|
||||
DefineEngineMethod( GuiPopUpMenuCtrlEx, add, void, (const char * name, S32 idNum, U32 scheme), ("", -1, 0), "(string name, int idNum, int scheme=0)")
|
||||
{
|
||||
object->addEntry(name, idNum, scheme);
|
||||
}
|
||||
|
|
@ -525,7 +525,7 @@ ConsoleDocFragment _GuiPopUpMenuCtrlExsetSelected(
|
|||
"setSelected(int id, bool scriptCallback=true);"
|
||||
);
|
||||
|
||||
DefineConsoleMethod( GuiPopUpMenuCtrlEx, setSelected, void, (S32 id, bool scriptCallback), (true), "(int id, [scriptCallback=true])"
|
||||
DefineEngineMethod( GuiPopUpMenuCtrlEx, setSelected, void, (S32 id, bool scriptCallback), (true), "(int id, [scriptCallback=true])"
|
||||
"@hide")
|
||||
{
|
||||
object->setSelected( id, scriptCallback );
|
||||
|
|
@ -539,7 +539,7 @@ ConsoleDocFragment _GuiPopUpMenuCtrlExsetFirstSelected(
|
|||
);
|
||||
|
||||
|
||||
DefineConsoleMethod( GuiPopUpMenuCtrlEx, setFirstSelected, void, (bool scriptCallback), (true), "([scriptCallback=true])"
|
||||
DefineEngineMethod( GuiPopUpMenuCtrlEx, setFirstSelected, void, (bool scriptCallback), (true), "([scriptCallback=true])"
|
||||
"@hide")
|
||||
{
|
||||
object->setFirstSelected( scriptCallback );
|
||||
|
|
@ -561,7 +561,7 @@ DefineEngineMethod( GuiPopUpMenuCtrlEx, getTextById, const char*, (S32 id),,
|
|||
}
|
||||
|
||||
|
||||
DefineConsoleMethod( GuiPopUpMenuCtrlEx, getColorById, ColorI, (S32 id), ,
|
||||
DefineEngineMethod( 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")
|
||||
|
|
@ -572,7 +572,7 @@ DefineConsoleMethod( GuiPopUpMenuCtrlEx, getColorById, ColorI, (S32 id), ,
|
|||
|
||||
}
|
||||
|
||||
DefineConsoleMethod( GuiPopUpMenuCtrlEx, setEnumContent, void, ( const char * className, const char * enumName ), ,
|
||||
DefineEngineMethod( GuiPopUpMenuCtrlEx, setEnumContent, void, ( const char * className, const char * enumName ), ,
|
||||
"@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"
|
||||
|
|
@ -628,7 +628,7 @@ DefineConsoleMethod( GuiPopUpMenuCtrlEx, setEnumContent, void, ( const char * cl
|
|||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
DefineConsoleMethod( GuiPopUpMenuCtrlEx, findText, S32, (const char * text), , "(string text)"
|
||||
DefineEngineMethod( 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.")
|
||||
|
|
@ -637,7 +637,7 @@ DefineConsoleMethod( GuiPopUpMenuCtrlEx, findText, S32, (const char * text), , "
|
|||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
DefineConsoleMethod( GuiPopUpMenuCtrlEx, size, S32, (), ,
|
||||
DefineEngineMethod( GuiPopUpMenuCtrlEx, size, S32, (), ,
|
||||
"@brief Get the size of the menu\n\n"
|
||||
"@return Number of entries in the menu\n")
|
||||
{
|
||||
|
|
@ -645,7 +645,7 @@ DefineConsoleMethod( GuiPopUpMenuCtrlEx, size, S32, (), ,
|
|||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
DefineConsoleMethod( GuiPopUpMenuCtrlEx, replaceText, void, (S32 boolVal), ,
|
||||
DefineEngineMethod( 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")
|
||||
{
|
||||
|
|
@ -737,7 +737,7 @@ void GuiPopUpMenuCtrlEx::clearEntry( S32 entry )
|
|||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
DefineConsoleMethod( GuiPopUpMenuCtrlEx, clearEntry, void, (S32 entry), , "(S32 entry)")
|
||||
DefineEngineMethod( GuiPopUpMenuCtrlEx, clearEntry, void, (S32 entry), , "(S32 entry)")
|
||||
{
|
||||
object->clearEntry(entry);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2139,7 +2139,7 @@ ConsoleDocFragment _pushDialog(
|
|||
"void pushDialog( GuiControl ctrl, int layer=0, bool center=false);"
|
||||
);
|
||||
|
||||
DefineConsoleMethod( GuiCanvas, pushDialog, void, (const char * ctrlName, S32 layer, bool center), ( 0, false), "(GuiControl ctrl, int layer=0, bool center=false)"
|
||||
DefineEngineMethod( GuiCanvas, pushDialog, void, (const char * ctrlName, S32 layer, bool center), ( 0, false), "(GuiControl ctrl, int layer=0, bool center=false)"
|
||||
"@hide")
|
||||
{
|
||||
GuiControl *gui;
|
||||
|
|
@ -2176,7 +2176,7 @@ ConsoleDocFragment _popDialog2(
|
|||
"void popDialog();"
|
||||
);
|
||||
|
||||
DefineConsoleMethod( GuiCanvas, popDialog, void, (GuiControl * gui), (nullAsType<GuiControl*>()), "(GuiControl ctrl=NULL)"
|
||||
DefineEngineMethod( GuiCanvas, popDialog, void, (GuiControl * gui), (nullAsType<GuiControl*>()), "(GuiControl ctrl=NULL)"
|
||||
"@hide")
|
||||
{
|
||||
if (gui)
|
||||
|
|
@ -2204,7 +2204,7 @@ ConsoleDocFragment _popLayer2(
|
|||
"void popLayer(S32 layer);"
|
||||
);
|
||||
|
||||
DefineConsoleMethod( GuiCanvas, popLayer, void, (S32 layer), (0), "(int layer)"
|
||||
DefineEngineMethod( GuiCanvas, popLayer, void, (S32 layer), (0), "(int layer)"
|
||||
"@hide")
|
||||
{
|
||||
|
||||
|
|
@ -2362,7 +2362,7 @@ ConsoleDocFragment _setCursorPos2(
|
|||
"bool setCursorPos( F32 posX, F32 posY);"
|
||||
);
|
||||
|
||||
DefineConsoleMethod( GuiCanvas, setCursorPos, void, (Point2I pos), , "(Point2I pos)"
|
||||
DefineEngineMethod( GuiCanvas, setCursorPos, void, (Point2I pos), , "(Point2I pos)"
|
||||
"@hide")
|
||||
{
|
||||
|
||||
|
|
@ -2647,7 +2647,7 @@ DefineEngineMethod( GuiCanvas, setWindowPosition, void, ( Point2I position ),,
|
|||
object->getPlatformWindow()->setPosition( position );
|
||||
}
|
||||
|
||||
DefineConsoleMethod( GuiCanvas, isFullscreen, bool, (), , "() - Is this canvas currently fullscreen?" )
|
||||
DefineEngineMethod( GuiCanvas, isFullscreen, bool, (), , "() - Is this canvas currently fullscreen?" )
|
||||
{
|
||||
if (Platform::getWebDeployment())
|
||||
return false;
|
||||
|
|
@ -2658,14 +2658,14 @@ DefineConsoleMethod( GuiCanvas, isFullscreen, bool, (), , "() - Is this canvas c
|
|||
return object->getPlatformWindow()->getVideoMode().fullScreen;
|
||||
}
|
||||
|
||||
DefineConsoleMethod( GuiCanvas, minimizeWindow, void, (), , "() - minimize this canvas' window." )
|
||||
DefineEngineMethod( GuiCanvas, minimizeWindow, void, (), , "() - minimize this canvas' window." )
|
||||
{
|
||||
PlatformWindow* window = object->getPlatformWindow();
|
||||
if ( window )
|
||||
window->minimize();
|
||||
}
|
||||
|
||||
DefineConsoleMethod( GuiCanvas, isMinimized, bool, (), , "()" )
|
||||
DefineEngineMethod( GuiCanvas, isMinimized, bool, (), , "()" )
|
||||
{
|
||||
PlatformWindow* window = object->getPlatformWindow();
|
||||
if ( window )
|
||||
|
|
@ -2674,7 +2674,7 @@ DefineConsoleMethod( GuiCanvas, isMinimized, bool, (), , "()" )
|
|||
return false;
|
||||
}
|
||||
|
||||
DefineConsoleMethod( GuiCanvas, isMaximized, bool, (), , "()" )
|
||||
DefineEngineMethod( GuiCanvas, isMaximized, bool, (), , "()" )
|
||||
{
|
||||
PlatformWindow* window = object->getPlatformWindow();
|
||||
if ( window )
|
||||
|
|
@ -2683,21 +2683,21 @@ DefineConsoleMethod( GuiCanvas, isMaximized, bool, (), , "()" )
|
|||
return false;
|
||||
}
|
||||
|
||||
DefineConsoleMethod( GuiCanvas, maximizeWindow, void, (), , "() - maximize this canvas' window." )
|
||||
DefineEngineMethod( GuiCanvas, maximizeWindow, void, (), , "() - maximize this canvas' window." )
|
||||
{
|
||||
PlatformWindow* window = object->getPlatformWindow();
|
||||
if ( window )
|
||||
window->maximize();
|
||||
}
|
||||
|
||||
DefineConsoleMethod( GuiCanvas, restoreWindow, void, (), , "() - restore this canvas' window." )
|
||||
DefineEngineMethod( GuiCanvas, restoreWindow, void, (), , "() - restore this canvas' window." )
|
||||
{
|
||||
PlatformWindow* window = object->getPlatformWindow();
|
||||
if( window )
|
||||
window->restore();
|
||||
}
|
||||
|
||||
DefineConsoleMethod( GuiCanvas, setFocus, void, (), , "() - Claim OS input focus for this canvas' window.")
|
||||
DefineEngineMethod( GuiCanvas, setFocus, void, (), , "() - Claim OS input focus for this canvas' window.")
|
||||
{
|
||||
PlatformWindow* window = object->getPlatformWindow();
|
||||
if( window )
|
||||
|
|
@ -2712,7 +2712,7 @@ DefineEngineMethod( GuiCanvas, setMenuBar, void, ( GuiControl* menu ),,
|
|||
return object->setMenuBar( menu );
|
||||
}
|
||||
|
||||
DefineConsoleMethod( GuiCanvas, setVideoMode, void,
|
||||
DefineEngineMethod( GuiCanvas, setVideoMode, void,
|
||||
(U32 width, U32 height, bool fullscreen, U32 bitDepth, U32 refreshRate, U32 antialiasLevel),
|
||||
( false, 0, 0, 0),
|
||||
"(int width, int height, bool fullscreen, [int bitDepth], [int refreshRate], [int antialiasLevel] )\n"
|
||||
|
|
@ -2812,7 +2812,7 @@ DefineConsoleMethod( GuiCanvas, setVideoMode, void,
|
|||
Con::setVariable( "$pref::Video::mode", vm.toString() );
|
||||
}
|
||||
|
||||
ConsoleMethod( GuiCanvas, showWindow, void, 2, 2, "" )
|
||||
DefineEngineMethod(GuiCanvas, showWindow, void, (),, "")
|
||||
{
|
||||
if (!object->getPlatformWindow())
|
||||
return;
|
||||
|
|
@ -2822,7 +2822,7 @@ ConsoleMethod( GuiCanvas, showWindow, void, 2, 2, "" )
|
|||
object->getPlatformWindow()->setDisplayWindow(true);
|
||||
}
|
||||
|
||||
ConsoleMethod( GuiCanvas, hideWindow, void, 2, 2, "" )
|
||||
DefineEngineMethod(GuiCanvas, hideWindow, void, (),, "")
|
||||
{
|
||||
if (!object->getPlatformWindow())
|
||||
return;
|
||||
|
|
@ -2832,30 +2832,29 @@ ConsoleMethod( GuiCanvas, hideWindow, void, 2, 2, "" )
|
|||
object->getPlatformWindow()->setDisplayWindow(false);
|
||||
}
|
||||
|
||||
ConsoleMethod( GuiCanvas, cursorClick, void, 4, 4, "button, isDown" )
|
||||
DefineEngineMethod(GuiCanvas, cursorClick, void, (S32 buttonId, bool isDown), , "")
|
||||
{
|
||||
const S32 buttonId = dAtoi(argv[2]);
|
||||
const bool isDown = dAtob(argv[3]);
|
||||
|
||||
object->cursorClick(buttonId, isDown);
|
||||
}
|
||||
|
||||
ConsoleMethod( GuiCanvas, cursorNudge, void, 4, 4, "x, y" )
|
||||
DefineEngineMethod(GuiCanvas, cursorNudge, void, (F32 x, F32 y), , "")
|
||||
{
|
||||
object->cursorNudge(dAtof(argv[2]), dAtof(argv[3]));
|
||||
object->cursorNudge(x, y);
|
||||
}
|
||||
|
||||
// This function allows resetting of the video-mode from script. It was motivated by
|
||||
// the need to temporarily disable vsync during datablock cache load to avoid a
|
||||
// significant slowdown.
|
||||
bool AFX_forceVideoReset = false;
|
||||
|
||||
ConsoleMethod( GuiCanvas, resetVideoMode, void, 2,2, "()")
|
||||
|
||||
DefineEngineMethod(GuiCanvas, resetVideoMode, void, (), , "")
|
||||
{
|
||||
PlatformWindow* window = object->getPlatformWindow();
|
||||
if( window )
|
||||
if (window)
|
||||
{
|
||||
GFXWindowTarget* gfx_target = window->getGFXTarget();
|
||||
if ( gfx_target )
|
||||
GFXWindowTarget* gfx_target = window->getGFXTarget();
|
||||
if (gfx_target)
|
||||
{
|
||||
AFX_forceVideoReset = true;
|
||||
gfx_target->resetMode();
|
||||
|
|
|
|||
|
|
@ -2898,7 +2898,7 @@ static ConsoleDocFragment _sGuiControlSetExtent2(
|
|||
"GuiControl", // The class to place the method in; use NULL for functions.
|
||||
"void setExtent( Point2I p );" ); // The definition string.
|
||||
|
||||
DefineConsoleMethod( GuiControl, setExtent, void, ( const char* extOrX, const char* y ), (""),
|
||||
DefineEngineMethod( GuiControl, setExtent, void, ( const char* extOrX, const char* y ), (""),
|
||||
"( Point2I p | int x, int y ) Set the width and height of the control.\n\n"
|
||||
"@hide" )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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.")
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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() )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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];
|
||||
|
|
@ -77,7 +77,7 @@ DefineConsoleMethod( GuiFilterCtrl, getValue, const char*, (), , "Return a tuple
|
|||
return buffer;
|
||||
}
|
||||
|
||||
ConsoleMethod( GuiFilterCtrl, setValue, void, 3, 20, "(f1, f2, ...)"
|
||||
DefineEngineStringlyVariadicMethod( GuiFilterCtrl, setValue, void, 3, 20, "(f1, f2, ...)"
|
||||
"Reset the filter to use the specified points, spread equidistantly across the domain."
|
||||
"@internal")
|
||||
{
|
||||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -407,7 +407,7 @@ DefineEngineMethod( GuiGraphCtrl, setGraphType, void, ( S32 plotId, GuiGraphType
|
|||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
ConsoleMethod( GuiGraphCtrl, matchScale, void, 3, GuiGraphCtrl::MaxPlots + 2, "( int plotID1, int plotID2, ... ) "
|
||||
DefineEngineStringlyVariadicMethod( GuiGraphCtrl, matchScale, void, 3, GuiGraphCtrl::MaxPlots + 2, "( int plotID1, int plotID2, ... ) "
|
||||
"Set the scale of all specified plots to the maximum scale among them.\n\n"
|
||||
"@param plotID1 Index of plotting curve.\n"
|
||||
"@param plotID2 Index of plotting curve." )
|
||||
|
|
|
|||
|
|
@ -601,13 +601,12 @@ void GuiInspectorTypeFileName::updateValue()
|
|||
}
|
||||
}
|
||||
|
||||
ConsoleMethod( GuiInspectorTypeFileName, apply, void, 3,3, "apply(newValue);" )
|
||||
DefineEngineMethod(GuiInspectorTypeFileName, apply, void, (String path), , "")
|
||||
{
|
||||
String path( (const char*)argv[2] );
|
||||
if ( path.isNotEmpty() )
|
||||
path = Platform::makeRelativePathName( path, Platform::getMainDotCsDir() );
|
||||
|
||||
object->setData( path.c_str() );
|
||||
if (path.isNotEmpty())
|
||||
path = Platform::makeRelativePathName(path, Platform::getMainDotCsDir());
|
||||
|
||||
object->setData(path.c_str());
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1501,7 +1500,7 @@ void GuiInspectorTypeBitMask32::updateData()
|
|||
setData( data );
|
||||
}
|
||||
|
||||
ConsoleMethod( GuiInspectorTypeBitMask32, applyBit, void, 2,2, "apply();" )
|
||||
DefineEngineMethod( GuiInspectorTypeBitMask32, applyBit, void, (),, "" )
|
||||
{
|
||||
object->updateData();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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.")
|
||||
{
|
||||
|
|
|
|||
|
|
@ -469,7 +469,7 @@ void GuiInspectorComponentGroup::onRightMouseUp(const GuiEvent &event)
|
|||
Con::executef(this, "onRightMouseUp", event.mousePoint);
|
||||
}
|
||||
|
||||
ConsoleMethod(GuiInspectorComponentGroup, inspectGroup, bool, 2, 2, "Refreshes the dynamic fields in the inspector.")
|
||||
DefineEngineMethod(GuiInspectorComponentGroup, inspectGroup, bool, (),, "Refreshes the dynamic fields in the inspector.")
|
||||
{
|
||||
return object->inspectGroup();
|
||||
}
|
||||
|
|
@ -515,16 +515,17 @@ AbstractClassRep::Field* GuiInspectorComponentGroup::findObjectBehaviorField(Com
|
|||
}
|
||||
return NULL;
|
||||
}
|
||||
ConsoleMethod(GuiInspectorComponentGroup, addDynamicField, void, 2, 2, "obj.addDynamicField();")
|
||||
|
||||
DefineEngineMethod(GuiInspectorComponentGroup, addDynamicField, void, (), , "obj.addDynamicField();")
|
||||
{
|
||||
object->addDynamicField();
|
||||
}
|
||||
|
||||
ConsoleMethod(GuiInspectorComponentGroup, removeDynamicField, void, 3, 3, "")
|
||||
DefineEngineMethod(GuiInspectorComponentGroup, removeDynamicField, void, (), , "")
|
||||
{
|
||||
}
|
||||
|
||||
DefineConsoleMethod(GuiInspectorComponentGroup, getComponent, S32, (), ,"")
|
||||
DefineEngineMethod(GuiInspectorComponentGroup, getComponent, S32, (), , "")
|
||||
{
|
||||
return object->getComponent()->getId();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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, (), , "" )
|
||||
{
|
||||
}
|
||||
|
|
|
|||
|
|
@ -87,7 +87,8 @@ void GuiInspectorEntityGroup::onMouseMove(const GuiEvent &event)
|
|||
{
|
||||
//mParent->mOverDivider = false;
|
||||
}
|
||||
ConsoleMethod(GuiInspectorEntityGroup, inspectGroup, bool, 2, 2, "Refreshes the dynamic fields in the inspector.")
|
||||
|
||||
DefineEngineMethod(GuiInspectorEntityGroup, inspectGroup, bool, (),, "Refreshes the dynamic fields in the inspector.")
|
||||
{
|
||||
return object->inspectGroup();
|
||||
}
|
||||
|
|
@ -128,11 +129,12 @@ AbstractClassRep::Field* GuiInspectorEntityGroup::findObjectBehaviorField(Compon
|
|||
}
|
||||
return NULL;
|
||||
}
|
||||
ConsoleMethod(GuiInspectorEntityGroup, addDynamicField, void, 2, 2, "obj.addDynamicField();")
|
||||
|
||||
DefineEngineMethod(GuiInspectorEntityGroup, addDynamicField, void, (), , "obj.addDynamicField();")
|
||||
{
|
||||
object->addDynamicField();
|
||||
}
|
||||
|
||||
ConsoleMethod(GuiInspectorEntityGroup, removeDynamicField, void, 3, 3, "")
|
||||
DefineEngineMethod(GuiInspectorEntityGroup, removeDynamicField, void, (), , "")
|
||||
{
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -242,7 +242,8 @@ void GuiInspectorMountingGroup::onMouseMove(const GuiEvent &event)
|
|||
//mParent->mOverDivider = false;
|
||||
bool test = false;
|
||||
}
|
||||
ConsoleMethod(GuiInspectorMountingGroup, inspectGroup, bool, 2, 2, "Refreshes the dynamic fields in the inspector.")
|
||||
|
||||
DefineEngineMethod(GuiInspectorMountingGroup, inspectGroup, bool, (),, "Refreshes the dynamic fields in the inspector.")
|
||||
{
|
||||
return object->inspectGroup();
|
||||
}
|
||||
|
|
@ -319,12 +320,13 @@ AbstractClassRep::Field* GuiInspectorMountingGroup::findObjectComponentField(Com
|
|||
}
|
||||
return NULL;
|
||||
}
|
||||
ConsoleMethod( GuiInspectorMountingGroup, addDynamicField, void, 2, 2, "obj.addDynamicField();" )
|
||||
|
||||
DefineEngineMethod(GuiInspectorMountingGroup, addDynamicField, void, (), , "obj.addDynamicField();")
|
||||
{
|
||||
object->addDynamicField();
|
||||
}
|
||||
|
||||
ConsoleMethod( GuiInspectorMountingGroup, removeDynamicField, void, 3, 3, "" )
|
||||
DefineEngineMethod(GuiInspectorMountingGroup, removeDynamicField, void, (), , "")
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
@ -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 );
|
||||
}
|
||||
|
|
@ -456,17 +456,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)
|
||||
|
|
@ -477,45 +477,45 @@ 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, clearItems, void, (), , "()")
|
||||
DefineEngineMethod(PopupMenu, clearItems, void, (), , "()")
|
||||
{
|
||||
return object->clearItems();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
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);
|
||||
|
|
|
|||
|
|
@ -177,13 +177,13 @@ ConsoleDocClass( GuiIdleCamFadeBitmapCtrl,
|
|||
"This is going to be deprecated, and any useful code ported to FadeinBitmap\n\n"
|
||||
"@internal");
|
||||
|
||||
DefineConsoleMethod(GuiIdleCamFadeBitmapCtrl, fadeIn, void, (), , "()"
|
||||
DefineEngineMethod(GuiIdleCamFadeBitmapCtrl, fadeIn, void, (), , "()"
|
||||
"@internal")
|
||||
{
|
||||
object->fadeIn();
|
||||
}
|
||||
|
||||
DefineConsoleMethod(GuiIdleCamFadeBitmapCtrl, fadeOut, void, (), , "()"
|
||||
DefineEngineMethod(GuiIdleCamFadeBitmapCtrl, fadeOut, void, (), , "()"
|
||||
"@internal")
|
||||
{
|
||||
object->fadeOut();
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ static ConsoleDocFragment _setProcessTicks(
|
|||
"void setProcessTicks( bool tick )"
|
||||
);
|
||||
|
||||
DefineConsoleMethod( GuiTickCtrl, setProcessTicks, void, (bool tick), (true), "( [tick = true] ) - This will set this object to either be processing ticks or not" )
|
||||
DefineEngineMethod( GuiTickCtrl, setProcessTicks, void, (bool tick), (true), "( [tick = true] ) - This will set this object to either be processing ticks or not" )
|
||||
{
|
||||
object->setProcessTicks(tick);
|
||||
}
|
||||
|
|
@ -258,7 +258,7 @@ static ConsoleDocFragment _MessageVectordump2(
|
|||
"MessageVector",
|
||||
"void dump( string filename, string header);");
|
||||
|
||||
DefineConsoleMethod( MessageVector, dump, void, (const char * filename, const char * header), (""), "(string filename, string header=NULL)"
|
||||
DefineEngineMethod( MessageVector, dump, void, (const char * filename, const char * header), (""), "(string filename, string header=NULL)"
|
||||
"Dump the message vector to a file, optionally prefixing a header."
|
||||
"@hide")
|
||||
{
|
||||
|
|
|
|||
|
|
@ -219,7 +219,7 @@ void CreatorTree::sort()
|
|||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
DefineConsoleMethod( CreatorTree, addGroup, S32, (S32 group, const char * name, const char * value), , "(string group, string name, string value)")
|
||||
DefineEngineMethod( CreatorTree, addGroup, S32, (S32 group, const char * name, const char * value), , "(string group, string name, string value)")
|
||||
{
|
||||
CreatorTree::Node * grp = object->findNode(group);
|
||||
|
||||
|
|
@ -236,7 +236,7 @@ DefineConsoleMethod( CreatorTree, addGroup, S32, (S32 group, const char * name,
|
|||
return(node ? node->getId() : -1);
|
||||
}
|
||||
|
||||
DefineConsoleMethod( CreatorTree, addItem, S32, (S32 group, const char * name, const char * value), , "(Node group, string name, string value)")
|
||||
DefineEngineMethod( CreatorTree, addItem, S32, (S32 group, const char * name, const char * value), , "(Node group, string name, string value)")
|
||||
{
|
||||
CreatorTree::Node * grp = object->findNode(group);
|
||||
|
||||
|
|
@ -249,7 +249,7 @@ DefineConsoleMethod( CreatorTree, addItem, S32, (S32 group, const char * name, c
|
|||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
DefineConsoleMethod( CreatorTree, fileNameMatch, bool, (const char * world, const char * type, const char * filename), , "(string world, string type, string filename)")
|
||||
DefineEngineMethod( CreatorTree, fileNameMatch, bool, (const char * world, const char * type, const char * filename), , "(string world, string type, string filename)")
|
||||
{
|
||||
// argv[2] - world short
|
||||
// argv[3] - type short
|
||||
|
|
@ -269,12 +269,12 @@ DefineConsoleMethod( CreatorTree, fileNameMatch, bool, (const char * world, cons
|
|||
return(!dStrnicmp(filename+1, type, typeLen));
|
||||
}
|
||||
|
||||
DefineConsoleMethod( CreatorTree, getSelected, S32, (), , "Return a handle to the currently selected item.")
|
||||
DefineEngineMethod( CreatorTree, getSelected, S32, (), , "Return a handle to the currently selected item.")
|
||||
{
|
||||
return(object->getSelected());
|
||||
}
|
||||
|
||||
DefineConsoleMethod( CreatorTree, isGroup, bool, (const char * group), , "(Group g)")
|
||||
DefineEngineMethod( CreatorTree, isGroup, bool, (const char * group), , "(Group g)")
|
||||
{
|
||||
CreatorTree::Node * node = object->findNode(dAtoi(group));
|
||||
if(node && node->isGroup())
|
||||
|
|
@ -282,24 +282,24 @@ DefineConsoleMethod( CreatorTree, isGroup, bool, (const char * group), , "(Group
|
|||
return(false);
|
||||
}
|
||||
|
||||
DefineConsoleMethod( CreatorTree, getName, const char*, (const char * item), , "(Node item)")
|
||||
DefineEngineMethod( CreatorTree, getName, const char*, (const char * item), , "(Node item)")
|
||||
{
|
||||
CreatorTree::Node * node = object->findNode(dAtoi(item));
|
||||
return(node ? node->mName : 0);
|
||||
}
|
||||
|
||||
DefineConsoleMethod( CreatorTree, getValue, const char*, (S32 nodeValue), , "(Node n)")
|
||||
DefineEngineMethod( CreatorTree, getValue, const char*, (S32 nodeValue), , "(Node n)")
|
||||
{
|
||||
CreatorTree::Node * node = object->findNode(nodeValue);
|
||||
return(node ? node->mValue : 0);
|
||||
}
|
||||
|
||||
DefineConsoleMethod( CreatorTree, clear, void, (), , "Clear the tree.")
|
||||
DefineEngineMethod( CreatorTree, clear, void, (), , "Clear the tree.")
|
||||
{
|
||||
object->clear();
|
||||
}
|
||||
|
||||
DefineConsoleMethod( CreatorTree, getParent, S32, (S32 nodeValue), , "(Node n)")
|
||||
DefineEngineMethod( CreatorTree, getParent, S32, (S32 nodeValue), , "(Node n)")
|
||||
{
|
||||
CreatorTree::Node * node = object->findNode(nodeValue);
|
||||
if(node && node->mParent)
|
||||
|
|
|
|||
|
|
@ -702,12 +702,12 @@ void EditTSCtrl::calcOrthoCamOffset(F32 mousex, F32 mousey, U8 modifier)
|
|||
break;
|
||||
|
||||
case DisplayTypeFront:
|
||||
mOrthoCamTrans.x += mousex * mOrthoFOV * camScale;
|
||||
mOrthoCamTrans.x -= mousex * mOrthoFOV * camScale;
|
||||
mOrthoCamTrans.z += mousey * mOrthoFOV * camScale;
|
||||
break;
|
||||
|
||||
case DisplayTypeBack:
|
||||
mOrthoCamTrans.x -= mousex * mOrthoFOV * camScale;
|
||||
mOrthoCamTrans.x += mousex * mOrthoFOV * camScale;
|
||||
mOrthoCamTrans.z += mousey * mOrthoFOV * camScale;
|
||||
break;
|
||||
|
||||
|
|
@ -1125,17 +1125,17 @@ bool EditTSCtrl::processCameraQuery(CameraQuery * query)
|
|||
break;
|
||||
|
||||
case DisplayTypeFront:
|
||||
camRot.setColumn(0, Point3F(-1.0, 0.0, 0.0));
|
||||
camRot.setColumn(1, Point3F( 0.0, -1.0, 0.0));
|
||||
camRot.setColumn(2, Point3F( 0.0, 0.0, 1.0));
|
||||
camPos.y = getMax(camPos.y + smMinSceneBounds.y, sceneBounds.maxExtents.y + camBuffer);
|
||||
camRot.setColumn(0, Point3F(1.0, 0.0, 0.0));
|
||||
camRot.setColumn(1, Point3F(0.0, 1.0, 0.0));
|
||||
camRot.setColumn(2, Point3F(0.0, 0.0, 1.0));
|
||||
camPos.y = getMin(camPos.y - smMinSceneBounds.y, sceneBounds.minExtents.y - camBuffer);
|
||||
break;
|
||||
|
||||
case DisplayTypeBack:
|
||||
camRot.setColumn(0, Point3F(1.0, 0.0, 0.0));
|
||||
camRot.setColumn(1, Point3F(0.0, 1.0, 0.0));
|
||||
camRot.setColumn(2, Point3F(0.0, 0.0, 1.0));
|
||||
camPos.y = getMin(camPos.y - smMinSceneBounds.y, sceneBounds.minExtents.y - camBuffer);
|
||||
camRot.setColumn(0, Point3F(-1.0, 0.0, 0.0));
|
||||
camRot.setColumn(1, Point3F(0.0, -1.0, 0.0));
|
||||
camRot.setColumn(2, Point3F(0.0, 0.0, 1.0));
|
||||
camPos.y = getMax(camPos.y + smMinSceneBounds.y, sceneBounds.maxExtents.y + camBuffer);
|
||||
break;
|
||||
|
||||
case DisplayTypeLeft:
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ static GameBase * getControlObj()
|
|||
return(control);
|
||||
}
|
||||
|
||||
DefineConsoleMethod( EditManager, setBookmark, void, (S32 val), , "(int slot)")
|
||||
DefineEngineMethod( EditManager, setBookmark, void, (S32 val), , "(int slot)")
|
||||
{
|
||||
if(val < 0 || val > 9)
|
||||
return;
|
||||
|
|
@ -138,7 +138,7 @@ DefineConsoleMethod( EditManager, setBookmark, void, (S32 val), , "(int slot)")
|
|||
object->mBookmarks[val] = control->getTransform();
|
||||
}
|
||||
|
||||
DefineConsoleMethod( EditManager, gotoBookmark, void, (S32 val), , "(int slot)")
|
||||
DefineEngineMethod( EditManager, gotoBookmark, void, (S32 val), , "(int slot)")
|
||||
{
|
||||
if(val < 0 || val > 9)
|
||||
return;
|
||||
|
|
@ -148,17 +148,17 @@ DefineConsoleMethod( EditManager, gotoBookmark, void, (S32 val), , "(int slot)")
|
|||
control->setTransform(object->mBookmarks[val]);
|
||||
}
|
||||
|
||||
DefineConsoleMethod( EditManager, editorEnabled, void, (), , "Perform the onEditorEnabled callback on all SimObjects and set gEditingMission true" )
|
||||
DefineEngineMethod( EditManager, editorEnabled, void, (), , "Perform the onEditorEnabled callback on all SimObjects and set gEditingMission true" )
|
||||
{
|
||||
object->editorEnabled();
|
||||
}
|
||||
|
||||
DefineConsoleMethod( EditManager, editorDisabled, void, (), , "Perform the onEditorDisabled callback on all SimObjects and set gEditingMission false" )
|
||||
DefineEngineMethod( EditManager, editorDisabled, void, (), , "Perform the onEditorDisabled callback on all SimObjects and set gEditingMission false" )
|
||||
{
|
||||
object->editorDisabled();
|
||||
}
|
||||
|
||||
DefineConsoleMethod( EditManager, isEditorEnabled, bool, (), , "Return the value of gEditingMission." )
|
||||
DefineEngineMethod( EditManager, isEditorEnabled, bool, (), , "Return the value of gEditingMission." )
|
||||
{
|
||||
return gEditingMission;
|
||||
}
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
#include "platform/platform.h"
|
||||
#include "gui/worldEditor/editorIconRegistry.h"
|
||||
|
||||
#include "console/console.h"
|
||||
#include "console/engineAPI.h"
|
||||
#include "console/simBase.h"
|
||||
|
||||
|
||||
|
|
@ -36,6 +36,8 @@ ConsoleDoc(
|
|||
"@internal"
|
||||
);
|
||||
|
||||
IMPLEMENT_STATIC_CLASS(EditorIconRegistry,, "");
|
||||
|
||||
EditorIconRegistry::EditorIconRegistry()
|
||||
{
|
||||
}
|
||||
|
|
@ -168,51 +170,42 @@ void EditorIconRegistry::clear()
|
|||
mDefaultIcon.free();
|
||||
}
|
||||
|
||||
ConsoleStaticMethod( EditorIconRegistry, add, void, 3, 4, "( String className, String imageFile [, bool overwrite = true] )"
|
||||
DefineEngineStaticMethod( EditorIconRegistry, add, void, (String className, String imageFile, bool overwrite), (true),
|
||||
"@internal")
|
||||
{
|
||||
bool overwrite = true;
|
||||
if ( argc > 3 )
|
||||
overwrite = dAtob( argv[3] );
|
||||
|
||||
gEditorIcons.add( argv[1], argv[2], overwrite );
|
||||
gEditorIcons.add( className, imageFile, overwrite );
|
||||
}
|
||||
|
||||
ConsoleStaticMethod( EditorIconRegistry, loadFromPath, void, 2, 3, "( String imagePath [, bool overwrite = true] )"
|
||||
DefineEngineStaticMethod( EditorIconRegistry, loadFromPath, void, (String imagePath, bool overwrite), (true),
|
||||
"@internal")
|
||||
{
|
||||
bool overwrite = true;
|
||||
if ( argc > 2 )
|
||||
overwrite = dAtob( argv[2] );
|
||||
|
||||
gEditorIcons.loadFromPath( argv[1], overwrite );
|
||||
gEditorIcons.loadFromPath( imagePath, overwrite );
|
||||
}
|
||||
|
||||
ConsoleStaticMethod( EditorIconRegistry, clear, void, 1, 1, ""
|
||||
DefineEngineStaticMethod( EditorIconRegistry, clear, void, (),,
|
||||
"@internal")
|
||||
{
|
||||
gEditorIcons.clear();
|
||||
}
|
||||
|
||||
ConsoleStaticMethod( EditorIconRegistry, findIconByClassName, const char*, 2, 2, "( String className )\n"
|
||||
"Returns the file path to the icon file if found."
|
||||
DefineEngineStaticMethod( EditorIconRegistry, findIconByClassName, const char*, (String className),,
|
||||
"@brief Returns the file path to the icon file if found."
|
||||
"@internal")
|
||||
{
|
||||
GFXTexHandle icon = gEditorIcons.findIcon( argv[1] );
|
||||
GFXTexHandle icon = gEditorIcons.findIcon( className );
|
||||
if ( icon.isNull() )
|
||||
return NULL;
|
||||
|
||||
return icon->mPath;
|
||||
}
|
||||
|
||||
ConsoleStaticMethod( EditorIconRegistry, findIconBySimObject, const char*, 2, 2, "( SimObject )\n"
|
||||
DefineEngineStaticMethod( EditorIconRegistry, findIconBySimObject, const char*, (SimObject* obj),,
|
||||
"Returns the file path to the icon file if found."
|
||||
"@internal")
|
||||
{
|
||||
SimObject *obj = NULL;
|
||||
if ( !Sim::findObject( argv[1], obj ) )
|
||||
if ( !obj )
|
||||
{
|
||||
Con::warnf( "EditorIconRegistry::findIcon, parameter %d was not a SimObject!", (const char*)argv[1] );
|
||||
Con::warnf( "EditorIconRegistry::findIcon, parameter was not a SimObject!");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -30,6 +30,8 @@
|
|||
#include "core/util/tDictionary.h"
|
||||
#endif
|
||||
|
||||
#include "console/engineAPI.h"
|
||||
|
||||
class SimObject;
|
||||
class AbstractClassRep;
|
||||
|
||||
|
|
@ -40,6 +42,7 @@ class AbstractClassRep;
|
|||
class EditorIconRegistry
|
||||
{
|
||||
public:
|
||||
DECLARE_STATIC_CLASS(EditorIconRegistry);
|
||||
|
||||
EditorIconRegistry();
|
||||
~EditorIconRegistry();
|
||||
|
|
|
|||
|
|
@ -46,6 +46,10 @@
|
|||
#include "core/volume.h"
|
||||
#include "gui/worldEditor/worldEditor.h"
|
||||
#include "T3D/prefab.h"
|
||||
#include "T3D/trigger.h"
|
||||
#include "T3D/zone.h"
|
||||
#include "T3D/portal.h"
|
||||
#include "math/mPolyhedron.impl.h"
|
||||
|
||||
IMPLEMENT_CONOBJECT( GuiConvexEditorCtrl );
|
||||
|
||||
|
|
@ -161,6 +165,35 @@ void GuiConvexEditorCtrl::setVisible( bool val )
|
|||
mGizmoProfile->flags = mSavedGizmoFlags;
|
||||
mSavedGizmoFlags = -1;
|
||||
}
|
||||
|
||||
SimGroup* misGroup;
|
||||
if (Sim::findObject("MissionGroup", misGroup))
|
||||
{
|
||||
//Make our proxy objects "real" again
|
||||
for (U32 i = 0; i < mProxyObjects.size(); ++i)
|
||||
{
|
||||
if (!mProxyObjects[i].shapeProxy || !mProxyObjects[i].targetObject)
|
||||
continue;
|
||||
|
||||
AbstractClassRep* classRep = AbstractClassRep::findClassRep(mProxyObjects[i].targetObjectClass);
|
||||
if (!classRep)
|
||||
{
|
||||
Con::errorf("WorldEditor::createPolyhedralObject - No such class: %s", mProxyObjects[i].targetObjectClass);
|
||||
continue;
|
||||
}
|
||||
|
||||
SceneObject* polyObj = createPolyhedralObject(mProxyObjects[i].targetObjectClass.c_str(), mProxyObjects[i].shapeProxy);
|
||||
|
||||
misGroup->addObject(polyObj);
|
||||
|
||||
//Now, remove the convex proxy
|
||||
mProxyObjects[i].shapeProxy->deleteObject();
|
||||
mProxyObjects[i].targetObject->deleteObject();
|
||||
mProxyObjects.erase(i);
|
||||
--i;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -188,6 +221,60 @@ void GuiConvexEditorCtrl::setVisible( bool val )
|
|||
}
|
||||
updateGizmoPos();
|
||||
mSavedGizmoFlags = mGizmoProfile->flags;
|
||||
|
||||
SimGroup* misGroup;
|
||||
if (Sim::findObject("MissionGroup", misGroup))
|
||||
{
|
||||
for (U32 c = 0; c < misGroup->size(); ++c)
|
||||
{
|
||||
bool isTrigger = (misGroup->at(c)->getClassName() == StringTable->insert("Trigger"));
|
||||
bool isZone = (misGroup->at(c)->getClassName() == StringTable->insert("Zone"));
|
||||
bool isPortal = (misGroup->at(c)->getClassName() == StringTable->insert("Portal"));
|
||||
bool isOccluder = (misGroup->at(c)->getClassName() == StringTable->insert("OcclusionVolume"));
|
||||
|
||||
if (isZone || isPortal || isOccluder)
|
||||
{
|
||||
SceneObject* sceneObj = static_cast<SceneObject*>(misGroup->at(c));
|
||||
if (!sceneObj)
|
||||
{
|
||||
Con::errorf("WorldEditor::createConvexShapeFrom - Invalid object");
|
||||
continue;
|
||||
}
|
||||
|
||||
ConvexShape* proxyShape = createConvexShapeFrom(sceneObj);
|
||||
|
||||
//Set the texture to a representatory one so we know what's what
|
||||
if (isTrigger)
|
||||
proxyShape->mMaterialName = "TriggerProxyMaterial";
|
||||
else if (isPortal)
|
||||
proxyShape->mMaterialName = "PortalProxyMaterial";
|
||||
else if (isZone)
|
||||
proxyShape->mMaterialName = "ZoneProxyMaterial";
|
||||
else if (isOccluder)
|
||||
proxyShape->mMaterialName = "OccluderProxyMaterial";
|
||||
|
||||
proxyShape->_updateMaterial();
|
||||
|
||||
sceneObj->setHidden(true);
|
||||
|
||||
//set up the proxy object
|
||||
ConvexShapeProxy newProxy;
|
||||
newProxy.shapeProxy = proxyShape;
|
||||
newProxy.targetObject = sceneObj;
|
||||
|
||||
if (isTrigger)
|
||||
newProxy.targetObjectClass = "Trigger";
|
||||
else if (isPortal)
|
||||
newProxy.targetObjectClass = "Portal";
|
||||
else if (isZone)
|
||||
newProxy.targetObjectClass = "Zone";
|
||||
else
|
||||
newProxy.targetObjectClass = "OcclusionVolume";
|
||||
|
||||
mProxyObjects.push_back(newProxy);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -438,6 +525,8 @@ void GuiConvexEditorCtrl::on3DMouseDragged(const Gui3DMouseEvent & event)
|
|||
|
||||
setupShape( newShape );
|
||||
|
||||
newShape->setField("material", mConvexSEL->getMaterialName());
|
||||
|
||||
submitUndo( CreateShape, newShape );
|
||||
|
||||
setSelection( newShape, -1 );
|
||||
|
|
@ -2033,7 +2122,8 @@ ConvexShape* ConvexEditorCreateTool::extrudeShapeFromFace( ConvexShape *inShape,
|
|||
surf.mulL( worldToShape );
|
||||
}
|
||||
|
||||
newShape->setField( "material", Parent::mEditor->mMaterialName );
|
||||
//newShape->setField( "material", Parent::mEditor->mMaterialName );
|
||||
newShape->setField("material", inShape->getMaterialName());
|
||||
|
||||
newShape->registerObject();
|
||||
mEditor->updateShape( newShape );
|
||||
|
|
@ -2179,43 +2269,248 @@ void GuiConvexEditorCtrl::splitSelectedFace()
|
|||
updateGizmoPos();
|
||||
}
|
||||
|
||||
DefineConsoleMethod( GuiConvexEditorCtrl, hollowSelection, void, (), , "" )
|
||||
SceneObject* GuiConvexEditorCtrl::createPolyhedralObject(const char* className, SceneObject* geometryProvider)
|
||||
{
|
||||
if (!geometryProvider)
|
||||
{
|
||||
Con::errorf("WorldEditor::createPolyhedralObject - Invalid geometry provider!");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!className || !className[0])
|
||||
{
|
||||
Con::errorf("WorldEditor::createPolyhedralObject - Invalid class name");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
AbstractClassRep* classRep = AbstractClassRep::findClassRep(className);
|
||||
if (!classRep)
|
||||
{
|
||||
Con::errorf("WorldEditor::createPolyhedralObject - No such class: %s", className);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// We don't want the extracted poly list to be affected by the object's
|
||||
// current transform and scale so temporarily reset them.
|
||||
|
||||
MatrixF savedTransform = geometryProvider->getTransform();
|
||||
Point3F savedScale = geometryProvider->getScale();
|
||||
|
||||
geometryProvider->setTransform(MatrixF::Identity);
|
||||
geometryProvider->setScale(Point3F(1.f, 1.f, 1.f));
|
||||
|
||||
// Extract the geometry. Use the object-space bounding volumes
|
||||
// as we have moved the object to the origin for the moment.
|
||||
|
||||
OptimizedPolyList polyList;
|
||||
if (!geometryProvider->buildPolyList(PLC_Export, &polyList, geometryProvider->getObjBox(), geometryProvider->getObjBox().getBoundingSphere()))
|
||||
{
|
||||
Con::errorf("WorldEditor::createPolyhedralObject - Failed to extract geometry!");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// Restore the object's original transform.
|
||||
|
||||
geometryProvider->setTransform(savedTransform);
|
||||
geometryProvider->setScale(savedScale);
|
||||
|
||||
// Create the object.
|
||||
|
||||
SceneObject* object = dynamic_cast< SceneObject* >(classRep->create());
|
||||
if (!Object)
|
||||
{
|
||||
Con::errorf("WorldEditor::createPolyhedralObject - Could not create SceneObject with class '%s'", className);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// Convert the polylist to a polyhedron.
|
||||
|
||||
Polyhedron polyhedron = polyList.toPolyhedron();
|
||||
|
||||
// Add the vertex data.
|
||||
|
||||
const U32 numPoints = polyhedron.getNumPoints();
|
||||
const Point3F* points = polyhedron.getPoints();
|
||||
|
||||
for (U32 i = 0; i < numPoints; ++i)
|
||||
{
|
||||
static StringTableEntry sPoint = StringTable->insert("point");
|
||||
object->setDataField(sPoint, NULL, EngineMarshallData(points[i]));
|
||||
}
|
||||
|
||||
// Add the plane data.
|
||||
|
||||
const U32 numPlanes = polyhedron.getNumPlanes();
|
||||
const PlaneF* planes = polyhedron.getPlanes();
|
||||
|
||||
for (U32 i = 0; i < numPlanes; ++i)
|
||||
{
|
||||
static StringTableEntry sPlane = StringTable->insert("plane");
|
||||
const PlaneF& plane = planes[i];
|
||||
|
||||
char buffer[1024];
|
||||
dSprintf(buffer, sizeof(buffer), "%g %g %g %g", plane.x, plane.y, plane.z, plane.d);
|
||||
|
||||
object->setDataField(sPlane, NULL, buffer);
|
||||
}
|
||||
|
||||
// Add the edge data.
|
||||
|
||||
const U32 numEdges = polyhedron.getNumEdges();
|
||||
const Polyhedron::Edge* edges = polyhedron.getEdges();
|
||||
|
||||
for (U32 i = 0; i < numEdges; ++i)
|
||||
{
|
||||
static StringTableEntry sEdge = StringTable->insert("edge");
|
||||
const Polyhedron::Edge& edge = edges[i];
|
||||
|
||||
char buffer[1024];
|
||||
dSprintf(buffer, sizeof(buffer), "%i %i %i %i ",
|
||||
edge.face[0], edge.face[1],
|
||||
edge.vertex[0], edge.vertex[1]
|
||||
);
|
||||
|
||||
object->setDataField(sEdge, NULL, buffer);
|
||||
}
|
||||
|
||||
// Set the transform.
|
||||
|
||||
object->setTransform(savedTransform);
|
||||
object->setScale(savedScale);
|
||||
|
||||
// Register and return the object.
|
||||
|
||||
if (!object->registerObject())
|
||||
{
|
||||
Con::errorf("WorldEditor::createPolyhedralObject - Failed to register object!");
|
||||
delete object;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return object;
|
||||
}
|
||||
|
||||
ConvexShape* GuiConvexEditorCtrl::createConvexShapeFrom(SceneObject* polyObject)
|
||||
{
|
||||
if (!polyObject)
|
||||
{
|
||||
Con::errorf("WorldEditor::createConvexShapeFrom - Invalid object");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
IScenePolyhedralObject* iPoly = dynamic_cast< IScenePolyhedralObject* >(polyObject);
|
||||
if (!iPoly)
|
||||
{
|
||||
Con::errorf("WorldEditor::createConvexShapeFrom - Not a polyhedral object!");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// Get polyhedron.
|
||||
|
||||
AnyPolyhedron polyhedron = iPoly->ToAnyPolyhedron();
|
||||
const U32 numPlanes = polyhedron.getNumPlanes();
|
||||
if (!numPlanes)
|
||||
{
|
||||
Con::errorf("WorldEditor::createConvexShapeFrom - Object returned no valid polyhedron");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// Create a ConvexShape.
|
||||
|
||||
ConvexShape* shape = new ConvexShape();
|
||||
|
||||
// Add all planes.
|
||||
|
||||
for (U32 i = 0; i < numPlanes; ++i)
|
||||
{
|
||||
const PlaneF& plane = polyhedron.getPlanes()[i];
|
||||
|
||||
// Polyhedron planes are facing inwards so we need to
|
||||
// invert the normal here.
|
||||
|
||||
Point3F normal = plane.getNormal();
|
||||
normal.neg();
|
||||
|
||||
// Turn the orientation of the plane into a quaternion.
|
||||
// The normal is our up vector (that's what's expected
|
||||
// by ConvexShape for the surface orientation).
|
||||
|
||||
MatrixF orientation(true);
|
||||
MathUtils::getMatrixFromUpVector(normal, &orientation);
|
||||
const QuatF quat(orientation);
|
||||
|
||||
// Get the plane position.
|
||||
|
||||
const Point3F position = plane.getPosition();
|
||||
|
||||
// Turn everything into a "surface" property for the ConvexShape.
|
||||
|
||||
char buffer[1024];
|
||||
dSprintf(buffer, sizeof(buffer), "%g %g %g %g %g %g %g",
|
||||
quat.x, quat.y, quat.z, quat.w,
|
||||
position.x, position.y, position.z
|
||||
);
|
||||
|
||||
// Add the surface.
|
||||
|
||||
static StringTableEntry sSurface = StringTable->insert("surface");
|
||||
shape->setDataField(sSurface, NULL, buffer);
|
||||
}
|
||||
|
||||
// Copy the transform.
|
||||
|
||||
shape->setTransform(polyObject->getTransform());
|
||||
shape->setScale(polyObject->getScale());
|
||||
|
||||
// Register the shape.
|
||||
|
||||
if (!shape->registerObject())
|
||||
{
|
||||
Con::errorf("WorldEditor::createConvexShapeFrom - Could not register ConvexShape!");
|
||||
delete shape;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return shape;
|
||||
}
|
||||
|
||||
DefineEngineMethod( GuiConvexEditorCtrl, hollowSelection, void, (), , "" )
|
||||
{
|
||||
object->hollowSelection();
|
||||
}
|
||||
|
||||
DefineConsoleMethod( GuiConvexEditorCtrl, recenterSelection, void, (), , "" )
|
||||
DefineEngineMethod( GuiConvexEditorCtrl, recenterSelection, void, (), , "" )
|
||||
{
|
||||
object->recenterSelection();
|
||||
}
|
||||
|
||||
DefineConsoleMethod( GuiConvexEditorCtrl, hasSelection, S32, (), , "" )
|
||||
DefineEngineMethod( GuiConvexEditorCtrl, hasSelection, S32, (), , "" )
|
||||
{
|
||||
return object->hasSelection();
|
||||
}
|
||||
|
||||
DefineConsoleMethod( GuiConvexEditorCtrl, handleDelete, void, (), , "" )
|
||||
DefineEngineMethod( GuiConvexEditorCtrl, handleDelete, void, (), , "" )
|
||||
{
|
||||
object->handleDelete();
|
||||
}
|
||||
|
||||
DefineConsoleMethod( GuiConvexEditorCtrl, handleDeselect, void, (), , "" )
|
||||
DefineEngineMethod( GuiConvexEditorCtrl, handleDeselect, void, (), , "" )
|
||||
{
|
||||
object->handleDeselect();
|
||||
}
|
||||
|
||||
DefineConsoleMethod( GuiConvexEditorCtrl, dropSelectionAtScreenCenter, void, (), , "" )
|
||||
DefineEngineMethod( GuiConvexEditorCtrl, dropSelectionAtScreenCenter, void, (), , "" )
|
||||
{
|
||||
object->dropSelectionAtScreenCenter();
|
||||
}
|
||||
|
||||
DefineConsoleMethod( GuiConvexEditorCtrl, selectConvex, void, (ConvexShape *convex), , "( ConvexShape )" )
|
||||
DefineEngineMethod( GuiConvexEditorCtrl, selectConvex, void, (ConvexShape *convex), , "( ConvexShape )" )
|
||||
{
|
||||
if (convex)
|
||||
object->setSelection( convex, -1 );
|
||||
}
|
||||
|
||||
DefineConsoleMethod( GuiConvexEditorCtrl, splitSelectedFace, void, (), , "" )
|
||||
DefineEngineMethod( GuiConvexEditorCtrl, splitSelectedFace, void, (), , "" )
|
||||
{
|
||||
object->splitSelectedFace();
|
||||
}
|
||||
|
|
@ -114,6 +114,8 @@ public:
|
|||
void dropSelectionAtScreenCenter();
|
||||
void splitSelectedFace();
|
||||
|
||||
SceneObject* createPolyhedralObject(const char* className, SceneObject* geometryProvider);
|
||||
ConvexShape* createConvexShapeFrom(SceneObject* polyObject);
|
||||
/// Interface with Tools.
|
||||
/// @{
|
||||
|
||||
|
|
@ -192,6 +194,16 @@ protected:
|
|||
UndoAction *mLastUndo;
|
||||
UndoManager *mUndoManager;
|
||||
|
||||
struct ConvexShapeProxy
|
||||
{
|
||||
ConvexShape* shapeProxy;
|
||||
SceneObject* targetObject;
|
||||
String targetObjectClass;
|
||||
bool dirty;
|
||||
};
|
||||
|
||||
Vector<ConvexShapeProxy> mProxyObjects;
|
||||
|
||||
ConvexEditorTool *mActiveTool;
|
||||
ConvexEditorCreateTool *mCreateTool;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -784,12 +784,12 @@ void GuiDecalEditorCtrl::setMode( String mode, bool sourceShortcut = false )
|
|||
Con::executef( this, "paletteSync", mMode );
|
||||
}
|
||||
|
||||
DefineConsoleMethod( GuiDecalEditorCtrl, deleteSelectedDecal, void, (), , "deleteSelectedDecal()" )
|
||||
DefineEngineMethod( GuiDecalEditorCtrl, deleteSelectedDecal, void, (), , "deleteSelectedDecal()" )
|
||||
{
|
||||
object->deleteSelectedDecal();
|
||||
}
|
||||
|
||||
DefineConsoleMethod( GuiDecalEditorCtrl, deleteDecalDatablock, void, ( const char * datablock ), , "deleteSelectedDecalDatablock( String datablock )" )
|
||||
DefineEngineMethod( GuiDecalEditorCtrl, deleteDecalDatablock, void, ( const char * datablock ), , "deleteSelectedDecalDatablock( String datablock )" )
|
||||
{
|
||||
String lookupName( datablock );
|
||||
if( lookupName == String::EmptyString )
|
||||
|
|
@ -798,22 +798,22 @@ DefineConsoleMethod( GuiDecalEditorCtrl, deleteDecalDatablock, void, ( const cha
|
|||
object->deleteDecalDatablock( lookupName );
|
||||
}
|
||||
|
||||
DefineConsoleMethod( GuiDecalEditorCtrl, setMode, void, ( String newMode ), , "setMode( String mode )()" )
|
||||
DefineEngineMethod( GuiDecalEditorCtrl, setMode, void, ( String newMode ), , "setMode( String mode )()" )
|
||||
{
|
||||
object->setMode( newMode );
|
||||
}
|
||||
|
||||
DefineConsoleMethod( GuiDecalEditorCtrl, getMode, const char*, (), , "getMode()" )
|
||||
DefineEngineMethod( GuiDecalEditorCtrl, getMode, const char*, (), , "getMode()" )
|
||||
{
|
||||
return object->mMode;
|
||||
}
|
||||
|
||||
DefineConsoleMethod( GuiDecalEditorCtrl, getDecalCount, S32, (), , "getDecalCount()" )
|
||||
DefineEngineMethod( GuiDecalEditorCtrl, getDecalCount, S32, (), , "getDecalCount()" )
|
||||
{
|
||||
return gDecalManager->mDecalInstanceVec.size();
|
||||
}
|
||||
|
||||
DefineConsoleMethod( GuiDecalEditorCtrl, getDecalTransform, const char*, ( U32 id ), , "getDecalTransform()" )
|
||||
DefineEngineMethod( GuiDecalEditorCtrl, getDecalTransform, const char*, ( U32 id ), , "getDecalTransform()" )
|
||||
{
|
||||
DecalInstance *decalInstance = gDecalManager->mDecalInstanceVec[id];
|
||||
|
||||
|
|
@ -835,7 +835,7 @@ DefineConsoleMethod( GuiDecalEditorCtrl, getDecalTransform, const char*, ( U32 i
|
|||
return returnBuffer;
|
||||
}
|
||||
|
||||
DefineConsoleMethod( GuiDecalEditorCtrl, getDecalLookupName, const char*, ( U32 id ), , "getDecalLookupName( S32 )()" )
|
||||
DefineEngineMethod( GuiDecalEditorCtrl, getDecalLookupName, const char*, ( U32 id ), , "getDecalLookupName( S32 )()" )
|
||||
{
|
||||
DecalInstance *decalInstance = gDecalManager->mDecalInstanceVec[id];
|
||||
if( decalInstance == NULL )
|
||||
|
|
@ -844,7 +844,7 @@ DefineConsoleMethod( GuiDecalEditorCtrl, getDecalLookupName, const char*, ( U32
|
|||
return decalInstance->mDataBlock->lookupName;
|
||||
}
|
||||
|
||||
DefineConsoleMethod( GuiDecalEditorCtrl, selectDecal, void, ( U32 id ), , "selectDecal( S32 )()" )
|
||||
DefineEngineMethod( GuiDecalEditorCtrl, selectDecal, void, ( U32 id ), , "selectDecal( S32 )()" )
|
||||
{
|
||||
DecalInstance *decalInstance = gDecalManager->mDecalInstanceVec[id];
|
||||
if( decalInstance == NULL )
|
||||
|
|
@ -853,7 +853,7 @@ DefineConsoleMethod( GuiDecalEditorCtrl, selectDecal, void, ( U32 id ), , "selec
|
|||
object->selectDecal( decalInstance );
|
||||
}
|
||||
|
||||
DefineConsoleMethod( GuiDecalEditorCtrl, editDecalDetails, void, ( U32 id, Point3F pos, Point3F tan,F32 size ), , "editDecalDetails( S32 )()" )
|
||||
DefineEngineMethod( GuiDecalEditorCtrl, editDecalDetails, void, ( U32 id, Point3F pos, Point3F tan,F32 size ), , "editDecalDetails( S32 )()" )
|
||||
{
|
||||
DecalInstance *decalInstance = gDecalManager->mDecalInstanceVec[id];
|
||||
if( decalInstance == NULL )
|
||||
|
|
@ -872,14 +872,14 @@ DefineConsoleMethod( GuiDecalEditorCtrl, editDecalDetails, void, ( U32 id, Point
|
|||
gDecalManager->notifyDecalModified( decalInstance );
|
||||
}
|
||||
|
||||
DefineConsoleMethod( GuiDecalEditorCtrl, getSelectionCount, S32, (), , "" )
|
||||
DefineEngineMethod( GuiDecalEditorCtrl, getSelectionCount, S32, (), , "" )
|
||||
{
|
||||
if ( object->mSELDecal != NULL )
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
DefineConsoleMethod( GuiDecalEditorCtrl, retargetDecalDatablock, void, ( const char * dbFrom, const char * dbTo ), , "" )
|
||||
DefineEngineMethod( GuiDecalEditorCtrl, retargetDecalDatablock, void, ( const char * dbFrom, const char * dbTo ), , "" )
|
||||
{
|
||||
if( dStrcmp( dbFrom, "" ) != 0 && dStrcmp( dbTo, "" ) != 0 )
|
||||
object->retargetDecalDatablock( dbFrom, dbTo );
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ void GuiMissionAreaEditorCtrl::setSelectedMissionArea( MissionArea *missionArea
|
|||
Con::executef( this, "onMissionAreaSelected" );
|
||||
}
|
||||
|
||||
DefineConsoleMethod( GuiMissionAreaEditorCtrl, setSelectedMissionArea, void, (const char * missionAreaName), (""), "" )
|
||||
DefineEngineMethod( GuiMissionAreaEditorCtrl, setSelectedMissionArea, void, (const char * missionAreaName), (""), "" )
|
||||
{
|
||||
if ( dStrcmp( missionAreaName, "" )==0 )
|
||||
object->setSelectedMissionArea(NULL);
|
||||
|
|
@ -107,7 +107,7 @@ DefineConsoleMethod( GuiMissionAreaEditorCtrl, setSelectedMissionArea, void, (co
|
|||
}
|
||||
}
|
||||
|
||||
DefineConsoleMethod( GuiMissionAreaEditorCtrl, getSelectedMissionArea, const char*, (), , "" )
|
||||
DefineEngineMethod( GuiMissionAreaEditorCtrl, getSelectedMissionArea, const char*, (), , "" )
|
||||
{
|
||||
MissionArea *missionArea = object->getSelectedMissionArea();
|
||||
if ( !missionArea )
|
||||
|
|
|
|||
|
|
@ -88,35 +88,35 @@ void GuiTerrPreviewCtrl::initPersistFields()
|
|||
}
|
||||
|
||||
|
||||
DefineConsoleMethod( GuiTerrPreviewCtrl, reset, void, (), , "Reset the view of the terrain.")
|
||||
DefineEngineMethod( GuiTerrPreviewCtrl, reset, void, (), , "Reset the view of the terrain.")
|
||||
{
|
||||
object->reset();
|
||||
}
|
||||
|
||||
DefineConsoleMethod( GuiTerrPreviewCtrl, setRoot, void, (), , "Add the origin to the root and reset the origin.")
|
||||
DefineEngineMethod( GuiTerrPreviewCtrl, setRoot, void, (), , "Add the origin to the root and reset the origin.")
|
||||
{
|
||||
object->setRoot();
|
||||
}
|
||||
|
||||
DefineConsoleMethod( GuiTerrPreviewCtrl, getRoot, Point2F, (), , "Return a Point2F representing the position of the root.")
|
||||
DefineEngineMethod( GuiTerrPreviewCtrl, getRoot, Point2F, (), , "Return a Point2F representing the position of the root.")
|
||||
{
|
||||
return object->getRoot();
|
||||
|
||||
}
|
||||
|
||||
DefineConsoleMethod( GuiTerrPreviewCtrl, setOrigin, void, (Point2F pos), , "(float x, float y)"
|
||||
DefineEngineMethod( GuiTerrPreviewCtrl, setOrigin, void, (Point2F pos), , "(float x, float y)"
|
||||
"Set the origin of the view.")
|
||||
{
|
||||
object->setOrigin( pos );
|
||||
}
|
||||
|
||||
DefineConsoleMethod( GuiTerrPreviewCtrl, getOrigin, Point2F, (), , "Return a Point2F containing the position of the origin.")
|
||||
DefineEngineMethod( GuiTerrPreviewCtrl, getOrigin, Point2F, (), , "Return a Point2F containing the position of the origin.")
|
||||
{
|
||||
return object->getOrigin();
|
||||
|
||||
}
|
||||
|
||||
DefineConsoleMethod( GuiTerrPreviewCtrl, getValue, const char*, (), , "Returns a 4-tuple containing: root_x root_y origin_x origin_y")
|
||||
DefineEngineMethod( GuiTerrPreviewCtrl, getValue, const char*, (), , "Returns a 4-tuple containing: root_x root_y origin_x origin_y")
|
||||
{
|
||||
Point2F r = object->getRoot();
|
||||
Point2F o = object->getOrigin();
|
||||
|
|
@ -126,7 +126,7 @@ DefineConsoleMethod( GuiTerrPreviewCtrl, getValue, const char*, (), , "Returns a
|
|||
return valuebuf;
|
||||
}
|
||||
|
||||
DefineConsoleMethod( GuiTerrPreviewCtrl, setValue, void, (const char * tuple), , "Accepts a 4-tuple in the same form as getValue returns.\n\n"
|
||||
DefineEngineMethod( GuiTerrPreviewCtrl, setValue, void, (const char * tuple), , "Accepts a 4-tuple in the same form as getValue returns.\n\n"
|
||||
"@see GuiTerrPreviewCtrl::getValue()")
|
||||
{
|
||||
Point2F r,o;
|
||||
|
|
|
|||
|
|
@ -795,7 +795,7 @@ void TerrainSmoothAction::smooth( TerrainBlock *terrain, F32 factor, U32 steps )
|
|||
redo();
|
||||
}
|
||||
|
||||
DefineConsoleMethod( TerrainSmoothAction, smooth, void, ( TerrainBlock *terrain, F32 factor, U32 steps ), , "( TerrainBlock obj, F32 factor, U32 steps )")
|
||||
DefineEngineMethod( TerrainSmoothAction, smooth, void, ( TerrainBlock *terrain, F32 factor, U32 steps ), , "( TerrainBlock obj, F32 factor, U32 steps )")
|
||||
{
|
||||
if (terrain)
|
||||
object->smooth( terrain, factor, mClamp( steps, 1, 13 ) );
|
||||
|
|
|
|||
|
|
@ -2403,7 +2403,7 @@ void TerrainEditor::reorderMaterial( S32 index, S32 orderPos )
|
|||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
DefineConsoleMethod( TerrainEditor, attachTerrain, void, (const char * terrain), (""), "(TerrainBlock terrain)")
|
||||
DefineEngineMethod( TerrainEditor, attachTerrain, void, (const char * terrain), (""), "(TerrainBlock terrain)")
|
||||
{
|
||||
SimSet * missionGroup = dynamic_cast<SimSet*>(Sim::findObject("MissionGroup"));
|
||||
if (!missionGroup)
|
||||
|
|
@ -2459,12 +2459,12 @@ DefineConsoleMethod( TerrainEditor, attachTerrain, void, (const char * terrain),
|
|||
}
|
||||
}
|
||||
|
||||
DefineConsoleMethod( TerrainEditor, getTerrainBlockCount, S32, (), , "()")
|
||||
DefineEngineMethod( TerrainEditor, getTerrainBlockCount, S32, (), , "()")
|
||||
{
|
||||
return object->getTerrainBlockCount();
|
||||
}
|
||||
|
||||
DefineConsoleMethod( TerrainEditor, getTerrainBlock, S32, (S32 index), , "(S32 index)")
|
||||
DefineEngineMethod( TerrainEditor, getTerrainBlock, S32, (S32 index), , "(S32 index)")
|
||||
{
|
||||
TerrainBlock* tb = object->getTerrainBlock(index);
|
||||
if(!tb)
|
||||
|
|
@ -2473,7 +2473,7 @@ DefineConsoleMethod( TerrainEditor, getTerrainBlock, S32, (S32 index), , "(S32 i
|
|||
return tb->getId();
|
||||
}
|
||||
|
||||
DefineConsoleMethod(TerrainEditor, getTerrainBlocksMaterialList, const char *, (), , "() gets the list of current terrain materials for all terrain blocks.")
|
||||
DefineEngineMethod(TerrainEditor, getTerrainBlocksMaterialList, const char *, (), , "() gets the list of current terrain materials for all terrain blocks.")
|
||||
{
|
||||
Vector<StringTableEntry> list;
|
||||
object->getTerrainBlocksMaterialList(list);
|
||||
|
|
@ -2502,23 +2502,23 @@ DefineConsoleMethod(TerrainEditor, getTerrainBlocksMaterialList, const char *, (
|
|||
return ret;
|
||||
}
|
||||
|
||||
DefineConsoleMethod( TerrainEditor, setBrushType, void, (String type), , "(string type)"
|
||||
DefineEngineMethod( TerrainEditor, setBrushType, void, (String type), , "(string type)"
|
||||
"One of box, ellipse, selection.")
|
||||
{
|
||||
object->setBrushType(type);
|
||||
}
|
||||
|
||||
DefineConsoleMethod( TerrainEditor, getBrushType, const char*, (), , "()")
|
||||
DefineEngineMethod( TerrainEditor, getBrushType, const char*, (), , "()")
|
||||
{
|
||||
return object->getBrushType();
|
||||
}
|
||||
|
||||
DefineConsoleMethod( TerrainEditor, setBrushSize, void, ( S32 w, S32 h), (0), "(int w [, int h])")
|
||||
DefineEngineMethod( TerrainEditor, setBrushSize, void, ( S32 w, S32 h), (0), "(int w [, int h])")
|
||||
{
|
||||
object->setBrushSize( w, h==0?w:h );
|
||||
}
|
||||
|
||||
DefineConsoleMethod( TerrainEditor, getBrushSize, const char*, (), , "()")
|
||||
DefineEngineMethod( TerrainEditor, getBrushSize, const char*, (), , "()")
|
||||
{
|
||||
Point2I size = object->getBrushSize();
|
||||
|
||||
|
|
@ -2528,74 +2528,74 @@ DefineConsoleMethod( TerrainEditor, getBrushSize, const char*, (), , "()")
|
|||
return ret;
|
||||
}
|
||||
|
||||
DefineConsoleMethod( TerrainEditor, setBrushPressure, void, (F32 pressure), , "(float pressure)")
|
||||
DefineEngineMethod( TerrainEditor, setBrushPressure, void, (F32 pressure), , "(float pressure)")
|
||||
{
|
||||
object->setBrushPressure( pressure );
|
||||
}
|
||||
|
||||
DefineConsoleMethod( TerrainEditor, getBrushPressure, F32, (), , "()")
|
||||
DefineEngineMethod( TerrainEditor, getBrushPressure, F32, (), , "()")
|
||||
{
|
||||
return object->getBrushPressure();
|
||||
}
|
||||
|
||||
DefineConsoleMethod( TerrainEditor, setBrushSoftness, void, (F32 softness), , "(float softness)")
|
||||
DefineEngineMethod( TerrainEditor, setBrushSoftness, void, (F32 softness), , "(float softness)")
|
||||
{
|
||||
object->setBrushSoftness( softness );
|
||||
}
|
||||
|
||||
DefineConsoleMethod( TerrainEditor, getBrushSoftness, F32, (), , "()")
|
||||
DefineEngineMethod( TerrainEditor, getBrushSoftness, F32, (), , "()")
|
||||
{
|
||||
|
||||
return object->getBrushSoftness();
|
||||
}
|
||||
|
||||
DefineConsoleMethod( TerrainEditor, getBrushPos, const char*, (), , "Returns a Point2I.")
|
||||
DefineEngineMethod( TerrainEditor, getBrushPos, const char*, (), , "Returns a Point2I.")
|
||||
{
|
||||
return object->getBrushPos();
|
||||
}
|
||||
|
||||
DefineConsoleMethod( TerrainEditor, setBrushPos, void, (Point2I pos), , "Location")
|
||||
DefineEngineMethod( TerrainEditor, setBrushPos, void, (Point2I pos), , "Location")
|
||||
{
|
||||
|
||||
object->setBrushPos(pos);
|
||||
}
|
||||
|
||||
DefineConsoleMethod( TerrainEditor, setAction, void, (const char * action_name), , "(string action_name)")
|
||||
DefineEngineMethod( TerrainEditor, setAction, void, (const char * action_name), , "(string action_name)")
|
||||
{
|
||||
object->setAction(action_name);
|
||||
}
|
||||
|
||||
DefineConsoleMethod( TerrainEditor, getActionName, const char*, (U32 index), , "(int num)")
|
||||
DefineEngineMethod( TerrainEditor, getActionName, const char*, (U32 index), , "(int num)")
|
||||
{
|
||||
return (object->getActionName(index));
|
||||
}
|
||||
|
||||
DefineConsoleMethod( TerrainEditor, getNumActions, S32, (), , "")
|
||||
DefineEngineMethod( TerrainEditor, getNumActions, S32, (), , "")
|
||||
{
|
||||
return(object->getNumActions());
|
||||
}
|
||||
|
||||
DefineConsoleMethod( TerrainEditor, getCurrentAction, const char*, (), , "")
|
||||
DefineEngineMethod( TerrainEditor, getCurrentAction, const char*, (), , "")
|
||||
{
|
||||
return object->getCurrentAction();
|
||||
}
|
||||
|
||||
DefineConsoleMethod( TerrainEditor, resetSelWeights, void, (bool clear), , "(bool clear)")
|
||||
DefineEngineMethod( TerrainEditor, resetSelWeights, void, (bool clear), , "(bool clear)")
|
||||
{
|
||||
object->resetSelWeights(clear);
|
||||
}
|
||||
|
||||
DefineConsoleMethod( TerrainEditor, clearSelection, void, (), , "")
|
||||
DefineEngineMethod( TerrainEditor, clearSelection, void, (), , "")
|
||||
{
|
||||
object->clearSelection();
|
||||
}
|
||||
|
||||
DefineConsoleMethod( TerrainEditor, processAction, void, (String action), (""), "(string action=NULL)")
|
||||
DefineEngineMethod( TerrainEditor, processAction, void, (String action), (""), "(string action=NULL)")
|
||||
{
|
||||
object->processAction(action);
|
||||
}
|
||||
|
||||
DefineConsoleMethod( TerrainEditor, getActiveTerrain, S32, (), , "")
|
||||
DefineEngineMethod( TerrainEditor, getActiveTerrain, S32, (), , "")
|
||||
{
|
||||
S32 ret = 0;
|
||||
|
||||
|
|
@ -2607,27 +2607,27 @@ DefineConsoleMethod( TerrainEditor, getActiveTerrain, S32, (), , "")
|
|||
return ret;
|
||||
}
|
||||
|
||||
DefineConsoleMethod( TerrainEditor, getNumTextures, S32, (), , "")
|
||||
DefineEngineMethod( TerrainEditor, getNumTextures, S32, (), , "")
|
||||
{
|
||||
return object->getNumTextures();
|
||||
}
|
||||
|
||||
DefineConsoleMethod( TerrainEditor, markEmptySquares, void, (), , "")
|
||||
DefineEngineMethod( TerrainEditor, markEmptySquares, void, (), , "")
|
||||
{
|
||||
object->markEmptySquares();
|
||||
}
|
||||
|
||||
DefineConsoleMethod( TerrainEditor, mirrorTerrain, void, (S32 mirrorIndex), , "")
|
||||
DefineEngineMethod( TerrainEditor, mirrorTerrain, void, (S32 mirrorIndex), , "")
|
||||
{
|
||||
object->mirrorTerrain(mirrorIndex);
|
||||
}
|
||||
|
||||
DefineConsoleMethod(TerrainEditor, setTerraformOverlay, void, (bool overlayEnable), , "(bool overlayEnable) - sets the terraformer current heightmap to draw as an overlay over the current terrain.")
|
||||
DefineEngineMethod(TerrainEditor, setTerraformOverlay, void, (bool overlayEnable), , "(bool overlayEnable) - sets the terraformer current heightmap to draw as an overlay over the current terrain.")
|
||||
{
|
||||
// XA: This one needs to be implemented :)
|
||||
}
|
||||
|
||||
DefineConsoleMethod(TerrainEditor, updateMaterial, bool, ( U32 index, String matName ), ,
|
||||
DefineEngineMethod(TerrainEditor, updateMaterial, bool, ( U32 index, String matName ), ,
|
||||
"( int index, string matName )\n"
|
||||
"Changes the material name at the index." )
|
||||
{
|
||||
|
|
@ -2645,7 +2645,7 @@ DefineConsoleMethod(TerrainEditor, updateMaterial, bool, ( U32 index, String mat
|
|||
return true;
|
||||
}
|
||||
|
||||
DefineConsoleMethod(TerrainEditor, addMaterial, S32, ( String matName ), ,
|
||||
DefineEngineMethod(TerrainEditor, addMaterial, S32, ( String matName ), ,
|
||||
"( string matName )\n"
|
||||
"Adds a new material." )
|
||||
{
|
||||
|
|
@ -2660,7 +2660,7 @@ DefineConsoleMethod(TerrainEditor, addMaterial, S32, ( String matName ), ,
|
|||
return true;
|
||||
}
|
||||
|
||||
DefineConsoleMethod( TerrainEditor, removeMaterial, void, ( S32 index ), , "( int index ) - Remove the material at the given index." )
|
||||
DefineEngineMethod( TerrainEditor, removeMaterial, void, ( S32 index ), , "( int index ) - Remove the material at the given index." )
|
||||
{
|
||||
TerrainBlock *terr = object->getClientTerrain();
|
||||
if ( !terr )
|
||||
|
|
@ -2689,7 +2689,7 @@ DefineConsoleMethod( TerrainEditor, removeMaterial, void, ( S32 index ), , "( in
|
|||
object->setGridUpdateMinMax();
|
||||
}
|
||||
|
||||
DefineConsoleMethod(TerrainEditor, getMaterialCount, S32, (), ,
|
||||
DefineEngineMethod(TerrainEditor, getMaterialCount, S32, (), ,
|
||||
"Returns the current material count." )
|
||||
{
|
||||
TerrainBlock *terr = object->getClientTerrain();
|
||||
|
|
@ -2699,7 +2699,7 @@ DefineConsoleMethod(TerrainEditor, getMaterialCount, S32, (), ,
|
|||
return 0;
|
||||
}
|
||||
|
||||
DefineConsoleMethod(TerrainEditor, getMaterials, const char *, (), , "() gets the list of current terrain materials.")
|
||||
DefineEngineMethod(TerrainEditor, getMaterials, const char *, (), , "() gets the list of current terrain materials.")
|
||||
{
|
||||
TerrainBlock *terr = object->getClientTerrain();
|
||||
if ( !terr )
|
||||
|
|
@ -2716,7 +2716,7 @@ DefineConsoleMethod(TerrainEditor, getMaterials, const char *, (), , "() gets th
|
|||
return ret;
|
||||
}
|
||||
|
||||
DefineConsoleMethod( TerrainEditor, getMaterialName, const char*, (S32 index), , "( int index ) - Returns the name of the material at the given index." )
|
||||
DefineEngineMethod( TerrainEditor, getMaterialName, const char*, (S32 index), , "( int index ) - Returns the name of the material at the given index." )
|
||||
{
|
||||
TerrainBlock *terr = object->getClientTerrain();
|
||||
if ( !terr )
|
||||
|
|
@ -2732,7 +2732,7 @@ DefineConsoleMethod( TerrainEditor, getMaterialName, const char*, (S32 index), ,
|
|||
return Con::getReturnBuffer( name );
|
||||
}
|
||||
|
||||
DefineConsoleMethod( TerrainEditor, getMaterialIndex, S32, ( String name ), , "( string name ) - Returns the index of the material with the given name or -1." )
|
||||
DefineEngineMethod( TerrainEditor, getMaterialIndex, S32, ( String name ), , "( string name ) - Returns the index of the material with the given name or -1." )
|
||||
{
|
||||
TerrainBlock *terr = object->getClientTerrain();
|
||||
if ( !terr )
|
||||
|
|
@ -2747,13 +2747,13 @@ DefineConsoleMethod( TerrainEditor, getMaterialIndex, S32, ( String name ), , "(
|
|||
return -1;
|
||||
}
|
||||
|
||||
DefineConsoleMethod( TerrainEditor, reorderMaterial, void, ( S32 index, S32 orderPos ), , "( int index, int order ) "
|
||||
DefineEngineMethod( TerrainEditor, reorderMaterial, void, ( S32 index, S32 orderPos ), , "( int index, int order ) "
|
||||
"- Reorder material at the given index to the new position, changing the order in which it is rendered / blended." )
|
||||
{
|
||||
object->reorderMaterial( index, orderPos );
|
||||
}
|
||||
|
||||
DefineConsoleMethod(TerrainEditor, getTerrainUnderWorldPoint, S32, (const char * ptOrX, const char * Y, const char * Z), ("", "", ""),
|
||||
DefineEngineMethod(TerrainEditor, getTerrainUnderWorldPoint, S32, (const char * ptOrX, const char * Y, const char * Z), ("", "", ""),
|
||||
"(x/y/z) Gets the terrain block that is located under the given world point.\n"
|
||||
"@param x/y/z The world coordinates (floating point values) you wish to query at. "
|
||||
"These can be formatted as either a string (\"x y z\") or separately as (x, y, z)\n"
|
||||
|
|
@ -2822,12 +2822,12 @@ void TerrainEditor::initPersistFields()
|
|||
Parent::initPersistFields();
|
||||
}
|
||||
|
||||
DefineConsoleMethod( TerrainEditor, getSlopeLimitMinAngle, F32, (), , "")
|
||||
DefineEngineMethod( TerrainEditor, getSlopeLimitMinAngle, F32, (), , "")
|
||||
{
|
||||
return object->mSlopeMinAngle;
|
||||
}
|
||||
|
||||
DefineConsoleMethod( TerrainEditor, setSlopeLimitMinAngle, F32, (F32 angle), , "")
|
||||
DefineEngineMethod( TerrainEditor, setSlopeLimitMinAngle, F32, (F32 angle), , "")
|
||||
{
|
||||
if ( angle < 0.0f )
|
||||
angle = 0.0f;
|
||||
|
|
@ -2838,12 +2838,12 @@ DefineConsoleMethod( TerrainEditor, setSlopeLimitMinAngle, F32, (F32 angle), , "
|
|||
return angle;
|
||||
}
|
||||
|
||||
DefineConsoleMethod( TerrainEditor, getSlopeLimitMaxAngle, F32, (), , "")
|
||||
DefineEngineMethod( TerrainEditor, getSlopeLimitMaxAngle, F32, (), , "")
|
||||
{
|
||||
return object->mSlopeMaxAngle;
|
||||
}
|
||||
|
||||
DefineConsoleMethod( TerrainEditor, setSlopeLimitMaxAngle, F32, (F32 angle), , "")
|
||||
DefineEngineMethod( TerrainEditor, setSlopeLimitMaxAngle, F32, (F32 angle), , "")
|
||||
{
|
||||
if ( angle > 90.0f )
|
||||
angle = 90.0f;
|
||||
|
|
|
|||
|
|
@ -3225,7 +3225,7 @@ void WorldEditor::setEditorTool(EditorTool* newTool)
|
|||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
ConsoleMethod( WorldEditor, ignoreObjClass, void, 3, 0, "(string class_name, ...)")
|
||||
DefineEngineStringlyVariadicMethod( WorldEditor, ignoreObjClass, void, 3, 0, "(string class_name, ...)")
|
||||
{
|
||||
object->ignoreObjClass(argc, argv);
|
||||
}
|
||||
|
|
@ -3252,7 +3252,7 @@ DefineEngineMethod( WorldEditor, getActiveSelection, S32, (),,
|
|||
return object->getActiveSelectionSet()->getId();
|
||||
}
|
||||
|
||||
DefineConsoleMethod( WorldEditor, setActiveSelection, void, ( WorldEditorSelection* selection), ,
|
||||
DefineEngineMethod( WorldEditor, setActiveSelection, void, ( WorldEditorSelection* selection), ,
|
||||
"Set the currently active WorldEditorSelection object.\n"
|
||||
"@param selection A WorldEditorSelectionSet object to use for the selection container.")
|
||||
{
|
||||
|
|
|
|||
|
|
@ -657,58 +657,42 @@ void WorldEditorSelection::setSize(const VectorF & newsize)
|
|||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
ConsoleMethod( WorldEditorSelection, containsGlobalBounds, bool, 2, 2, "() - True if an object with global bounds is contained in the selection." )
|
||||
DefineEngineMethod( WorldEditorSelection, containsGlobalBounds, bool, (),, "True if an object with global bounds is contained in the selection." )
|
||||
{
|
||||
return object->containsGlobalBounds();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
ConsoleMethod( WorldEditorSelection, getCentroid, const char*, 2, 2, "() - Return the median of all object positions in the selection." )
|
||||
DefineEngineMethod( WorldEditorSelection, getCentroid, Point3F, (),, "Return the median of all object positions in the selection." )
|
||||
{
|
||||
static const U32 bufSize = 256;
|
||||
char* buffer = Con::getReturnBuffer( bufSize );
|
||||
const Point3F& centroid = object->getCentroid();
|
||||
|
||||
dSprintf( buffer, bufSize, "%g %g %g", centroid.x, centroid.y, centroid.z );
|
||||
return buffer;
|
||||
return centroid;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
ConsoleMethod( WorldEditorSelection, getBoxCentroid, const char*, 2, 2, "() - Return the center of the bounding box around the selection." )
|
||||
DefineEngineMethod( WorldEditorSelection, getBoxCentroid, Point3F, (),, "Return the center of the bounding box around the selection." )
|
||||
{
|
||||
static const U32 bufSize = 256;
|
||||
char* buffer = Con::getReturnBuffer( bufSize );
|
||||
const Point3F& boxCentroid = object->getBoxCentroid();
|
||||
|
||||
dSprintf( buffer, bufSize, "%g %g %g", boxCentroid.x, boxCentroid.y, boxCentroid.z );
|
||||
return buffer;
|
||||
return boxCentroid;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
ConsoleMethod( WorldEditorSelection, offset, void, 3, 4, "( vector delta, float gridSnap=0 ) - Move all objects in the selection by the given delta." )
|
||||
{
|
||||
F32 x, y, z;
|
||||
dSscanf( argv[ 3 ], "%g %g %g", &x, &y, &z );
|
||||
|
||||
F32 gridSnap = 0.f;
|
||||
if( argc > 3 )
|
||||
gridSnap = dAtof( argv[ 3 ] );
|
||||
|
||||
object->offset( Point3F( x, y, z ), gridSnap );
|
||||
DefineEngineMethod(WorldEditorSelection, offset, void, (Point3F delta, F32 gridSnap), (0.0f), "Move all objects in the selection by the given delta.")
|
||||
{
|
||||
object->offset( delta, gridSnap );
|
||||
WorldEditor::updateClientTransforms( object );
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
ConsoleMethod( WorldEditorSelection, union, void, 3, 3, "( SimSet set ) - Add all objects in the given set to this selection." )
|
||||
DefineEngineMethod( WorldEditorSelection, union, void, (SimSet* selection),, "Add all objects in the given set to this selection." )
|
||||
{
|
||||
SimSet* selection;
|
||||
if( !Sim::findObject( argv[ 2 ], selection ) )
|
||||
if( !selection)
|
||||
{
|
||||
Con::errorf( "WorldEditorSelection::union - no SimSet '%s'", (const char*)argv[ 2 ] );
|
||||
Con::errorf( "WorldEditorSelection::union - no SimSet");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -719,12 +703,11 @@ ConsoleMethod( WorldEditorSelection, union, void, 3, 3, "( SimSet set ) - Add al
|
|||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
ConsoleMethod( WorldEditorSelection, subtract, void, 3, 3, "( SimSet ) - Remove all objects in the given set from this selection." )
|
||||
DefineEngineMethod( WorldEditorSelection, subtract, void, (SimSet* selection),, "Remove all objects in the given set from this selection." )
|
||||
{
|
||||
SimSet* selection;
|
||||
if( !Sim::findObject( argv[ 2 ], selection ) )
|
||||
if( !selection )
|
||||
{
|
||||
Con::errorf( "WorldEditorSelection::subtract - no SimSet '%s'", (const char*)argv[ 2 ] );
|
||||
Con::errorf( "WorldEditorSelection::subtract - no SimSet" );
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue