コード例 #1
0
 void SaveKeyBindings()
 {
     string[] names = KeyBind.GetNames(typeof(KeyBind));
     for (int i = 0; i < names.Length; i++)
     {
         Options.Set("key-" + names[i], keys[i]);
     }
 }
コード例 #2
0
 void LoadKeyBindings()
 {
     string[] names = KeyBind.GetNames(typeof(KeyBind));
     for (int i = 0; i < names.Length; i++)
     {
         string key     = "key-" + names[i];
         Key    mapping = Options.GetEnum(key, keys[i]);
         if (mapping != Key.Escape)
         {
             keys[i] = mapping;
         }
     }
 }