//private static Rect presetWindowRect = new Rect(Screen.width - 900 - presetWidth - margin, 40, presetWidth + margin, presetHeight + margin); //private static bool presetWindowOpen = false; public static void openGUI(ROEEngineThrustCurveGUI srbModule, string preset, FloatCurve inputCurve) { module = srbModule; id = module.GetInstanceID(); ROELog.debug("ThrustCurveEditor-input curve: " + curve + "\n" + ROEUtil.printFloatCurve(curve)); presetName = preset; setupCurveData(inputCurve); texture = new Texture2D(graphWidth, graphHeight); updateGraphTexture(); loadPresets(); if (activeGUI == null) { activeGUI = srbModule.gameObject.AddComponent <ThrustCurveEditorGUI>(); ROELog.debug("ROEngines - Created new gui object: " + activeGUI); } }
public void openThrustCurveGUI() { ThrustCurveEditorGUI.openGUI(this, presetCurveName, currentCurve); }