Ejemplo n.º 1
0
    void OnGUI()
    {
        if (process != null)
        {
            scrollPosition = GUILayout.BeginScrollView(scrollPosition);

            GUILayout.BeginVertical();

            EditorGUILayout.SelectableLabel(command, labelStyle, GUILayout.MinHeight(50), GUILayout.ExpandHeight(true));

            GUIHelpers.FormattedLabel(outerr.ToString(), labelStyle.font, labelStyle.font, labelStyle.font, TextAlignment.Left);

            GUILayout.FlexibleSpace();

            GUILayout.EndVertical();

            GUILayout.EndScrollView();

            GUILayout.BeginHorizontal();
            inputText = GUILayout.TextField(inputText);
            if (GUILayout.Button("Send", GUILayout.Width(100)))
            {
                process.StandardInput.WriteLine(inputText);
                inputText = string.Empty;
            }
            GUILayout.EndHorizontal();

            if (exited)
            {
                GUI.color = process.ExitCode != 0 ? Color.red : Color.green;
            }

            if (GUILayout.Button(cancelString))
            {
                this.Close();
            }

            GUI.color = Color.white;
        }
        else
        {
            this.Close();
        }
    }