Home Forums Development discussions Questions Reply To: Questions

#709
AvatarMury
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 6 years, 8 months ago by AvatarMury.