mirror of
https://github.com/opensim/opensim.git
synced 2026-08-08 10:15:33 +08:00
Stopgap measure: To use gridlaunch, or GUI, start opensim with
OpenSim.exe -gui=true
This commit is contained in:
@@ -379,6 +379,7 @@ namespace OpenSim.Framework.Console
|
||||
public Commands Commands = new Commands();
|
||||
private bool echo = true;
|
||||
private List<string> history = new List<string>();
|
||||
private bool gui = false;
|
||||
|
||||
public object ConsoleScene = null;
|
||||
|
||||
@@ -401,6 +402,11 @@ namespace OpenSim.Framework.Console
|
||||
"Get general command list or more detailed help on a specific command", Help);
|
||||
}
|
||||
|
||||
public void SetGuiMode(bool mode)
|
||||
{
|
||||
gui = mode;
|
||||
}
|
||||
|
||||
private void AddToHistory(string text)
|
||||
{
|
||||
while (history.Count >= 100)
|
||||
@@ -813,6 +819,30 @@ namespace OpenSim.Framework.Console
|
||||
echo = e;
|
||||
int historyLine = history.Count;
|
||||
|
||||
if (gui)
|
||||
{
|
||||
System.Console.Write("{0}", prompt);
|
||||
string cmdinput = System.Console.ReadLine();
|
||||
|
||||
if (isCommand)
|
||||
{
|
||||
string[] cmd = Commands.Resolve(Parser.Parse(cmdinput));
|
||||
|
||||
if (cmd.Length != 0)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i=0 ; i < cmd.Length ; i++)
|
||||
{
|
||||
if (cmd[i].Contains(" "))
|
||||
cmd[i] = "\"" + cmd[i] + "\"";
|
||||
}
|
||||
return String.Empty;
|
||||
}
|
||||
}
|
||||
return cmdinput;
|
||||
}
|
||||
|
||||
System.Console.CursorLeft = 0; // Needed for mono
|
||||
System.Console.Write(" "); // Needed for mono
|
||||
|
||||
|
||||
Reference in New Issue
Block a user