Beispiel #1
0
        public Key(int id, string name, KeyCode[] keys, KeyCode[] modifiers, ModifierKeyRegister register)
        {
            m_id               = id;
            m_name             = name;
            m_keys             = keys;
            m_modifiers        = modifiers;
            m_modifierRegister = register;

            m_keysPressed = new bool[keys.Length];

            // Init all keys to not be pressed
            ArrayUtil.Fill(m_keysPressed, false);
        }
        public KeyBindingDatabase(KeyGroup[] groups, Dictionary <string, int> m_KeyDict, ModifierKeyRegister register)
        {
            m_Groups = groups;

            for (int i = 0; i < m_Groups.Length; i++)
            {
                m_active.Add(m_Groups[i]);
            }

            m_GroupNameDict = new Dictionary <string, KeyGroup>(groups.Length);
            PerformOnAll(m_Groups, (KeyGroup x) => { m_GroupNameDict.Add(x.Name, x); });

            m_KeyNameToGroupID = m_KeyDict;
            SetControlGroups(groups);
            m_ModifierRegister = register;
        }