Beispiel #1
0
        // Reset keybinds
        public static void ResetBinds(Mod mod)
        {
            if (mod != null)
            {
                // Revert binds
                Keybind[] bind = Keybind.Get(mod).ToArray();
                for (int i = 0; i < bind.Length; i++)
                {
                    Keybind original = Keybind.GetDefault(mod).Find(x => x.ID == bind[i].ID);

                    if (original != null)
                    {
                        bind[i].Key      = original.Key;
                        bind[i].Modifier = original.Modifier;
                    }
                }

                // Save binds
                SaveModBinds(mod);
            }
        }