Added configuration for different modes and cursors. The XML format
[fg:toms-fgdata.git] / mice.xml
1 <?xml version="1.0"?>
2 <!--
3 Mouse binding definitions.
4
5 NOTE: CURRENTLY, THIS FILE IS USED ONLY IF YOU CONFIGURE FLIGHTGEAR
6 'with-new-mouse' AT BUILD TIME.
7
8 This file is included by preferences.xml, and uses the context of its
9 inclusion point; that means that you need to prepend "/input/mice"
10 to all property names.
11
12 Currently, Glut supports only one mouse, but the configuration format
13 is designed to support additional mice in the future if possible.
14
15 The current mode for each mouse is held in the
16 /input/mice/mouse[n]/mode property.
17 -->
18
19
20 <PropertyList>
21
22  <mouse n="0">
23
24   <mode-count type="int">3</mode-count>
25   <mode archive="y" type="int">0</mode>
26
27   <mode-cursors>
28    <cursor n="0">inherit</cursor>
29    <cursor n="1">crosshair</cursor>
30    <cursor n="2">left-right</cursor>
31   </mode-cursors>
32
33   <!-- left button is the regular pointer -->
34   <button n="0">
35    <binding>
36     <condition>
37      <equals>
38       <property>/input/mice/mouse[0]/mode</property>
39       <value>0</value>
40      </equals>
41     </condition>
42     <command>pui-or-panel-mouse-click</command>
43     <button>0</button>
44     <is-down>true</is-down>
45    </binding>
46    <mod-up>
47     <binding>
48      <condition>
49       <equals>
50        <property>/input/mice/mouse[0]/mode</property>
51        <value>0</value>
52       </equals>
53      </condition>
54      <command>pui-or-panel-mouse-click</command>
55      <button>0</button>
56      <is-down>false</is-down>
57     </binding>
58    </mod-up>
59   </button>
60
61   <!-- right button cycles modes -->
62   <button n="2">
63    <binding>
64     <command>property-adjust</command>
65     <property>/input/mice/mouse[0]/mode</property>
66     <step type="int">1</step>
67     <min>0</min>
68     <max>2</max>
69     <wrap>true</wrap>
70    </binding>
71   </button>
72
73  </mouse>
74
75 </PropertyList>