Preview:
Installation
- Download
- Extract to fgroot/Nasal
Implementation
- include cursor in aircraft's model xml file:
- Code: Select all
<PropertyList>
...
<model>
<name>fgcursor</name>
<path>Nasal/fgcursor/Models/cursor.xml</path>
</model>
...
</PropertyList>
- Create cursor configuration xml files in aircraft's folder:
- Code: Select all
<PropertyList>
<cursor n="0">
<x-m>1.28</x-m>
<y-m>0.811</y-m>
<z-m>0.079</z-m>
<pitch-deg>-10</pitch-deg>
<scale>0.4</scale>
<neighbours> <!-- indices of neighbouring cursors -->
<top>6</top>
<bottom>4</bottom>
<left>2</left>
<right>0</right>
</neighbours>
<binding>
...
</binding>
<binding>
...
</binding>
</cursor>
<cursor n="1">
...
</cursor>
...
</PropertyList>
- Register cursor configuration files in aircraft's -set.xml file:
- Code: Select all
<PropertyList>
...
<sim>
...
<fgcursor>
<cursor-group n="0">
<name>Instrument panel</name>
<path>cursors/instrument-panel.xml</path>
</cursor-group>
<cursor-group n="1">
<name>Overhead panel</name>
<path>cursors/overhead-panel.xml</path>
</cursor-group>
...
</fgcursor>
...
</sim>
...
</PropertyList>
Commands
Cursor is controlled using fgcommands:
- Move cursor in specific direction (needs to have properly defined neighbouring cursors):
- Code: Select all
<binding>
<command>fgcursor-move</command>
<direction>top</direction>
<binding>
<binding>
<command>fgcursor-move</command>
<direction>bottom</direction>
<binding>
<binding>
<command>fgcursor-move</command>
<direction>left</direction>
<binding>
<binding>
<command>fgcursor-move</command>
<direction>right</direction>
<binding>
- Run cursor bindings:
- Code: Select all
<binding>
<command>fgcursor-binding</command>
<binding>
- Cycle through cursor groups:
- Code: Select all
<binding>
<command>fgcursor-next-group</command>
<binding>
<binding>
<command>fgcursor-prev-group</command>
<binding>
- Cycle through cursors in the same group:
- Code: Select all
<binding>
<command>fgcursor-next-cursor</command>
<binding>
<binding>
<command>fgcursor-prev-cursor</command>
<binding>