Problems with Nifty, considering Lemur

This is basically a list of all the things I can’t figure out how to do in nifty and would want to do with lemur. If you have any input on how to do it with nifty I’m interested, I honestly don’t want to rewrite all this a third time, but nifty seems a bit backwards. The first time was with Swing and LWJGL without jmonkey.

  • Can Lemur handle rotated text, like a standard label control, but rotated 90 or 180 degrees?

  • Can Lemur handle “emoticon” style replacing text with image (and later
    replacing image with text when highlighting and copying), much in the
    same way the forum here does? Like a browser does, but preferably much lighter weight?

  • Does Lemur have anything to support putting a view port inside a control? Or at least on top of a control?

If Lemur can’t, how hard would it to implement in Lemur? I would need to modify the highlighting behavior, intercept clipboard copying, customize the spacing in text, etc. Really getting up in the details, which appears to be unavoidable.

  1. If you mean just rotating the label, then yes. Every Lemur GUI element is just a JME Spatial. You can translate them, rotate them, etc… If it’s participating in a parent layout then no.

  2. Lemur uses BitmapText for its text… so no and and a qualified sort of. I have before left empty spots in my fonts for normally-unused or little-used ASCII characters and then drawn some monochrome emoticons in there. Else you will have to get creative.

  3. Nothing is built in (at least not yet) but I and others have done it in a variety of ways. You can overlay a viewport on top of a Lemur GUI element no problem. You can even put Lemur GUI elements into that viewport. You can also do render-to-texture style inclusion. It just depends on what you need.

Some of the above seems to have nothing to do with your previous bullets. What are you trying to make?

1 Like

It has everything to do with the second bullet. I can’t explain it more completely then to say [quote=“M_C, post:1, topic:37945”]
much in the same way the forum here does
[/quote]

Imagine a text box that works like a normal text box that you’ve typed “This is the fire emote :flame” into. When you type the second ‘:’ the textbox looks like this “This is the fire emote :fire:”. When the user copies the entire contents of the textbox, the clipboard contains “This is the fire emote :flame:”. When they paste it back into a similar text box later, it will turn the :flame: part into :fire: again. This requires “modifying the highlighting behavior, intercepting clipboard copying, and customizing the text spacing”, which is why I said it.

How hard would this be?

Pretty hard. You are essentially talking about supporting an editor panel like Swing’s JEditorPane… which is quite complex.

Else you might be able to get part of the way with more hacky solutions (keeping multiple document models, filtered and unfiltered. overlaying your own icons in the appropriate blank locations in the text field, etc.)

I believe for the viewport there is this solution:

Is BitmapText limited to ASCII? If it supports utf-8, there are a lot of emoji/winding slots already assigned. For example, U+1F525 is the flame that @M_C is mentioning. Still need a font that actually has a glyph for it, and the live translation will still be goofy.

BitmapText supports more than ascii… but it only supports one color at a time.

Thanks, it’s definitely crossed my mind to do unicode emotes, but it’s not something I want to cut corners on.