예제 #1
0
 void SaveKeyBindings()
 {
     string[] names = KeyBinding.GetNames(typeof(KeyBinding));
     for (int i = 0; i < names.Length; i++)
     {
         Options.Set("key-" + names[i], keys[i]);
     }
 }
예제 #2
0
 void LoadKeyBindings()
 {
     string[] names = KeyBinding.GetNames(typeof(KeyBinding));
     for (int i = 0; i < names.Length; i++)
     {
         string key     = "key-" + names[i];
         Key    mapping = Options.GetEnum(key, keys[i]);
         if (!IsReservedKey(mapping))
         {
             keys[i] = mapping;
         }
     }
 }