• Hey! Guest! The 39th GMC Jam will take place between November 26th, 12:00 UTC and November 30th, 12:00 UTC. Why not join in! Click here to find out more!

Windows Cool text in a box [SOLVED]


I have problems to limit my text width with my transformed code.

I have a code to convert html text style to GMS2, for the tags:
it starts with 1 user text string in object o_cooltext.
Example of my code result:
B U I BR.png
It converts it to an array, with as text style for example:
<B>this is bold
I tried to box it automaticly, but I had problems with it to limit the width size:
function draw_text_ext removes the leading spaces. Could a "tiny space" be a solution? It doesn't work for me as far as I tried.
function string_width gave me loop problems.
adding <BR> to user source I had problems with the insert positions. with my code, <BR> itself works fine as an alternative for the next line.

Suggestions? I wasted some time unfortunately.

UPDATE: I had to be careful to watch out for the different situations for next line. It was mixed. I have at least 3.
Last edited: