Exemple #1
0
        public Device(InputLibWrapper.Device dev)
        {
            rawDevice         = dev;
            bindingSets       = new Dictionary <string, BindingSet> ();
            activeBindingSets = new List <BindingSet> ();
            defaultBindings   = new BindingSet(this);

            AI_Database.DeviceNames.TryGetValue(dev.name, out devNames);
            ConfigNode node;

            if (AI_Database.DeviceConfigs.TryGetValue(dev.name, out node))
            {
                ParseConfig(node);
            }
        }
Exemple #2
0
        void init(Device dev)
        {
            axisBindings   = new List <AxisBinding> ();
            buttonBindings = new List <ButtonBinding> ();
            axisRecipes    = new AxisRecipe[dev.num_axes];

            if (defaultRecipe == null)
            {
                defaultRecipe = new AxisRecipe();
            }
            for (int i = 0; i < axisRecipes.Length; i++)
            {
                axisRecipes[i] = defaultRecipe;
            }

            rawDevice = dev.rawDevice;
        }