T key had to be pressed 2x before worked in jme3test.terrain (4 files)

master
Stephen Gold 5 years ago
parent d636049a6f
commit ceea055cc4
  1. 4
      jme3-examples/src/main/java/jme3test/terrain/TerrainTest.java
  2. 4
      jme3-examples/src/main/java/jme3test/terrain/TerrainTestAdvanced.java
  3. 4
      jme3-examples/src/main/java/jme3test/terrain/TerrainTestAndroid.java
  4. 4
      jme3-examples/src/main/java/jme3test/terrain/TerrainTestModifyHeight.java

@ -177,7 +177,7 @@ public class TerrainTest extends SimpleApplication {
hintText = new BitmapText(guiFont, false); hintText = new BitmapText(guiFont, false);
hintText.setSize(guiFont.getCharSet().getRenderedSize()); hintText.setSize(guiFont.getCharSet().getRenderedSize());
hintText.setLocalTranslation(0, getCamera().getHeight(), 0); hintText.setLocalTranslation(0, getCamera().getHeight(), 0);
hintText.setText("Hit T to switch to wireframe, P to switch to tri-planar texturing"); hintText.setText("Press T to toggle wireframe, P to toggle tri-planar texturing");
guiNode.attachChild(hintText); guiNode.attachChild(hintText);
} }
@ -194,7 +194,7 @@ public class TerrainTest extends SimpleApplication {
public void onAction(String name, boolean pressed, float tpf) { public void onAction(String name, boolean pressed, float tpf) {
if (name.equals("wireframe") && !pressed) { if (name.equals("wireframe") && !pressed) {
wireframe = !wireframe; wireframe = !wireframe;
if (!wireframe) { if (wireframe) {
terrain.setMaterial(matWire); terrain.setMaterial(matWire);
} else { } else {
terrain.setMaterial(matRock); terrain.setMaterial(matRock);

@ -234,7 +234,7 @@ public class TerrainTestAdvanced extends SimpleApplication {
hintText = new BitmapText(guiFont, false); hintText = new BitmapText(guiFont, false);
hintText.setSize(guiFont.getCharSet().getRenderedSize()); hintText.setSize(guiFont.getCharSet().getRenderedSize());
hintText.setLocalTranslation(0, getCamera().getHeight(), 0); hintText.setLocalTranslation(0, getCamera().getHeight(), 0);
hintText.setText("Hit T to switch to wireframe, P to switch to tri-planar texturing"); hintText.setText("Press T to toggle wireframe, P to toggle tri-planar texturing");
guiNode.attachChild(hintText); guiNode.attachChild(hintText);
} }
@ -255,7 +255,7 @@ public class TerrainTestAdvanced extends SimpleApplication {
public void onAction(String name, boolean pressed, float tpf) { public void onAction(String name, boolean pressed, float tpf) {
if (name.equals("wireframe") && !pressed) { if (name.equals("wireframe") && !pressed) {
wireframe = !wireframe; wireframe = !wireframe;
if (!wireframe) { if (wireframe) {
terrain.setMaterial(matWire); terrain.setMaterial(matWire);
} else { } else {
terrain.setMaterial(matTerrain); terrain.setMaterial(matTerrain);

@ -158,7 +158,7 @@ public class TerrainTestAndroid extends SimpleApplication {
hintText = new BitmapText(guiFont, false); hintText = new BitmapText(guiFont, false);
hintText.setSize(guiFont.getCharSet().getRenderedSize()); hintText.setSize(guiFont.getCharSet().getRenderedSize());
hintText.setLocalTranslation(0, getCamera().getHeight(), 0); hintText.setLocalTranslation(0, getCamera().getHeight(), 0);
hintText.setText("Hit T to switch to wireframe, P to switch to tri-planar texturing"); hintText.setText("Press T to toggle wireframe, P to toggle tri-planar texturing");
guiNode.attachChild(hintText); guiNode.attachChild(hintText);
} }
@ -175,7 +175,7 @@ public class TerrainTestAndroid extends SimpleApplication {
public void onAction(String name, boolean pressed, float tpf) { public void onAction(String name, boolean pressed, float tpf) {
if (name.equals("wireframe") && !pressed) { if (name.equals("wireframe") && !pressed) {
wireframe = !wireframe; wireframe = !wireframe;
if (!wireframe) { if (wireframe) {
terrain.setMaterial(matWire); terrain.setMaterial(matWire);
} else { } else {
terrain.setMaterial(matRock); terrain.setMaterial(matRock);

@ -81,7 +81,7 @@ public class TerrainTestModifyHeight extends SimpleApplication {
private TerrainQuad terrain; private TerrainQuad terrain;
Material matTerrain; Material matTerrain;
Material matWire; Material matWire;
boolean wireframe = true; boolean wireframe = false;
boolean triPlanar = false; boolean triPlanar = false;
boolean wardiso = false; boolean wardiso = false;
boolean minnaert = false; boolean minnaert = false;
@ -198,7 +198,7 @@ public class TerrainTestModifyHeight extends SimpleApplication {
public void onAction(String name, boolean pressed, float tpf) { public void onAction(String name, boolean pressed, float tpf) {
if (name.equals("wireframe") && !pressed) { if (name.equals("wireframe") && !pressed) {
wireframe = !wireframe; wireframe = !wireframe;
if (!wireframe) { if (wireframe) {
terrain.setMaterial(matWire); terrain.setMaterial(matWire);
} else { } else {
terrain.setMaterial(matTerrain); terrain.setMaterial(matTerrain);

Loading…
Cancel
Save