//Presets selection window private void Presets(int id) { GUILayout.BeginVertical(); GUILayout.BeginHorizontal(); GUILayout.BeginVertical(); presetScroll = GUILayout.BeginScrollView(presetScroll, false, false, skins.horizontalScrollbar, skins.verticalScrollbar, skins.box, GUILayout.Width(200)); if (presets.GetRelevantPresets(pChute).Length > 0) { pChute.presetID = GUILayout.SelectionGrid(pChute.presetID, presets.GetRelevantPresets(pChute), 1, skins.button); } else { GUILayout.Label("No saved presets", skins.label); } GUILayout.EndScrollView(); GUILayout.EndVertical(); GUILayout.BeginVertical(GUILayout.Width(200)); if (presets.GetRelevantPresets(pChute).Length > 0) { GUILayout.Label("Description: " + presets.GetPreset(presets.GetRelevantPresets(pChute)[pChute.presetID]).description, skins.label); } else { GUILayout.Label("---", skins.label); } GUILayout.EndVertical(); GUILayout.EndHorizontal(); if (presets.presets.Count > 0) { GUILayout.BeginHorizontal(); if (GUILayout.Button("Select preset", skins.button)) { pChute.ApplyPreset(); this.presetVisible = false; } if (GUILayout.Button("Delete preset", skins.button)) { saveWarning = false; this.presetWarningVisible = true; } GUILayout.EndHorizontal(); } if (GUILayout.Button("Cancel", skins.button)) { this.presetVisible = false; } GUILayout.EndVertical(); }