void PopulateWithDefaults() { if (settings.Menus.Count > 0) { foreach (KS_Scriptable_Settings_menu m in settings.Menus) { if (m.settings.Count > 0) { foreach (KS_Scriptable_Settings_option o in m.settings) { settingsConfig.Set(m.menuTitle, o.configID, o.defult, o.configHelp); } } } } }
private void PopulateWithDefaults() { if (inputConfig.Inputs.Count > 0) { foreach (KS_Scriptable_Input_object input in inputConfig.Inputs) { if (input.EditableInGame) { switch (input.type) { case KS_Scriptable_input_type.Keyboard: parser.Set("Keyboard", input.ID, input.DefaultKey.ToString(), input.ConfigHelpText); break; case KS_Scriptable_input_type.Mouse: parser.Set("Mouse", input.ID, input.MouseButton.ToString(), input.ConfigHelpText); break; case KS_Scriptable_input_type.Axis: parser.Set("Axis", input.ID + "_positive", input.positive.ToString(), input.ConfigHelpText); if (input.negitive != KeyCode.None) { parser.Set("Axis", input.ID + "_negative", input.negitive.ToString()); } if (input.UseDS4) { parser.Set("Axis", input.ID + "_DS4", input.DS4Axis.ToString()); } if (input.UseXbox) { parser.Set("Axis", input.ID + "_XBX", input.XboxAxis.ToString()); } if (input.UseDS4 || input.UseDS4) { parser.Set("Axis", input.ID + "_deadzone", input.deadZone.ToString()); } break; } } } } }