mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-24 05:45:40 +00:00
Eliminate DefineConsoleMethod
This commit is contained in:
parent
e718841467
commit
76908eae3c
77 changed files with 483 additions and 483 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue