Sign in to follow this  
A potato

Problems with text lines

Recommended Posts

Hi! I'm having a problem with the phaser 2 online editor.

I'm trying to create some text on multiple lines so I tried using  \n or \r and while the do work initially, if I reload the page it splits the code itself.

So initially my code is

Quote

game.add.text(157, 140, 'This is you,\nyou can move around\nin 8 directions\nwith the arrow keys.' , {font: "18px Arial", fill: '#FFFFFF'});

But when I reload the page it becomes

Quote

game.add.text(157, 140, 'This is you,

you can move around

in 8 directions

with the arrow keys.' , {font: "18px Arial", fill: '#FFFFFF'});

Does anyone have a solution?

Share this post


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.

Guest
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.

Loading...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.