// Returns a list (possibly empty) of already-tested Kerbal names
        private List <string> getTestedKerbalNames()
        {
            List <string> rv = new List <string>();

            if (exp.getActiveStepIndex() > 0)
            {
                var expSteps = exp.getExperimentSteps();
                for (int i = 0, count = expSteps.Count; i < count; i++)
                {
                    var krs = expSteps[i];
                    if (krs.getSubjectName() != "")
                    {
                        rv.Add(krs.getSubjectName());
                    }
                }
            }
            return(rv);
        }
Esempio n. 2
0
        void showMoveGui(int id)
        {
            GUILayout.BeginVertical();
            moveScrollPos = GUILayout.BeginScrollView(moveScrollPos, GUILayout.Width(230), GUILayout.Height(350));
            GUILayout.Label("Test subjects needed: " + exp.getTestSubjectsNeeded());
            if (exp.isTestSubjectAvailable())
            {
                GUILayout.Label("Choose a Kerbal:");
                foreach (string s in avilableSubjects)
                {
                    if (GUILayout.Button(s))
                    {
                        exp.getActiveStep().start(s, cbMethod);
                        closeGui();
                    }
                }
            }
            if (exp.getActiveStepIndex() > 0)
            {
                GUILayout.Label("Already tested:");


                foreach (KerbalResearchStep krs in exp.getExperimentSteps())
                {
                    if (krs.getSubjectName() != "")
                    {
                        GUILayout.BeginHorizontal();
                        GUILayout.Space(20);
                        GUILayout.Label(krs.getSubjectName());
                        GUILayout.EndHorizontal();
                    }
                }
            }
            GUILayout.EndScrollView();
            if (GUILayout.Button("Close"))
            {
                closeGui();
                cbMethod(false);
            }
            GUILayout.EndVertical();
            GUI.DragWindow();
        }