1 decade ago by fulvio
I am trying to center font text within an image that's centered in the middle of the screen.
So far I have this:
Instead of the font being centered it is snapped to the top-left hand corner of the image. Not quite sure what's happening here?
Any help would be fantastic.
So far I have this:
var x = ig.system.width / 2, y = ig.system.height / 2; this.computerImg.draw(x / 2, y / 2); this.font.draw('foo', this.computerImg.width / 2, this.computerImg.height / 2, ig.Font.ALIGN.CENTER);
Instead of the font being centered it is snapped to the top-left hand corner of the image. Not quite sure what's happening here?
Any help would be fantastic.