G
text = "First line\nSecond Line\nThis is the third line"
draw_text(room_width/2, 200, text)
No, it's 100% possible to show the [code] and [/code] tags without spaces, and the method has been in the clear for years.(remove the spaces - I had to include spaces or it you wouldn't be able to see the example).
using the [plain] and [/plain] tags?No, it's 100% possible to show the [code] and [/code] tags without spaces, and the method has been in the clear for years.
If you want to see how it's done, quote this post in the reply field, then select "Use BB Code Editor" (paper with wrench icon at top-right corner).
draw_text(x,y, "Score 1000 points to win\n" +
"UP: move\n"+
"L/R: Change direction\n"
etc etc
He's not using a fixed-width font, though (looks like Arial to me), this isn't a foolproof method... for instance if every line doesn't start with tabs (e.g you have headings on the left side and numbers/stats on the right of them) this gets unreliable quickly.using the [plain] and [/plain] tags?
so [plain] [code] [/code] [/plain]
of course that last example was written like so:
[plain][plain] [code] [/code] [/plain] [/plain]
etc etc
@guitarmonkeys14
The issue does seem to be the tab character.
i would recommend you build you strings like this instead:
Code:draw_text(x,y, "Score 1000 points to win\n" + "UP: move\n"+ "L/R: Change direction\n" etc etc
But the tabs op was seeing was from the code formating, rather than intentional tabs in the text.He's not using a fixed-width font, though (looks like Arial to me), this isn't a foolproof method... for instance if every line doesn't start with tabs (e.g you have headings on the left side and numbers/stats on the right of them) this gets unreliable quickly.
Personally, I prefer to solve situations like this by drawing more than one string (at different coordinates). Gives you much more control over how much stuff is aligned. You can also get the size of a string with string_width() and string_height() if you need to align other stuff to the text.
Thank you all for your responses, I definitely found the best option to be setting it up as followsusing the [plain] and [/plain] tags?
so [plain] [code] [/code] [/plain]
of course that last example was written like so:
[plain][plain] [code] [/code] [/plain] [/plain]
etc etc
@guitarmonkeys14
The issue does seem to be the tab character.
i would recommend you build you strings like this instead:
Code:draw_text(x,y, "Score 1000 points to win\n" + "UP: move\n"+ "L/R: Change direction\n" etc etc
draw_text(
room_width/2, 200,
"Score 1,000 points to win!\n" +
"\n" +
"UP: Move\n" +
"L/R: Change Direction\n" +
"SPACE: Shoot\n" +
"\n" +
">> Press ENTER to Start <<\n"