Ver código fonte

Enabled/disable statistics with the view. This
prevents stats from being collected unless they
are viewed.


git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10493 75d07b2b-3a1a-0410-a2c5-0572b91ccdca

PSp..om 12 anos atrás
pai
commit
0998f47847
1 arquivos alterados com 2 adições e 0 exclusões
  1. 2 0
      engine/src/core/com/jme3/app/StatsView.java

+ 2 - 0
engine/src/core/com/jme3/app/StatsView.java

@@ -77,6 +77,7 @@ public class StatsView extends Node implements Control {
         setCullHint(CullHint.Never);
 
         statistics = stats;
+        statistics.setEnabled(enabled);
 
         statLabels = statistics.getLabels();
         statData = new int[statLabels.length];
@@ -123,6 +124,7 @@ public class StatsView extends Node implements Control {
 
     public void setEnabled(boolean enabled) {
         this.enabled = enabled;
+        statistics.setEnabled(enabled);
     }
 
     public boolean isEnabled() {