// Is called for every Window Content in the Plugin internal override void DrawWindow(int id) { //Debug.Log("ResourceRecovery: DrawWindows: currentGameScene=" + currentGameScene); if (currentGameScene == "SPACECENTER") { /* //if (firstRun != true) { RunCount = 0; lastUpdate = 0.0f; firstRun = false; } if ((Time.time - lastUpdate) > logInterval || firstRun != true) { Debug.Log("ResourceRecovery: DrawWindow() running (RunCount=" + RunCount + "): lastUpdate = " + lastUpdate + " Time.time = " + Time.time); firstRun = true; lastUpdate = Time.time; firstRun = true; RunCount++; } */ SC_Window sc = new SC_Window(); GUILayout.BeginHorizontal(); if (GUI.Button(new Rect(WindowRect.width - 25, 2f, 23f, 23f), "X")) { Visible = !Visible; } GUILayout.EndHorizontal(); sc.SC_Window_main(id, Scenario); currentGameScene = "SPACECENTER"; } else if (currentGameScene == "TRACKSTATION") { TS_Window ts = new TS_Window(); GUILayout.BeginHorizontal(); if (GUI.Button(new Rect(WindowRect.width - 25, 2f, 23f, 23f), "X")) { Visible = !Visible; } GUILayout.EndHorizontal(); ts.TS_Window_main(id, Scenario); currentGameScene = "TRACKSTATION"; } else if (currentGameScene == "FLIGHT") { F_Window fw = new F_Window(); GUILayout.BeginHorizontal(); if (GUI.Button(new Rect(WindowRect.width - 25, 2f, 23f, 23f), "X")) { Visible = !Visible; } GUILayout.EndHorizontal(); fw.F_Window_main(id, Scenario); currentGameScene = "FLIGHT"; } }
// Is called for every Window Content in the Plugin internal override void DrawWindow(int id) { //Debug.Log("ResourceRecovery: DrawWindows: currentGameScene=" + currentGameScene); if (currentGameScene == "SPACECENTER") { SC_Window sc = new SC_Window(); GUILayout.BeginHorizontal(); if (GUI.Button(new Rect(WindowRect.width - 25, 2f, 23f, 23f), "X")) { Visible = !Visible; } GUILayout.EndHorizontal(); sc.SC_Window_main(id); currentGameScene = "SPACECENTER"; } else if (currentGameScene == "TRACKSTATION") { TS_Window ts = new TS_Window(); GUILayout.BeginHorizontal(); if (GUI.Button(new Rect(WindowRect.width - 25, 2f, 23f, 23f), "X")) { Visible = !Visible; } GUILayout.EndHorizontal(); ts.TS_Window_main(id); currentGameScene = "TRACKSTATION"; } else if (currentGameScene == "FLIGHT") { F_Window fw = new F_Window(); GUILayout.BeginHorizontal(); if (GUI.Button(new Rect(WindowRect.width - 25, 2f, 23f, 23f), "X")) { Visible = !Visible; } GUILayout.EndHorizontal(); fw.F_Window_main(id); currentGameScene = "FLIGHT"; } /* */ }