示例#1
0
        DeviceTuningParameter m_tuningY = null; // yaw

        #endregion Fields

        #region Constructors

        // ctor
        public Options( JoystickList jsList )
        {
            m_tuningP = new DeviceTuningParameter( );
              m_tuningY = new DeviceTuningParameter( );
              m_tuningR = new DeviceTuningParameter( );

              // create inverters (
              for (int i=0; i<(int)OptionsInvert.Inversions.I_LAST; i++) {
            OptionsInvert inv = new OptionsInvert((OptionsInvert.Inversions)i);
            m_inverter.Add(inv);
              }
        }
示例#2
0
        private List <CheckBox> m_invertCB = null;                     // Options owns and handles all Inversions

        // ctor
        public Options(JoystickList jsList)
        {
            m_tuningP = new DeviceTuningParameter( );
            m_tuningY = new DeviceTuningParameter( );
            m_tuningR = new DeviceTuningParameter( );

            // create inverters (
            for (int i = 0; i < (int)OptionsInvert.Inversions.I_LAST; i++)
            {
                OptionsInvert inv = new OptionsInvert((OptionsInvert.Inversions)i);
                m_inverter.Add(inv);
            }
        }
示例#3
0
 /// <summary>
 /// Gets the JS device that is used for one of the Inversion Items supported
 /// </summary>
 /// <param name="item">The Inversion item</param>
 /// <returns>The device used or null</returns>
 private DeviceCls GetActionInstance( OptionsInvert.Inversions item )
 {
     // must get the jsN information used for Options
       String nodeText = "";
       nodeText = FindAction( OptionsInvert.MappedActions[( int )item].Map, OptionsInvert.MappedActions[( int )item].Action );
       if ( !String.IsNullOrWhiteSpace( nodeText ) ) {
     DeviceCls dev = m_jsList.Find_jsN( JoystickCls.JSNum( ActionTreeNode.CommandFromNodeText( nodeText ) ) );
     if ( dev != null ) return dev;
     else {
       // could be a gamepad then
       if ( ActionTreeNode.CommandFromNodeText( nodeText ).Contains( "xi_" ) ) {
     return m_gamepad;
       }
       else return null; // nope...
     }
       }
       return null;
 }
示例#4
0
 /// <summary>
 /// Returns the inverter based on the enum given
 /// </summary>
 /// <param name="item">The inverter enum</param>
 /// <returns>An Inverter object</returns>
 public OptionsInvert Inverter( OptionsInvert.Inversions item )
 {
     return m_inverter[( int )item];
 }