Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by dkollmann

I was wondering if there was a special draw function called for the editor which would be very useful as I have to render some special data for some of my entities in the editor.

1 decade ago by Hareesun

if( !ig.global.wm ) {
    // Not in Editor - Do some fancy stuff here.
}

1 decade ago by dkollmann

I figured out you have to draw the text directly without using a font:

ig.system.context.fillStyle = wm.config.colors.primary;
		ig.system.context.fillText(
			'my text',
			ig.system.getDrawPos(this.pos.x - ig.game.screen.x), 
			ig.system.getDrawPos(this.pos.y - ig.game.screen.y)
		);
Page 1 of 1
« first « previous next › last »