I do not know how long the latest update has been up, but before, i was using the previous update(which at the time was the latest update). Just yesterday i updated to the latest update, and now the project runs incorrectly.
the mouse doesn’t release when code tells it to
guiNode.detachAllChildren() doesn’t seem to do anything
the same code worked 30 mins before, now it has a bunch of stuff i can’t change to fix. i can’t test it further because i can’t release the mouse to finish running my project.
sorry about being vague, but the methods that aren’t working are the ones i took from the tutorials.
guiNode.detachAllChildren() is not my own method, but it is not working.
Main.getApp().getInputManager().setCursorVisible(true) is hard to tell, but its the setCursorVisible(true) method to release the mouse(also not working)
SimpleApplication used to be hard coded with all of this stuff. I moved it to app states so that if you don’t want it then you can easily not include it.
If you want no default behavior at all then give your SimpleApplication subclass a no-arg constructor that calls super(null).
Or if you want some of the default behavior you could just use some of these:
super( new StatsAppState(), new FlyCamAppState(), new DebugKeysAppState() );
By default, SimpleApplication adds all of them.
The reason there is an issue is because these app states are initialized after simpleInit(). So if you leave them in then they won’t add GUI elements and stuff until simpleInit().
Making an app call guiNode.detachAllChildren() in simpleInit() was an ugly ugly hack and now not only do you not have to… but it doesn’t work. I wasn’t able to easily maintain backwards compatibility in this case.
The documentation should be updated but I’m lazy. Any app state will work there. I just split out SimpleApplication’s old hard-coded behavior into three separate app states… shown above.