From 810164da46efaafa3c82f90512d729f35938c310 Mon Sep 17 00:00:00 2001 From: "PSp..om" Date: Wed, 26 Sep 2012 06:25:06 +0000 Subject: [PATCH] Added a method for directly poking keyboard events into Nifty's queue. This is nice for hooking up things like joysticks to the cursor keys to navigate nifty menus/screens. git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9780 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- engine/src/niftygui/com/jme3/niftygui/NiftyJmeDisplay.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/engine/src/niftygui/com/jme3/niftygui/NiftyJmeDisplay.java b/engine/src/niftygui/com/jme3/niftygui/NiftyJmeDisplay.java index 5b18deafc..2e46dcadb 100644 --- a/engine/src/niftygui/com/jme3/niftygui/NiftyJmeDisplay.java +++ b/engine/src/niftygui/com/jme3/niftygui/NiftyJmeDisplay.java @@ -38,6 +38,7 @@ import com.jme3.asset.AssetManager; import com.jme3.asset.AssetNotFoundException; import com.jme3.audio.AudioRenderer; import com.jme3.input.InputManager; +import com.jme3.input.event.KeyInputEvent; import com.jme3.post.SceneProcessor; import com.jme3.renderer.RenderManager; import com.jme3.renderer.Renderer; @@ -126,6 +127,10 @@ public class NiftyJmeDisplay implements SceneProcessor { return nifty; } + public void simulateKeyEvent( KeyInputEvent event ) { + inputSys.onKeyEvent(event); + } + RenderDeviceJme getRenderDevice() { return renderDev; }