Eliminate unnecessary uses of ConsoleMethod

This commit is contained in:
Lukas Joergensen 2018-04-17 22:36:32 +02:00
parent 00758d380f
commit 2e6133af48
15 changed files with 155 additions and 190 deletions

View file

@ -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());
}
@ -1502,7 +1501,7 @@ void GuiInspectorTypeBitMask32::updateData()
setData( data );
}
ConsoleMethod( GuiInspectorTypeBitMask32, applyBit, void, 2,2, "apply();" )
DefineEngineMethod( GuiInspectorTypeBitMask32, applyBit, void, (),, "" )
{
object->updateData();
}

View file

@ -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, (), , "")
{
}
DefineEngineMethod(GuiInspectorComponentGroup, getComponent, S32, (), ,"")
DefineEngineMethod(GuiInspectorComponentGroup, getComponent, S32, (), , "")
{
return object->getComponent()->getId();
}

View file

@ -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, (), , "")
{
}

View file

@ -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, (), , "")
{
}