Complete word wrap for RPG Maker. Both lines with multiple words separated by spaces (eg: "text wrapping test") and lines with large text without spaces (eg: "aaaaaaaaaaaaaaaaaaaaaaaa") are broken. It is also possible to manually add a line break by entering the special character \n
.
No line break command:
text = 'Testing line breaks'
line_width = 100
draw_text_wrapped(0, 0, line_width, contents.font.size + 2, text)
With line break command (\n
):
text = "Testing\n line\n breaks"
line_width = 100
draw_text_wrapped(0, 0, line_width, contents.font.size + 2, text)