Exemple #1
0
    void OnGUI()
    {
        bool  serverRunning = RT.booleanCast(((Atom)RT.var("arcadia.repl", "server-running").deref()).deref());
        Color oldColor      = GUI.color;

        if (serverRunning)
        {
            GUI.color = Color.red;
            if (GUILayout.Button("Stop REPL"))
            {
                ClojureRepl.StopREPL();
            }
            GUI.color = oldColor;

            if (replSocket != null)
            {
                GUILayout.Label("REPL is listening on " + replSocket.Client.LocalEndPoint);
            }
        }
        else
        {
            GUI.color = Color.green;
            if (GUILayout.Button("Start REPL"))
            {
                ClojureRepl.StartREPL();
            }
            GUI.color = oldColor;

            GUILayout.Label("REPL is not running");
        }
    }
Exemple #2
0
    void OnGUI()
    {
        if (RT.booleanCast(RT.var("arcadia.repl", "server-running").deref()))
        {
            GUI.color = Color.red;
            if (GUILayout.Button("Stop REPL"))
            {
                ClojureRepl.StopREPL();
            }

            GUILayout.Label("REPL is listening");
        }
        else
        {
            GUI.color = Color.green;
            if (GUILayout.Button("Start REPL"))
            {
                ClojureRepl.StartREPL();
            }

            GUILayout.Label("REPL is not running");
        }
    }