Home Forums Development discussions Questions Reply To: Questions

#709
Mury
Participant

I just found something bad,very bad.
int setWidgetPosition()
{
MScriptContext* script = NeoEngine::getInstance()->getScriptContext();

//There is an error,specificate IT in console,cuz that`s why we got it!
if(script->getArgsNumber() != 2)
return 0;

Widget* w = GuiSystem::getInstance()->getWidget(script->getInteger(0));

MVector2 vec;
script->getFloatArray(1, vec, 2);
w->setPosition(vec);

return 1;
}

  • This reply was modified 9 years, 8 months ago by Mury.