Hi, my problem is , that I probably do ot know what to add to the cursor.registerWithInputHandler(???);, I treid many different Ideas, but now I'm out of Ideas I could try.
The TestJmeDestop does not help really, since it seems that when i derive from VariableTimeStepGame there is no preconfigured input variable i could use
My code if needed:
display.getRenderer().setBackgroundColor( ColorRGBA.black.clone() );
rootNode = new Node("rootNode");
sizey = properties.getHeight();
sizex = properties.getWidth();
render = properties.getRenderer();
ZBufferState buf = display.getRenderer().createZBufferState();
buf.setEnabled(true);
buf.setFunction(ZBufferState.CF_LEQUAL);
rootNode.setRenderState(buf);
rootNode.setCullMode( SceneElement.CULL_NEVER );
Hudnode = new Node( "desktop node" );
rootNode.attachChild( Hudnode );
Hudnode.setRenderQueueMode( Renderer.QUEUE_ORTHO );
Hudnode.attachChild(new LoadingScreen());
Hudnode.setLocalTranslation( display.getWidth() / 2, display.getHeight() / 2, 0 );
JMEDesktop jmeDesktop = new JMEDesktop( "test internalFrame" );
jmeDesktop.setup( display.getWidth(), display.getHeight(), false, input );
jmeDesktop.setLightCombineMode( LightState.OFF );
Hudnode.attachChild( jmeDesktop );
desktopPane = jmeDesktop.getJDesktop();
UIManager.setLookAndFeel( new MetalLookAndFeel() );
cursor = new AbsoluteMouse( "cursor",(int) EngineBase.GetScreenSize().y,(int) EngineBase.GetScreenSize().y);
TextureState ts = display.getRenderer().createTextureState();
URL cursorLoc = EngineBase.class.getClassLoader().getResource("textures/cursor/cursor normal.png" );
ts.setTexture(TextureManager.loadTexture(cursorLoc,Texture.MM_LINEAR,Texture.FM_LINEAR, Image.GUESS_FORMAT_NO_S3TC,1,true));
cursor.setRenderState( ts );
AlphaState as = display.getRenderer().createAlphaState();
as.setBlendEnabled( true );
as.setSrcFunction( AlphaState.SB_SRC_ALPHA );
as.setDstFunction( AlphaState.DB_ONE_MINUS_SRC_ALPHA );
as.setTestEnabled( true );
as.setTestFunction( AlphaState.TF_GREATER );
cursor.setRenderState( as );
cursor.registerWithInputHandler(?????);
EngineBase.getHudnode().attachChild(cursor);
cursor.setUsingDelta( false );
cursor.getXUpdateAction().setSpeed( 1 );
cursor.getYUpdateAction().setSpeed( 1 );
cursor.setCullMode( SceneElement.CULL_NEVER );