Search code examples
playn

Presenting text data with playN


Ok, I already noticed that adding image layers in playN is very easy. But is there a good framework for presenting text data? Or it's totally not what was playN built for? I was wondering if I could present my text in a table. Is that eaisly achieveable or recquire some hacky workarounds?


Solution

  • PlayN is a game framework and as such very much oriented towards graphics.

    You can draw text on screen quite easily, but it is drawing text. PlayN is not designed to do text-processing. Typically, you draw text to an ImageLayer and then continue working with it, essentially turning it into an image.

    You can do (limited) text layout with the TextFormat class (http://docs.playn.googlecode.com/git/javadoc/playn/core/TextFormat.html), but again it is limited and mainly focusing on turning the text into a picture as soon as possible.