MinieExamples/src/main/java/jme3utilities/minie/test/BalanceDemo.java
/**
     * Add application-specific hotkey bindings and override existing ones.
     */
Add application-specific hotkey bindings and override existing ones.
Add application - specific hotkey bindings and override existing ones .
@Override
    public void moreDefaultBindings() {
        InputMode dim = getDefaultInputMode();
        dim.bind(AbstractDemo.asDumpScenes, KeyInput.KEY_P);
        dim.bind(AbstractDemo.asDumpSpace, KeyInput.KEY_O);
        dim.bind("go limp", KeyInput.KEY_SPACE);
        dim.bind("load Jaime", KeyInput.KEY_F2);
        dim.bind("load MhGame", KeyInput.KEY_F9);
        dim.bind("load Ninja", KeyInput.KEY_F7);
        dim.bind("load Oto", KeyInput.KEY_F6);
        dim.bind("load Puppet", KeyInput.KEY_F8);
        dim.bind("load Sinbad", KeyInput.KEY_F1);
        dim.bind("load SinbadWith1Sword", KeyInput.KEY_F10);
        dim.bind("load SinbadWithSwords", KeyInput.KEY_F4);
        dim.bind("posture squat center", KeyInput.KEY_NUMPAD2);
        dim.bind("posture squat left", KeyInput.KEY_NUMPAD3);
        dim.bind("posture squat right", KeyInput.KEY_NUMPAD1);
        dim.bind("posture tall center", KeyInput.KEY_NUMPAD8);
        dim.bind("posture tall left", KeyInput.KEY_NUMPAD9);
        dim.bind("posture tall right", KeyInput.KEY_NUMPAD7);
        dim.bindSignal(CameraInput.FLYCAM_LOWER, KeyInput.KEY_DOWN);
        dim.bindSignal(CameraInput.FLYCAM_RISE, KeyInput.KEY_UP);
        dim.bindSignal("orbitLeft", KeyInput.KEY_LEFT);
        dim.bindSignal("orbitRight", KeyInput.KEY_RIGHT);
        dim.bind(AbstractDemo.asToggleAabbs, KeyInput.KEY_APOSTROPHE);
        dim.bind(AbstractDemo.asToggleDebug, KeyInput.KEY_SLASH);
        dim.bind(AbstractDemo.asToggleHelp, KeyInput.KEY_H);
        dim.bind("toggle meshes", KeyInput.KEY_M);
        dim.bind(AbstractDemo.asTogglePause, KeyInput.KEY_PAUSE,
                KeyInput.KEY_PERIOD);
        dim.bind(AbstractDemo.asTogglePcoAxes, KeyInput.KEY_SEMICOLON);
        dim.bind("toggle skeleton", KeyInput.KEY_V);
        float margin = 10f; 
        float width = cam.getWidth() - 2f * margin;
        float height = cam.getHeight() - 2f * margin;
        float leftX = margin;
        float topY = margin + height;
        Rectangle rectangle = new Rectangle(leftX, topY, width, height);
        attachHelpNode(rectangle);
    }
@ Override public void moreDefaultBindings ( ) { InputMode dim = getDefaultInputMode ( ) ; dim . bind ( AbstractDemo . asDumpScenes , KeyInput . KEY_P ) ; dim . bind ( AbstractDemo . asDumpSpace , KeyInput . KEY_O ) ; dim . bind ( "go limp" , KeyInput . KEY_SPACE ) ; dim . bind ( "load Jaime" , KeyInput . KEY_F2 ) ; dim . bind ( "load MhGame" , KeyInput . KEY_F9 ) ; dim . bind ( "load Ninja" , KeyInput . KEY_F7 ) ; dim . bind ( "load Oto" , KeyInput . KEY_F6 ) ; dim . bind ( "load Puppet" , KeyInput . KEY_F8 ) ; dim . bind ( "load Sinbad" , KeyInput . KEY_F1 ) ; dim . bind ( "load SinbadWith1Sword" , KeyInput . KEY_F10 ) ; dim . bind ( "load SinbadWithSwords" , KeyInput . KEY_F4 ) ; dim . bind ( "posture squat center" , KeyInput . KEY_NUMPAD2 ) ; dim . bind ( "posture squat left" , KeyInput . KEY_NUMPAD3 ) ; dim . bind ( "posture squat right" , KeyInput . KEY_NUMPAD1 ) ; dim . bind ( "posture tall center" , KeyInput . KEY_NUMPAD8 ) ; dim . bind ( "posture tall left" , KeyInput . KEY_NUMPAD9 ) ; dim . bind ( "posture tall right" , KeyInput . KEY_NUMPAD7 ) ; dim . bindSignal ( CameraInput . FLYCAM_LOWER , KeyInput . KEY_DOWN ) ; dim . bindSignal ( CameraInput . FLYCAM_RISE , KeyInput . KEY_UP ) ; dim . bindSignal ( "orbitLeft" , KeyInput . KEY_LEFT ) ; dim . bindSignal ( "orbitRight" , KeyInput . KEY_RIGHT ) ; dim . bind ( AbstractDemo . asToggleAabbs , KeyInput . KEY_APOSTROPHE ) ; dim . bind ( AbstractDemo . asToggleDebug , KeyInput . KEY_SLASH ) ; dim . bind ( AbstractDemo . asToggleHelp , KeyInput . KEY_H ) ; dim . bind ( "toggle meshes" , KeyInput . KEY_M ) ; dim . bind ( AbstractDemo . asTogglePause , KeyInput . KEY_PAUSE , KeyInput . KEY_PERIOD ) ; dim . bind ( AbstractDemo . asTogglePcoAxes , KeyInput . KEY_SEMICOLON ) ; dim . bind ( "toggle skeleton" , KeyInput . KEY_V ) ; float margin = 10f ; float width = cam . getWidth ( ) - 2f * margin ; float height = cam . getHeight ( ) - 2f * margin ; float leftX = margin ; float topY = margin + height ; Rectangle rectangle = new Rectangle ( leftX , topY , width , height ) ; attachHelpNode ( rectangle ) ; }
Add application-specific hotkey bindings and override existing ones.
Add application - specific hotkey bindings and override existing ones .
// in pixels