• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Can you create a text box? (Solved)

T

TriiiKill

Guest
I know how to draw_text in code, but is there a way to create a box that automatically conforms your text to the size and dimensions of the box?

For example, this forum is like a text box, because it automatically puts text that doesn't fit on one line onto the next line. Doing it all manually seems pretty difficult, and I can't find a way to do it. Does anyone know?
 

jazzzar

Member
I know how to draw_text in code, but is there a way to create a box that automatically conforms your text to the size and dimensions of the box?

For example, this forum is like a text box, because it automatically puts text that doesn't fit on one line onto the next line. Doing it all manually seems pretty difficult, and I can't find a way to do it. Does anyone know?
Try to code your own system, it's fairly simple i believe, checking if the width of the text is already past the box's width so jump a line and put the first word the one you were writing last
 
J

Jaqueta

Guest
With draw_text_ext, you can set the width argument to your Box size, and the line will automatically break when it reaches the width limit.
 
A

Acr515

Guest
All you need is the draw_text_ext command. You can set the width parameter in it to the number of pixels you want the text to span before it goes onto the new line.

Edit: Dangit I was beat to it
 
T

TriiiKill

Guest
With draw_text_ext, you can set the width argument to your Box size, and the line will automatically break when it reaches the width limit.
All you need is the draw_text_ext command. You can set the width parameter in it to the number of pixels you want the text to span before it goes onto the new line.

Edit: Dangit I was beat to it
Thanks! Exactly what I was looking for. :)
 
Top