I want to center text, but the text changes depending on what is clicked, so I can not only do this through number positions. I have found in the docs align: “center” but it says that this only works with text more than one line, and my text is not more. I am trying to use the center in the code below, but it is not centering it, I guess because it not longer than one line. Is there a way to do this with one line of text?
add.text (config.width / 2, config.height / 2, this.playerClicked, {font: '20px Ariel', fill: '#000000', align: "center"});