emm…Although I don’t know how to "If the text hits 200px width, text-wrap to the next line."but if you wanna text-wrap,you can find “autowrap_mode” in inspector,and change the mode.
By the way,about your issue,you can try “RichTextLabel”,it may help out.RichTextLabel allow you adjust the text by code.
this only works with one line but it’s a start.
ok first click on your label then by the inspector click on the Node section then under the signals it will say “resized()” this is the signal that is fired every time the label is resized. right click to connect the signal to the label script you are working on.
func _on_resized() → void:
if size.x>200:
text=text.substr(0,len(text)-15)+“line \n”+text.substr(len(text)-15,len(text))
so when the resize signal is being fired the if checks if the size of the label is over 200, then it sets the text of that label to the sub string of the text and then adds the \n that is the new line symbol to it then it adds the rest of the sub string. but more logic is needed past the 1st line that you can work out if needed.
you can play with this by adding a text edit and then connecting the text _change() signal then setting the text edit text to the label text, like this. @onready var text_edit: TextEdit = $“…/TextEdit”
func _on_text_edit_text_changed() → void:
text = text_edit.text