Applying addColor to text removes tabbing

Recommended Posts


I have created a tabbed text using tabs property of text. This works fine until I try to add color to text using addColor function of text. This removes the tabbing done on the text. Example here:

//Phaser game initialization
var game = new Phaser.Game(480, 320, Phaser.AUTO, 'game_div');
var gameStates = {};

gameStates.Main = function(game) {};

gameStates.Main.prototype = {
  create: function() {
    var textHeadings = this.add.text(20, 20, '', {
      fill: "#ffffff",
      tabs: [80, 140]
    var headingsArray = [
      ['id', 'score', 'country'],
      ['1', '2300', 'US'],
      ['2', '1890', 'AUS'],
      ['3', '1000', 'US']
    //uncomment this line to see the issue

game.state.add('Main', gameStates.Main);


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.