Home:ALL Converter>Make Nifty GUI ScreenController swallow input

Make Nifty GUI ScreenController swallow input

Ask Time:2012-09-22T16:59:36         Author:DeejUK

Json Formatter

In my Slick2D game, I'm extending NiftyOverlayBasicGameState, using Nifty GUI overlays, and specifying a PlainSlickInputSystem. For most overlaid screens I'd like Nifty GUI to ignore all input and pass it through to the GameState.

For one particular screen, I'd like to prevent all input getting through to the underlying GameState - but I only want this to happen for one screen, not all of them.

Is this possible using Nifty GUI, or am I taking the wrong approach? Can individual screens specify different input handling behaviour? Or should I instead be using a separate GameState with a different Niftyu GUI input system for the one screen where I want Nifty GUI to handle the input?

Author:DeejUK,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/12542367/make-nifty-gui-screencontroller-swallow-input
yy