Jump to content

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);


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...