Trivial conversion from constant to const variables

[patch]

Index: src/core/com/jme3/input/FlyByCamera.java

===================================================================

— src/core/com/jme3/input/FlyByCamera.java (revision 6324)

+++ src/core/com/jme3/input/FlyByCamera.java (working copy)

@@ -174,21 +174,21 @@

};



// both mouse and button - rotation of cam

  •    inputManager.addMapping(&quot;FLYCAM_Left&quot;, new MouseAxisTrigger(0, true),<br />
    
  •    inputManager.addMapping(&quot;FLYCAM_Left&quot;, new MouseAxisTrigger(MouseInput.AXIS_X, true),<br />
    

new KeyTrigger(KeyInput.KEY_LEFT));


  •    inputManager.addMapping(&quot;FLYCAM_Right&quot;, new MouseAxisTrigger(0, false),<br />
    
  •    inputManager.addMapping(&quot;FLYCAM_Right&quot;, new MouseAxisTrigger(MouseInput.AXIS_X, false),<br />
    

new KeyTrigger(KeyInput.KEY_RIGHT));


  •    inputManager.addMapping(&quot;FLYCAM_Up&quot;, new MouseAxisTrigger(1, false),<br />
    
  •    inputManager.addMapping(&quot;FLYCAM_Up&quot;, new MouseAxisTrigger(MouseInput.AXIS_Y, false),<br />
    

new KeyTrigger(KeyInput.KEY_UP));


  •    inputManager.addMapping(&quot;FLYCAM_Down&quot;, new MouseAxisTrigger(1, true),<br />
    
  •    inputManager.addMapping(&quot;FLYCAM_Down&quot;, new MouseAxisTrigger(MouseInput.AXIS_Y, true),<br />
    

new KeyTrigger(KeyInput.KEY_DOWN));



// mouse only - zoom in/out with wheel, and rotate drag

  •    inputManager.addMapping(&quot;FLYCAM_ZoomIn&quot;, new MouseAxisTrigger(2, false));<br />
    
  •    inputManager.addMapping(&quot;FLYCAM_ZoomOut&quot;, new MouseAxisTrigger(2, true));<br />
    
  •    inputManager.addMapping(&quot;FLYCAM_ZoomIn&quot;, new MouseAxisTrigger(MouseInput.AXIS_WHEEL, false));<br />
    
  •    inputManager.addMapping(&quot;FLYCAM_ZoomOut&quot;, new MouseAxisTrigger(MouseInput.AXIS_WHEEL, true));<br />
    

inputManager.addMapping("FLYCAM_RotateDrag", new MouseButtonTrigger(MouseInput.BUTTON_LEFT));



// keyboard only WASD for movement and WZ for rise/lower height

Index: src/core/com/jme3/input/ChaseCamera.java

===================================================================

— src/core/com/jme3/input/ChaseCamera.java (revision 6324)

+++ src/core/com/jme3/input/ChaseCamera.java (working copy)

@@ -176,16 +176,16 @@



this.inputManager = inputManager;

if(!invertYaxis){

  •        inputManager.addMapping(&quot;Down&quot;, new MouseAxisTrigger(1, true));<br />
    
  •        inputManager.addMapping(&quot;Up&quot;, new MouseAxisTrigger(1, false));<br />
    
  •        inputManager.addMapping(&quot;Down&quot;, new MouseAxisTrigger(MouseInput.AXIS_Y, true));<br />
    
  •        inputManager.addMapping(&quot;Up&quot;, new MouseAxisTrigger(MouseInput.AXIS_Y, false));<br />
    

}else{

  •        inputManager.addMapping(&quot;Down&quot;, new MouseAxisTrigger(1, false));<br />
    
  •        inputManager.addMapping(&quot;Up&quot;, new MouseAxisTrigger(1, true));<br />
    
  •        inputManager.addMapping(&quot;Down&quot;, new MouseAxisTrigger(MouseInput.AXIS_Y, false));<br />
    
  •        inputManager.addMapping(&quot;Up&quot;, new MouseAxisTrigger(MouseInput.AXIS_Y, true));<br />
    

}

  •    inputManager.addMapping(&quot;ZoomIn&quot;, new MouseAxisTrigger(2, true));<br />
    
  •    inputManager.addMapping(&quot;ZoomOut&quot;, new MouseAxisTrigger(2, false));<br />
    
  •    inputManager.addMapping(&quot;mouseLeft&quot;, new MouseAxisTrigger(0, true));<br />
    
  •    inputManager.addMapping(&quot;mouseRight&quot;, new MouseAxisTrigger(0, false));<br />
    
  •    inputManager.addMapping(&quot;ZoomIn&quot;, new MouseAxisTrigger(MouseInput.AXIS_WHEEL, true));<br />
    
  •    inputManager.addMapping(&quot;ZoomOut&quot;, new MouseAxisTrigger(MouseInput.AXIS_WHEEL, false));<br />
    
  •    inputManager.addMapping(&quot;mouseLeft&quot;, new MouseAxisTrigger(MouseInput.AXIS_X, true));<br />
    
  •    inputManager.addMapping(&quot;mouseRight&quot;, new MouseAxisTrigger(MouseInput.AXIS_X, false));<br />
    

inputManager.addMapping("toggleRotate", new MouseButtonTrigger(MouseInput.BUTTON_LEFT));

inputManager.addMapping("toggleRotate", new MouseButtonTrigger(MouseInput.BUTTON_RIGHT));



@@ -781,11 +781,11 @@

inputManager.deleteMapping("Down");

inputManager.deleteMapping("Up");

if(!invertYaxis){

  •        inputManager.addMapping(&quot;Down&quot;, new MouseAxisTrigger(1, true));<br />
    
  •        inputManager.addMapping(&quot;Up&quot;, new MouseAxisTrigger(1, false));<br />
    
  •        inputManager.addMapping(&quot;Down&quot;, new MouseAxisTrigger(MouseInput.AXIS_Y, true));<br />
    
  •        inputManager.addMapping(&quot;Up&quot;, new MouseAxisTrigger(MouseInput.AXIS_Y, false));<br />
    

}else{

  •        inputManager.addMapping(&quot;Down&quot;, new MouseAxisTrigger(1, false));<br />
    
  •        inputManager.addMapping(&quot;Up&quot;, new MouseAxisTrigger(1, true));<br />
    
  •        inputManager.addMapping(&quot;Down&quot;, new MouseAxisTrigger(MouseInput.AXIS_Y, false));<br />
    
  •        inputManager.addMapping(&quot;Up&quot;, new MouseAxisTrigger(MouseInput.AXIS_Y, true));<br />
    

}

inputManager.addListener(this, "Down","Up");

}



[/patch]

1 Like

Thanks, commited