I’d like to know how to disable displays statistics.
I found this link
https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:intermediate:simpleapplication
and these codes
app.setDisplayFps(false);
app.setDisplayStatView(false);
and I tried this
public static void main(String[] args) {
AppSettings setting= new AppSettings(true);
// setting.setFullscreen(true);
// setting.setFrameRate(60);
setting.setTitle(“Child of Ace”);
main app= new main();
app.setDisplayFps(false);
app.setDisplayStatView(false);
app.setShowSettings(false);
app.setSettings(setting);
logger.getLogger("").setLevel(Level.SEVERE);
app.start();
}
and got this error
Exception in thread “main” java.lang.NullPointerException
at com.jme3.app.SimpleApplication.setDisplayFps(SimpleApplication.java:272)
at main.main.main(main.java:158) = app.setDisplayFps(false);
I am trying something like this:
1, when the game runs it hides the display statistics by default
2, and if user wants he can show/hide it with a button
and by chance I found out the F5 key does the job(2)
call
setDisplayFps(false);
setDisplayStatView(false);
in the application SimpleInit method
@nehon
thanks, it works now
@normen
I checked your link first when the problem pop up
did you mean this :
How do I get rid of the debug display (fps, stats)?
app.setDisplayFps(false);
app.setDisplayStatView(false);
it is the same code in the link I posted in first post, and it didnt work.
I edited the wiki a bit, pls check and if it sucks then edit it again for me ^^
setDisplayFps(false);
setDisplayStatView(false);
I added those lines, like the faq said. It says they don’t exist, and the editor doesn’t suggest any imports.
When I try to access them through the app, it simply doesn’t find them… ???
You must be running an ancient version of JME. Maybe base alpha 4? (While that is the last ‘released’ version it is around 6 months old now which is ancient in a project moving as fast as JME)
You might need to update to a nightly build. Can be done through the update center. Press F1 for help.
@nehon said:
call<br />
<br />
setDisplayFps(false);<br />
setDisplayStatView(false);<br />
<br />
in the application SimpleInit method
It helps me in anddroid too. Thanks!
Before this, I added this code into main method and it didn’t work on android))
@kles4enko said: It helps me in anddroid too. Thanks! Before this, I added this code into main method and it didn't work on android))
main() is not run on Android at all.