How do I turn off the stats view from simple application?
I’ve tried…
Main app = new Main();
app.getGuiNode().detachAllChildren();
and…
app.statsView.setCullHint(Spatial.CullHint.Always);
app.fpsText.setCullHint(Spatial.CullHint.Always);
but none of these work!
it seems it’s not working for the stat view, there must be an issue.
You can use statview.removeFromParent() as a work around;
mmmm I tried
app.statsView.removeFromParent();
but it gave a null pointer error…
I tried this - an empty overide method-
@Override
public void loadStatsView() {
}
which worked, but crashed when I did the same for the fps text.
is it best I create (duplicate) my own SimpleApplication class?
don’t call it in your main class, call it in the simpleInit method of your app. That’s why you have a null pointer
no luck,
I have this as the first lines in my simple init method
Main app = new Main();
app.statsView.removeFromParent();
but still a null pointer…
nehon said:
call it in the simpleInit method of your app
still no,
this is what I have-
@Override
public void simpleInitApp() {
Main app = new Main();
app.statsView.removeFromParent();
// my code
}
-.- Why do you create another app in the init method? remove that line.
ah yes that worked,
I need to go back to programming school
Anyway the first issue is due to a bug, i’m trying to fix it right now
Ok it’s fixed in last SVN you can use the cullHint.always method again.
thanks so much