Page 1 of 1

text actor view centering problems

PostPosted: Tue Apr 12, 2011 1:29 pm
by sonicfire
hi folks!

i´m using this function and somehow i have problems with it:
Code: Select all
void centerMeX()
{
    x = view.x+(240-width*0.5); // ?
}


somehow its too far to the right. cant explain it.
is there a once-and-for-all centering function that works with normal AND textonly actors??

any help much appreciated! :)
EDIT: my screen (view) is 480x320

Re: text actor view centering problems

PostPosted: Tue Apr 12, 2011 7:16 pm
by sonicfire
anyone?? :?

Re: text actor view centering problems

PostPosted: Tue Apr 12, 2011 8:02 pm
by Game A Gogo
x=view.x+view.width*.5-width*.5;