Jump to content

TheDominatorIV

Members
  • Posts

    7
  • Joined

  • Last visited

Everything posted by TheDominatorIV

  1. Thanks soooooooooooooooo much this has kept me puzzled for quite a while
  2. Can anyone help me programing a clickable button to do something (at the moment it should open a separate webpage) here is my code so far: Code: [KSPAddon(KSPAddon.Startup.EditorAny, false)] public class Class1 : MonoBehaviour { private static Rect windowPosition = new Rect(0,0,300,50); private static GUIStyle windowStyle = null; public void Awake() { RenderingManager.AddToPostDrawQueue(0, OnDraw); } public void Start() { windowStyle = new GUIStyle(HighLogic.Skin.window); } private void OnDraw() { windowPosition = GUI.Window(1234, windowPosition, OnWindow, "Open BBC", windowStyle); } private void OnWindow(int windowID) { GUILayout.BeginHorizontal(); GUILayout.Label("Open BBC"); if(GUILayout.Button("GO")) { System.Diagnostics.Process.Start("http://www.bbc.co.uk"); } GUILayout.EndHorizontal(); GUI.DragWindow(); } } At the moment when I go into ksp the window doesn't appear
×
×
  • Create New...