Hello JMonkeys,
We’d like to change a Swing GUI of one of our projects to a Nifty GUI.
I’ve checked the documentation and almost everything seems ok for the change.
The only problem is that we have a drawable canvas (so using mouse events and updating the drawn bufferedImage), but we haven’t found anything about making a custom drawable nifty component.
I think the mouse events can be processed correctly, but I don’t know if we can draw an image on a Nifty component to show this canvas.
Has anyone tried that yet or do you have any tip?
Thanks as always,
Axel
Pardon me in case I don’t understand your question correctly.
Can’t you just display the image into which you are painting using nifty ? (ex: using the image control)
Theoretical you can create a texture2D and exchange this new image for an old in nifty (see code in my question).
Sadly my solution only works in simpleInitApp() so far.
Let’s keep fingers pressed, some nifty-folks have a more generally working answer.