Package com.ardor3d.input.logical

Examples of com.ardor3d.input.logical.KeyHeldCondition


        // set the default as current
        manager.setActiveWidget(rotateWidget);

        // add triggers to change which widget is active
        manager.getLogicalLayer().registerTrigger(
                new InputTrigger(new KeyHeldCondition(Key.LSHIFT), new TriggerAction() {
                    @Override
                    public void perform(final Canvas source, final TwoInputStates inputStates, final double tpf) {
                        manager.setActiveWidget(scaleWidget);
                    }
                }));
        manager.getLogicalLayer().registerTrigger(
                new InputTrigger(new KeyReleasedCondition(Key.LSHIFT), new TriggerAction() {
                    @Override
                    public void perform(final Canvas source, final TwoInputStates inputStates, final double tpf) {
                        manager.setActiveWidget(rotateWidget);
                    }
                }));
        manager.getLogicalLayer().registerTrigger(
                new InputTrigger(new KeyHeldCondition(Key.LCONTROL), new TriggerAction() {
                    @Override
                    public void perform(final Canvas source, final TwoInputStates inputStates, final double tpf) {
                        manager.setActiveWidget(moveWidget);
                    }
                }));
View Full Code Here

TOP

Related Classes of com.ardor3d.input.logical.KeyHeldCondition

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.