On Tuesday 23 November 2004 18:05, Melchior FRANZ wrote:
> No, I take that back. Mouse properties are (like kbd * js bindings)
> fixed at the beginning. min/max can't easily be changed afterwards,
> and I don't feel like re-writing the whole input module. Better set
> the default to +/- 5m.

You can include only the required axis bindings in your aircraft *-set.xml 
file, like this (for the default cessna):

<input>

  <mice>

  <mouse n="0">
  <!-- Mode 2: view mode -->
  <mode n="2">
   
   <!-- Mouse left/right motion -->
   <x-axis>

    <!-- No buttons pressed: rotate the view left or right -->
    <binding>
     <condition>
      <and>
       <not>
        <property>/devices/status/mice/mouse[0]/button[0]</property>
       </not>
       <not>
        <property>/devices/status/mice/mouse[0]/button[1]</property>
       </not>
      </and>
     </condition>
     <command>property-adjust</command>
     <property>/sim/current-view/heading-offset-deg</property>
     <factor type="double">-360</factor>
     <min type="double">0</min>
     <max type="double">360</max>
     <wrap type="bool">true</wrap>
    </binding>


    <!-- Middle button pressed: move the view position left or right -->
    <binding>
     <condition>
      <and>
       <not>
        <property>/devices/status/mice/mouse[0]/button[0]</property>
       </not>
       <property>/devices/status/mice/mouse[0]/button[1]</property>
      </and>
     </condition>
     <command>property-adjust</command>
     <property>/sim/current-view/x-offset-m</property>
     <factor type="double">0.75</factor>
     <min type="double">-0.5</min>
     <max type="double">0.5</max>
     <wrap type="bool">false</wrap>
    </binding>

   </x-axis>

   <!-- Mouse up/down motion -->
   <y-axis>

    <!-- No buttons pressed: tilt the view up and down -->
    <binding>
     <condition>
      <and>
       <not>
        <property>/devices/status/mice/mouse[0]/button[0]</property>
       </not>
       <not>
        <property>/devices/status/mice/mouse[0]/button[1]</property>
       </not>
      </and>
     </condition>
     <command>property-adjust</command>
     <property>/sim/current-view/pitch-offset-deg</property>
     <factor type="double">-180</factor>
     <min type="double">-90</min>
     <max type="double">90</max>
     <wrap type="bool">false</wrap>
    </binding>

    <!-- Middle button pressed: move the view up and down -->
    <binding>
     <condition>
      <and>
       <not>
        <property>/devices/status/mice/mouse[0]/button[0]</property>
       </not>
        <property>/devices/status/mice/mouse[0]/button[1]</property>
      </and>
     </condition>
     <command>property-adjust</command>
     <property>/sim/current-view/y-offset-m</property>
     <factor type="double">-0.75</factor>
     <min type="double">-0.4</min>
     <max type="double">0.4</max>
     <wrap type="bool">false</wrap>
    </binding>

   </y-axis>

  </mode>

 </mouse>

 </mice>
 </input>

This will override the settings in mice.xml, but it will only override the 
settings that are defined here, so all the existing modes in mice.xml are 
used. As I said earlier it will be a lot of work to do this to every aircraft 
model.

-- 
Roy Vegard Ovesen

_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d

Reply via email to