Added logging to wire frame action
This commit is contained in:
parent
949761f064
commit
682c06a5f6
1 changed files with 7 additions and 0 deletions
|
|
@ -4,8 +4,13 @@ import com.jme3.asset.AssetManager;
|
||||||
import com.jme3.input.controls.ActionListener;
|
import com.jme3.input.controls.ActionListener;
|
||||||
import com.jme3.renderer.ViewPort;
|
import com.jme3.renderer.ViewPort;
|
||||||
import se.cookery.gfx.util.WireFrameProcessor;
|
import se.cookery.gfx.util.WireFrameProcessor;
|
||||||
|
import zutil.log.LogUtil;
|
||||||
|
|
||||||
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
public class WireFrameToggleAction implements ActionListener {
|
public class WireFrameToggleAction implements ActionListener {
|
||||||
|
private static final Logger logger = LogUtil.getLogger();
|
||||||
|
|
||||||
private ViewPort viewPort;
|
private ViewPort viewPort;
|
||||||
private WireFrameProcessor processor;
|
private WireFrameProcessor processor;
|
||||||
|
|
||||||
|
|
@ -18,8 +23,10 @@ public class WireFrameToggleAction implements ActionListener {
|
||||||
public void onAction(String name, boolean isPressed, float tpf) {
|
public void onAction(String name, boolean isPressed, float tpf) {
|
||||||
if (isPressed) {
|
if (isPressed) {
|
||||||
if (viewPort.getProcessors().contains(processor)) {
|
if (viewPort.getProcessors().contains(processor)) {
|
||||||
|
logger.info("Disabling WireFrame processor.");
|
||||||
viewPort.removeProcessor(processor);
|
viewPort.removeProcessor(processor);
|
||||||
} else {
|
} else {
|
||||||
|
logger.info("Enabling WireFrame processor.");
|
||||||
viewPort.addProcessor(processor);
|
viewPort.addProcessor(processor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue