Menu

#56 TextRender does not wrap new strings

nifty-1.0
closed
nobody
None
5
2014-11-16
2012-03-23
Tim B
No

On a text panel with wrapping turned on when using:

    TextRenderer renderer = element.getRenderer(TextRenderer.class);
    renderer.setText(getMotd());

The text is displayed in the renderer unwrapped and then is rewrapped one line at a time as various events happen (for example popping up a hint causes a wrapping). I've tried fiddling with various setwrapping on/off and layout type methods and none seemed to make any difference. In the end I've had to word wrap the text manually to a fixed line length before sending it to the panel which works but is far from ideal.

Discussion