}
@Override
protected void registerInputTriggers() {
super.registerInputTriggers();
_logicalLayer.registerTrigger(new InputTrigger(new MouseButtonReleasedCondition(MouseButton.LEFT),
new TriggerAction() {
public void perform(final Canvas source, final TwoInputStates inputState, final double tpf) {
// zoom in
final MouseState mouse = inputState.getCurrent().getMouseState();
final Vector2 add = new Vector2(mouse.getX() - .5 * display.getWidth(), mouse.getY() - .5
* display.getHeight());
add.multiplyLocal(scale).multiplyLocal(
new Vector2(2.0 / display.getWidth(), 2.0 / display.getHeight()));
trans.addLocal(add.getX(), add.getY());
scale.multiplyLocal(0.5);
updateTexture();
iterations *= 1.1f;
}
}));
_logicalLayer.registerTrigger(new InputTrigger(new MouseButtonReleasedCondition(MouseButton.RIGHT),
new TriggerAction() {
public void perform(final Canvas source, final TwoInputStates inputState, final double tpf) {
// zoom out
final MouseState mouse = inputState.getCurrent().getMouseState();
final Vector2 add = new Vector2(mouse.getX() - .5 * display.getWidth(), mouse.getY() - .5