aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Console/ConsoleBase.cs
diff options
context:
space:
mode:
authorMelanie Thielker2009-02-10 12:25:29 +0000
committerMelanie Thielker2009-02-10 12:25:29 +0000
commita1393db7f0cb542f10f52ac739c78f15ee28ce77 (patch)
tree4b4349f350255103d0073fce34a2d80d7d66e389 /OpenSim/Framework/Console/ConsoleBase.cs
parentCommented out a problematic test that needs more careful revision. (diff)
downloadopensim-SC_OLD-a1393db7f0cb542f10f52ac739c78f15ee28ce77.zip
opensim-SC_OLD-a1393db7f0cb542f10f52ac739c78f15ee28ce77.tar.gz
opensim-SC_OLD-a1393db7f0cb542f10f52ac739c78f15ee28ce77.tar.bz2
opensim-SC_OLD-a1393db7f0cb542f10f52ac739c78f15ee28ce77.tar.xz
Stopgap measure: To use gridlaunch, or GUI, start opensim with
OpenSim.exe -gui=true
Diffstat (limited to 'OpenSim/Framework/Console/ConsoleBase.cs')
-rw-r--r--OpenSim/Framework/Console/ConsoleBase.cs30
1 files changed, 30 insertions, 0 deletions
diff --git a/OpenSim/Framework/Console/ConsoleBase.cs b/OpenSim/Framework/Console/ConsoleBase.cs
index 7e4397b..e98944c 100644
--- a/OpenSim/Framework/Console/ConsoleBase.cs
+++ b/OpenSim/Framework/Console/ConsoleBase.cs
@@ -379,6 +379,7 @@ namespace OpenSim.Framework.Console
379 public Commands Commands = new Commands(); 379 public Commands Commands = new Commands();
380 private bool echo = true; 380 private bool echo = true;
381 private List<string> history = new List<string>(); 381 private List<string> history = new List<string>();
382 private bool gui = false;
382 383
383 public object ConsoleScene = null; 384 public object ConsoleScene = null;
384 385
@@ -401,6 +402,11 @@ namespace OpenSim.Framework.Console
401 "Get general command list or more detailed help on a specific command", Help); 402 "Get general command list or more detailed help on a specific command", Help);
402 } 403 }
403 404
405 public void SetGuiMode(bool mode)
406 {
407 gui = mode;
408 }
409
404 private void AddToHistory(string text) 410 private void AddToHistory(string text)
405 { 411 {
406 while (history.Count >= 100) 412 while (history.Count >= 100)
@@ -813,6 +819,30 @@ namespace OpenSim.Framework.Console
813 echo = e; 819 echo = e;
814 int historyLine = history.Count; 820 int historyLine = history.Count;
815 821
822 if (gui)
823 {
824 System.Console.Write("{0}", prompt);
825 string cmdinput = System.Console.ReadLine();
826
827 if (isCommand)
828 {
829 string[] cmd = Commands.Resolve(Parser.Parse(cmdinput));
830
831 if (cmd.Length != 0)
832 {
833 int i;
834
835 for (i=0 ; i < cmd.Length ; i++)
836 {
837 if (cmd[i].Contains(" "))
838 cmd[i] = "\"" + cmd[i] + "\"";
839 }
840 return String.Empty;
841 }
842 }
843 return cmdinput;
844 }
845
816 System.Console.CursorLeft = 0; // Needed for mono 846 System.Console.CursorLeft = 0; // Needed for mono
817 System.Console.Write(" "); // Needed for mono 847 System.Console.Write(" "); // Needed for mono
818 848