Multiline Text2D


I'm playing around with a HUD, and need to display text with newlines in it. Is it possible to do this with Text2D, because I don't see how. If not, what alternative do you suggest that is not JMEDesktop.



Or you could create a wrapper around Text2D that would contain multiple Text2Ds based on the text and forced wrapping since the font is fixed-width it would be really easy to write…

What about simple drawing onto a texture (probably image first) and put that on a Quad?

I thought about the last one too. I'm trying that as soon as I get the chance.

i suppose drawing to a texture is a good solution if you don't have many such multiline text objects. if you do have many, you end up with a lot of textures :expressionless:

i have implemented a kind of multiline text in my project, but it still has some issues. i'm not sure if it's usable for you. feel free to take a look at it in the sourceforge trunk of moenia if you are interested.

Hi JWar, we just managed to get FengGUI run with jME… Maybe you feel like having a shot at it :slight_smile:

edit: simply draw FengGUI after you rendered your scene with jME.