Menu

noob tries to understand nifty code

2013-11-14
2013-11-14
  • Marcus Timm

    Marcus Timm - 2013-11-14

    Hello, I'm using jME and I'm trying to find out how Nifty does things.

    I already found this callback mechanism: InputSystem -> NiftyInputConsumer -> Nifty.Screen -> KeyInputHandler and "ScreenControllers will implement KeyInputHandler, Nifty has a collection of them based on their class names" (inside the class 'Nifty').
    But I still don't know what to make of this.

    Basically what I want to achieve is this:
    - find the implementation of the textfields for keyboard input handling (what Nifty does when it gets all those fancy keyEvents)
    - use this code to place cursor, add letters, delete letters etc.
    - find the implementation of the clipboard (CTRL-C, CTRL-V)
    - make my own ingame console with colored fonts under jME, without using Nifty

    Can you point me to the right locations in the Nifty code or manual, and maybe tell me more about those mysterious 'ScreenControllers implementing KeyInputHandler' ?

    Sorry, I'm still a noob and the Nifty codebase is huge...

     
  • void256

    void256 - 2013-11-14

    Page 76-79 in the 1.3.2 manual explains the basic of keyboard event handling and especially page 77 explains the "ScreenController implementing KeyInputHandler" part in detail. Really. I'm not kidding. I'm serious. It's all explained there :-)

    And you could actually use github for questions as well. It's kinda hard to keep track of Nifty questions in several different places. That's why there is the note on the top directing people to github :)

     
  • void256

    void256 - 2013-11-14

    I've removed that page now! Thanks for the hint ;)

     

Log in to post a comment.