diff --git a/engine/src/test/jme3test/app/TestChangeAppIcon.java b/engine/src/test/jme3test/app/TestChangeAppIcon.java index 004bd326d..86ed5028f 100644 --- a/engine/src/test/jme3test/app/TestChangeAppIcon.java +++ b/engine/src/test/jme3test/app/TestChangeAppIcon.java @@ -66,7 +66,7 @@ public class TestChangeAppIcon extends SimpleApplication { @Override public void simpleInitApp() { // Write text on the screen (HUD) - guiNode.detachAllChildren(); + setDisplayStatView(false); BitmapText helloText = new BitmapText(guiFont); helloText.setText("The icon of the app should be a smart monkey!"); helloText.setLocalTranslation(300, helloText.getLineHeight(), 0); diff --git a/engine/src/test/jme3test/helloworld/HelloAssets.java b/engine/src/test/jme3test/helloworld/HelloAssets.java index 7635abbc6..bf10d430e 100644 --- a/engine/src/test/jme3test/helloworld/HelloAssets.java +++ b/engine/src/test/jme3test/helloworld/HelloAssets.java @@ -69,7 +69,7 @@ public class HelloAssets extends SimpleApplication { rootNode.attachChild(wall); /** Display a line of text (default font from test-data) */ - guiNode.detachAllChildren(); + setDisplayStatView(false); guiFont = assetManager.loadFont("Interface/Fonts/Default.fnt"); BitmapText helloText = new BitmapText(guiFont, false); helloText.setSize(guiFont.getCharSet().getRenderedSize()); diff --git a/engine/src/test/jme3test/helloworld/HelloPhysics.java b/engine/src/test/jme3test/helloworld/HelloPhysics.java index 7a30cb8cd..a86391ee4 100644 --- a/engine/src/test/jme3test/helloworld/HelloPhysics.java +++ b/engine/src/test/jme3test/helloworld/HelloPhysics.java @@ -215,14 +215,14 @@ public class HelloPhysics extends SimpleApplication { /** A plus sign used as crosshairs to help the player with aiming.*/ protected void initCrossHairs() { - guiNode.detachAllChildren(); - guiFont = assetManager.loadFont("Interface/Fonts/Default.fnt"); + setDisplayStatView(false); + //guiFont = assetManager.loadFont("Interface/Fonts/Default.fnt"); BitmapText ch = new BitmapText(guiFont, false); ch.setSize(guiFont.getCharSet().getRenderedSize() * 2); ch.setText("+"); // fake crosshairs :) ch.setLocalTranslation( // center - settings.getWidth() / 2 - guiFont.getCharSet().getRenderedSize() / 3 * 2, - settings.getHeight() / 2 + ch.getLineHeight() / 2, 0); + settings.getWidth() / 2, + settings.getHeight() / 2, 0); guiNode.attachChild(ch); } } diff --git a/engine/src/test/jme3test/helloworld/HelloPicking.java b/engine/src/test/jme3test/helloworld/HelloPicking.java index 5881cc0c6..fe165281d 100644 --- a/engine/src/test/jme3test/helloworld/HelloPicking.java +++ b/engine/src/test/jme3test/helloworld/HelloPicking.java @@ -154,14 +154,13 @@ public class HelloPicking extends SimpleApplication { /** A centred plus sign to help the player aim. */ protected void initCrossHairs() { - guiNode.detachAllChildren(); + setDisplayStatView(false); guiFont = assetManager.loadFont("Interface/Fonts/Default.fnt"); BitmapText ch = new BitmapText(guiFont, false); ch.setSize(guiFont.getCharSet().getRenderedSize() * 2); ch.setText("+"); // crosshairs ch.setLocalTranslation( // center - settings.getWidth() / 2 - guiFont.getCharSet().getRenderedSize() / 3 * 2, - settings.getHeight() / 2 + ch.getLineHeight() / 2, 0); + settings.getWidth() / 2, settings.getHeight() / 2, 0); guiNode.attachChild(ch); }