i tryed
Code: Select all
void write(IGUIEnvironment* env, const wchar_t* stringa){
int winwidth=1024,winheight=768,xsxmarg=0,xdxmarg=0,ymarg;
core::dimension2d<s32>::dimension2d sxmarg;
IGUISkin* skin = env->getSkin();
IGUIFont* font = env->getFont("media/font/fonthaettenschweiler.bmp");
if (font)
skin->setFont(font);
sxmarg=font->getDimension(stringa);
xsxmarg=(winwidth/2)-(((sxmarg.Width)/2));
xdxmarg=(winwidth/2)+(((sxmarg.Width)/2));
ymarg=(winheight*80)/100;
env->addStaticText(stringa,rect<int>(xsxmarg,ymarg,xdxmarg+3,(ymarg+(sxmarg.Height))), true);
}
Code: Select all
while(device->run())
{
write(env,stringa[0]);
cameratoobject(camera,anms,distance);
driver->beginScene(true, true, video::SColor(255,113,113,133));
camcord=camera->getPosition();
camera->setPosition(camcord);
env->drawAll();
smgr->drawAll();
device->getGUIEnvironment()->drawAll();
driver->endScene();
}