//private static Vector2 presetScrollPos; public static void openGUI(SSTUModularBooster srbModule, FloatCurve inputCurve) { module = srbModule; id = module.GetInstanceID(); MonoBehaviour.print("ThrustCurveEditor-input curve: " + curve + "\n" + SSTUUtils.printFloatCurve(curve)); setupCurveData(inputCurve); texture = new Texture2D(graphWidth, graphHeight); updateGraphTexture(); loadPresets(); }
public static void openGUI(SSTUEngineThrustCurveGUI srbModule, string preset, FloatCurve inputCurve) { module = srbModule; id = module.GetInstanceID(); MonoBehaviour.print("ThrustCurveEditor-input curve: " + curve + "\n" + SSTUUtils.printFloatCurve(curve)); presetName = preset; setupCurveData(inputCurve); texture = new Texture2D(graphWidth, graphHeight); updateGraphTexture(); loadPresets(); if (activeGUI == null) { activeGUI = srbModule.gameObject.AddComponent <ThrustCurveEditorGUI>(); SSTULog.debug("Created new gui object: " + activeGUI); } }