JME2 & Hud ? Nifty Event Probleme (2 posts)

Topic tags: event, HUD, jme2, nifty
  • Profile picture of shionn shionn said 10 months ago:

    Hello, all JME Community.

    I’m using JME2, since 3 year now. But i don’t found a good solution for making Hud. I try :
    - Swing and JmeDesktop, but, don’t work on mac.
    - GBui, I have sometime keyboard bug on Linux. And i have a lot of Head-hack tring to pack properly the windows.
    - I try to make my own lib, bug i dont found how to make ClipState work in Ortho (to make kind of stuff like scrolling).

    So now I try to use Nifty. I’m using this version :
    - Jme 2.1, build from SVN branch. with LWJGL Renderer.
    - Nifty-1.3
    - nifty-jme-renderer build from SVN.
    - All nifty resources needed

    Here how I instantiate the hud :

    NiftyNode nn = new NiftyNode("hud", "console/console.xml", "start");
    rootNode.attachChild(nn);

    With this I have the Graphics working, but I don’t have input working. I’m looking for a good example working well on JME2. Does someone have this ? please. Or some-one have a solution for previous problems I have mentioned ?

    I can’t pass on JME3, I need OpenGL1.4 compatibility.

    Thank for all, and scuse me for my poor english.

  • Profile picture of shionn shionn said 10 months ago:

    My problem for event is now solved. I have forget do add this in my game update :

    nn.getNifty().update();

    But my mouse cursor continue hiding after some move. And I have add this in my game Init :

    MouseInput.get().setCursorVisible(true);