How to add different information to multiple lines of a Label?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By m0pman

Im trying to display some information in a label on different lines. Is this even possible?
Current code looks like this for one line:

$LumberHutButton/LumberHutInfo.text = "Cost: " + str(stepify(lumberCost, 0.01))

but I’d like it to look closer to this:

Cost: 5
DPS: 12/s
Other: 42

Is this even possible? Or im better of just making multiple labels and stacking them on top of each other?

:bust_in_silhouette: Reply From: Zylann

You can use the \n newline character to add multiple lines:

$LumberHutButton/LumberHutInfo.text = "Cost: 5\nDPS: 12/s\nOther: 42"

You can also use multiple stacked labels within a VBoxContainer of course.