mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
Replaced a ton of ConsoleMethods with the DefineConsoleMethod Macro.
This commit is contained in:
parent
378a933894
commit
acb192e2a5
133 changed files with 1716 additions and 2087 deletions
|
|
@ -571,21 +571,22 @@ DefineEngineMethod( SimXMLDocument, attribute, const char*, ( const char* attrib
|
|||
}
|
||||
|
||||
// These two methods don't make a lot of sense the way TS works. Leaving them in for backwards-compatibility.
|
||||
ConsoleMethod( SimXMLDocument, attributeF32, F32, 3, 3, "(string attributeName)"
|
||||
DefineConsoleMethod( SimXMLDocument, attributeF32, F32, (const char * attributeName), , "(string attributeName)"
|
||||
"@brief Get float attribute from the current Element on the stack.\n\n"
|
||||
"@param attributeName Name of attribute to retrieve.\n"
|
||||
"@return The value of the given attribute in the form of a float.\n"
|
||||
"@deprecated Use attribute().")
|
||||
{
|
||||
return dAtof( object->attribute( argv[2] ) );
|
||||
return dAtof( object->attribute( attributeName ) );
|
||||
}
|
||||
ConsoleMethod(SimXMLDocument, attributeS32, S32, 3, 3, "(string attributeName)"
|
||||
|
||||
DefineConsoleMethod(SimXMLDocument, attributeS32, S32, (const char * attributeName), , "(string attributeName)"
|
||||
"@brief Get int attribute from the current Element on the stack.\n\n"
|
||||
"@param attributeName Name of attribute to retrieve.\n"
|
||||
"@return The value of the given attribute in the form of an integer.\n"
|
||||
"@deprecated Use attribute().")
|
||||
{
|
||||
return dAtoi( object->attribute( argv[2] ) );
|
||||
return dAtoi( object->attribute( attributeName ) );
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue