Esempio n. 1
0
        public static EditorKeyDefinition Create(string ident, string description, KeyCode defKey, bool defShift, bool defControl, bool defAlt, bool defCommand, bool mouseclick)
        {
            EditorKeyDefinition def;

            if (!CurvyPreferences.KeyBindings.TryGetValue(ident, out def))
            {
                def = new EditorKeyDefinition(ident, description, defKey, defShift, defControl, defAlt, defCommand, mouseclick);
                CurvyPreferences.KeyBindings.Add(ident, def);
                CurvyPreferences.Save();
            }

            return(def);
        }
Esempio n. 2
0
        public static EditorKeyDefinition Create(string ident, string description, KeyCode defKey, bool defShift, bool defControl, bool defAlt, bool defCommand, bool mouseclick)
        {
            EditorKeyDefinition def;
            if (!CurvyPreferences.KeyBindings.TryGetValue(ident,out def))
            {
                def = new EditorKeyDefinition(ident, description, defKey, defShift, defControl, defAlt, defCommand, mouseclick);
                CurvyPreferences.KeyBindings.Add(ident, def);
                CurvyPreferences.Save();
            }

            return def;
        }