void OnGUI() { bool serverRunning = RT.booleanCast(((Atom)RT.var("arcadia.internal.repl", "server-running").deref()).deref()); Color oldColor = GUI.color; if (serverRunning) { GUI.color = Color.red; if (GUILayout.Button("Stop REPL")) { Repl.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")) { Repl.StartREPL(); } GUI.color = oldColor; GUILayout.Label("REPL is not running"); } }
static void StartREPL() { Repl.StartREPL(); }