From 99bf4248dff14ddf0b126e310a74f7e9237bb859 Mon Sep 17 00:00:00 2001 From: "Zer..om" Date: Sun, 11 Nov 2012 12:41:45 +0000 Subject: [PATCH] Fixed the toggling of stats display on/off to also remove the shading behind. git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9992 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- engine/src/core/com/jme3/app/StatsAppState.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/engine/src/core/com/jme3/app/StatsAppState.java b/engine/src/core/com/jme3/app/StatsAppState.java index 1fb644a18..3225c5798 100644 --- a/engine/src/core/com/jme3/app/StatsAppState.java +++ b/engine/src/core/com/jme3/app/StatsAppState.java @@ -107,6 +107,10 @@ public class StatsAppState extends AbstractAppState { showFps = show; if (fpsText != null) { fpsText.setCullHint(show ? CullHint.Never : CullHint.Always); + if (darkenFps != null) { + darkenFps.setCullHint(showFps && darkenBehind ? CullHint.Never : CullHint.Always); + } + } } @@ -115,6 +119,9 @@ public class StatsAppState extends AbstractAppState { if (statsView != null ) { statsView.setEnabled(show); statsView.setCullHint(show ? CullHint.Never : CullHint.Always); + if (darkenStats != null) { + darkenStats.setCullHint(showStats && darkenBehind ? CullHint.Never : CullHint.Always); + } } } @@ -134,10 +141,12 @@ public class StatsAppState extends AbstractAppState { if (app instanceof SimpleApplication) { SimpleApplication simpleApp = (SimpleApplication)app; - if (guiNode == null) + if (guiNode == null) { guiNode = simpleApp.guiNode; - if (guiFont == null ) + } + if (guiFont == null ) { guiFont = simpleApp.guiFont; + } } if (guiNode == null) {