TerrainTestTile: T key had to be pressed 2x before effect (see PR #827)
This commit is contained in:
parent
b8360100fe
commit
f00f68224f
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2012 jMonkeyEngine
|
* Copyright (c) 2009-2018 jMonkeyEngine
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -68,7 +68,7 @@ public class TerrainTestTile extends SimpleApplication {
|
|||||||
private TiledTerrain terrain;
|
private TiledTerrain 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;
|
||||||
@ -135,7 +135,7 @@ public class TerrainTestTile extends SimpleApplication {
|
|||||||
public void loadHintText() {
|
public void loadHintText() {
|
||||||
hintText = new BitmapText(guiFont, false);
|
hintText = new BitmapText(guiFont, false);
|
||||||
hintText.setLocalTranslation(0, getCamera().getHeight(), 0);
|
hintText.setLocalTranslation(0, getCamera().getHeight(), 0);
|
||||||
hintText.setText("Hit 'T' to toggle wireframe");
|
hintText.setText("Press T to toggle wireframe");
|
||||||
guiNode.attachChild(hintText);
|
guiNode.attachChild(hintText);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -150,7 +150,7 @@ public class TerrainTestTile 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…
x
Reference in New Issue
Block a user