/// <summary>
        /// Copy return all ActionMaps while reassigning the JsN Tag
        /// </summary>
        /// <param name="newJsList">The JsN reassign list</param>
        /// <returns>The ActionMaps copy with reassigned input</returns>
        public ActionMapsCls ReassignJsN(JsReassingList newJsList)
        {
            ActionMapsCls newMaps = new ActionMapsCls(m_joystickList);

            // full copy from 'this'

            newMaps.m_uiCustHeader  = this.m_uiCustHeader;
            newMaps.m_deviceOptions = this.m_deviceOptions;
            newMaps.m_optionTree    = this.m_optionTree;
            newMaps.m_modifiers     = this.m_modifiers;

            for (int i = 0; i < JoystickCls.JSnum_MAX; i++)
            {
                newMaps.jsN[i] = this.jsN[i]; newMaps.jsNGUID[i] = this.jsNGUID[i];
            }

            foreach (ActionMapCls am in this)
            {
                newMaps.Add(am.ReassignJsN(newJsList));
            }

            //m_options.ReassignJsN( newJsList );

            return(newMaps);
        }
Exemple #2
0
        /// <summary>
        /// Copy return all ActionMaps while reassigning the JsN Tag
        /// </summary>
        /// <param name="newJsList">The JsN reassign list</param>
        /// <returns>The ActionMaps copy with reassigned input</returns>
        public ActionMapsCls ReassignJsN(JsReassingList newJsList)
        {
            var newMaps = new ActionMapsCls(this);

            newMaps.m_uiCustHeader  = ( UICustHeader )this.m_uiCustHeader.Clone( );
            newMaps.m_tuningOptions = ( Tuningoptions )this.m_tuningOptions.Clone( );
            newMaps.m_deviceOptions = ( Deviceoptions )this.m_deviceOptions.Clone( );

            foreach (ActionMapCls am in this)
            {
                newMaps.Add(am.ReassignJsN(newJsList)); // creates the deep copy of the tree
            }
            // remap the tuning options
            newMaps.m_tuningOptions.ReassignJsN(newJsList);

            return(newMaps);
        }