/// <summary>
/// Should be called by the PartModule to open the GUI.
/// </summary>
/// <param name="models"></param>
public static void openGUI(ModelData[] models, float diameter, Action <String, bool> modelSelectedCB)
{
if (guiOpen)
{
throw new NotSupportedException("Cannot open a GUI when it is already open!");
}
EditorLogic editor = EditorLogic.fetch;
if (editor != null)
{
editor.Lock(true, true, true, "SSTUModelSelectLock");
}
adapters = ModelGUISelection.createFromModelData(models, diameter);
modelSelectedCallback = modelSelectedCB;
guiOpen = true;
shouldClose = false;
UIPartActionController.Instance.Deactivate();
}