예제 #1
0
        public static string FormatAsRtf(string buffer, ConsoleColorTheme theme)
        {
            StringBuilder           builder = new StringBuilder();
            Stack <ConsoleColorExt> stack   = new Stack <ConsoleColorExt>();

            foreach (Match match in FormatRegex.Matches(buffer))
            {
                if (match.Groups["Tag"].Success)
                {
                    ConsoleColorExt item = ParseColour(match.Groups["Inner"].Value, theme);
                    stack.Push(item);
                    builder.Append(@"\cf" + ((((int)item) + 1)).ToString() + @"\ulnone ");
                }
                else if (match.Groups["EndTag"].Success)
                {
                    if (stack.Count < 0)
                    {
                        throw new Exception(string.Format(Strings.ConsoleInterpreter_UnexpectedEndTag, match.Index));
                    }
                    builder.Append(@"\cf" + ((int)(((ConsoleColorExt)stack.Pop()) + (int)ConsoleColorExt.DarkBlue)).ToString() + @"\ulnone ");
                }
                else if (match.Groups["Text"].Success)
                {
                    string str = UnescapeString(match.Value);
                    builder.Append(ReplaceLineEnds(str));
                }
            }
            return(builder.ToString());
        }
예제 #2
0
 public static string Format(ConsoleColorExt color, string message)
 {
     if (color != ConsoleColorExt.Inhreit)
     {
         return string.Format("<c:{0}>{1}</c>", (int) color, EscapeString(message));
     }
     return string.Format("{0}", EscapeString(message));
 }
예제 #3
0
 public static string Format(ConsoleColorExt color, string format, params object[] args)
 {
     if (color != ConsoleColorExt.Inhreit)
     {
         return(string.Format("<c:{0}>{1}</c>{2}", (int)color, EscapeString(string.Format(format, args)), Environment.NewLine));
     }
     return(EscapeString(string.Format(format, args)));
 }
예제 #4
0
 public static string Format(ConsoleColorExt color, string message)
 {
     if (color != ConsoleColorExt.Inhreit)
     {
         return(string.Format("<c:{0}>{1}</c>", (int)color, EscapeString(message)));
     }
     return(string.Format("{0}", EscapeString(message)));
 }
예제 #5
0
 public static string FormatLine(ConsoleColorExt color, string message)
 {
     if (color != ConsoleColorExt.Inhreit)
     {
         return(string.Format("<c:{0}>{1}</c>{2}", (int)color, EscapeString(message), Environment.NewLine));
     }
     return(string.Format("{0}{1}", EscapeString(message), Environment.NewLine));
 }
예제 #6
0
 public static string Format(ConsoleColorExt color, string format, params object[] args)
 {
     if (color != ConsoleColorExt.Inhreit)
     {
         return string.Format("<c:{0}>{1}</c>{2}", (int) color, EscapeString(string.Format(format, args)), Environment.NewLine);
     }
     return EscapeString(string.Format(format, args));
 }
예제 #7
0
        private ConsoleColor GetConsoleColor(ConsoleColor current, ConsoleThemeColor color)
        {
            ConsoleColorExt ext = this.GetColor(color);

            if (ext != ConsoleColorExt.Inhreit)
            {
                return((ConsoleColor)ext);
            }
            return(current);
        }
예제 #8
0
 public void WriteLine(ConsoleColorExt color, string message)
 {
     if (color != ConsoleColorExt.Inhreit)
     {
         this.m_Result.AppendFormat("<c:{0}>{1}</c>{2}", (int)color, EscapeString(message), Environment.NewLine);
     }
     else
     {
         this.m_Result.AppendFormat("{0}{1}", EscapeString(message), Environment.NewLine);
     }
 }
예제 #9
0
        public static void WriteInterpreted(IConsole console, ConsoleColorExt colour, string buffer, int paddingLeft, int paddingRight)
        {
            ConsoleColorExt foregroundColor = console.ForegroundColor;

            if (colour != ConsoleColorExt.Inhreit)
            {
                console.ForegroundColor = colour;
            }
            WriteInterpreted(console, buffer, paddingLeft, paddingRight);
            console.ForegroundColor = foregroundColor;
        }
예제 #10
0
 public void Write(ConsoleColorExt color, string format, params object[] args)
 {
     if (color != ConsoleColorExt.Inhreit)
     {
         this.m_Result.AppendFormat("<c:{0}>{1}</c>{2}", (int)color, EscapeString(string.Format(format, args)), Environment.NewLine);
     }
     else
     {
         this.m_Result.Append(EscapeString(string.Format(format, args)));
     }
 }
예제 #11
0
 public void Write(ConsoleColorExt color, string message)
 {
     if (color != ConsoleColorExt.Inhreit)
     {
         this.m_Result.AppendFormat("<c:{0}>{1}</c>", (int)color, EscapeString(message));
     }
     else
     {
         this.m_Result.AppendFormat("{0}", EscapeString(message));
     }
 }
예제 #12
0
 public static void WriteInfoToConsole(string label, string value, ConsoleColorExt valueColor, bool extended)
 {
     RugConsole.Write(ConsoleThemeColor.TitleText, " " + label.PadRight(0x12) + ":");
     if (extended)
     {
         RugConsole.WriteLine(valueColor, value);
     }
     else if (value.Length < 0x16)
     {
         RugConsole.Write(ConsoleThemeColor.SubText, new string('.', 0x16 - value.Length));
         RugConsole.WriteLine(valueColor, value);
     }
     else
     {
         RugConsole.WriteLine(valueColor, value.Substring(value.Length - 0x16));
     }
 }
예제 #13
0
 public static void WriteLine(ConsoleVerbosity level, ConsoleColorExt colour, string str)
 {
     if (level <= m_Verbosity)
     {
         if (colour != ConsoleColorExt.Inhreit)
         {
             ConsoleColor foregroundColor = Console.ForegroundColor;
             if (colour != ConsoleColorExt.Inhreit)
             {
                 Console.ForegroundColor = (ConsoleColor)colour;
             }
             Console.WriteLine(str);
             Console.ForegroundColor = foregroundColor;
         }
         else
         {
             Console.WriteLine(str);
         }
     }
 }
예제 #14
0
        public static void WriteMessage(IConsole console, MessageDirection dir, ConsoleColorExt messageColor, string message)
        {
            lock (m_Lock)
            {
                switch (dir)
                {
                case MessageDirection.Transmit:
                    console.Write(ConsoleVerbosity.Normal, TransmitColor, "TX ");
                    break;

                case MessageDirection.Receive:
                    console.Write(ConsoleVerbosity.Normal, ReceiveColor, "RX ");
                    break;

                default:
                    break;
                }

                console.WriteLine(ConsoleVerbosity.Normal, messageColor, message);
            }
        }
예제 #15
0
        public static void WriteWrapped(ConsoleColorExt colour, string message, int paddingLeft, int paddingRight)
        {
            ConsoleColor foregroundColor = Console.ForegroundColor;

            if (colour != ConsoleColorExt.Inhreit)
            {
                Console.ForegroundColor = (ConsoleColor)colour;
            }
            int           length = BufferWidth - (paddingLeft + paddingRight);
            List <string> list   = new List <string>(message.Split(new string[] { Environment.NewLine, "\n" }, StringSplitOptions.None));
            string        str    = new string(' ', paddingLeft);

            foreach (string str2 in list)
            {
                string str3 = str2;
                if (str3.Length != 0)
                {
                    goto Label_00B2;
                }
                Console.WriteLine();
                continue;
Label_0074:
                if (str3.Length > length)
                {
                    Console.WriteLine(str + str3.Substring(0, length));
                    str3 = str3.Substring(length);
                }
                else
                {
                    Console.WriteLine(str + str3);
                    str3 = "";
                }
Label_00B2:
                if (str3.Length > 0)
                {
                    goto Label_0074;
                }
            }
            Console.ForegroundColor = foregroundColor;
        }
예제 #16
0
 public void WriteMessage(ConsoleMessage type, ConsoleColorExt colour, int errorId, string sourceFile, int line, int character, string str)
 {
     ConsoleExt.WriteMessage(type, colour, errorId, sourceFile, line, character, str);
 }
예제 #17
0
 public void WriteWarning(ConsoleColorExt colour, int id, string sourceFile, int line, int character, string str)
 {
     ConsoleExt.WriteWarning(colour, id, sourceFile, line, character, str);
 }
예제 #18
0
 public static void Write(ConsoleColorExt colour, string str)
 {
     App.Write(colour, str);
 }
예제 #19
0
 public static void WriteError(ConsoleColorExt colour, int id, string str)
 {
     App.WriteError(colour, id, str);
 }
예제 #20
0
 public static void WriteWarning(ConsoleColorExt colour, int id, string sourceFile, int line, int character, string str)
 {
     WriteMessage(ConsoleMessage.Warning, colour, id, sourceFile, line, character, str);
 }
예제 #21
0
 public static void WriteWarning(ConsoleColorExt colour, int id, string sourceFile, int line, int character, string str)
 {
     App.WriteWarning(colour, id, sourceFile, line, character, str);
 }
예제 #22
0
 public void WriteLine(ConsoleColorExt colour, string str)
 {
     ConsoleExt.WriteLine(colour, str);
 }
예제 #23
0
 public static void WriteMessage(ConsoleMessage type, ConsoleColorExt colour, int errorId, string str)
 {
     WriteMessage(type, colour, errorId, null, 0, 0, str);
 }
예제 #24
0
 public static void WriteWrapped(ConsoleColorExt colour, string message, int paddingLeft, int paddingRight)
 {
     ConsoleColor foregroundColor = Console.ForegroundColor;
     if (colour != ConsoleColorExt.Inhreit)
     {
         Console.ForegroundColor = (ConsoleColor) colour;
     }
     int length = BufferWidth - (paddingLeft + paddingRight);
     List<string> list = new List<string>(message.Split(new string[] { Environment.NewLine, "\n" }, StringSplitOptions.None));
     string str = new string(' ', paddingLeft);
     foreach (string str2 in list)
     {
         string str3 = str2;
         if (str3.Length != 0)
         {
             goto Label_00B2;
         }
         Console.WriteLine();
         continue;
     Label_0074:
         if (str3.Length > length)
         {
             Console.WriteLine(str + str3.Substring(0, length));
             str3 = str3.Substring(length);
         }
         else
         {
             Console.WriteLine(str + str3);
             str3 = "";
         }
     Label_00B2:
         if (str3.Length > 0)
         {
             goto Label_0074;
         }
     }
     Console.ForegroundColor = foregroundColor;
 }
예제 #25
0
 public void WriteError(ConsoleColorExt colour, int id, string str)
 {
     ConsoleExt.WriteError(colour, id, str);
 }
예제 #26
0
 public static void WriteWarning(ConsoleColorExt colour, int id, string sourceFile, int line, int character, string str)
 {
     WriteMessage(ConsoleMessage.Warning, colour, id, sourceFile, line, character, str);
 }
예제 #27
0
 public static void WriteWarning(ConsoleColorExt colour, int id, string str)
 {
     WriteMessage(ConsoleMessage.Warning, colour, id, str);
 }
예제 #28
0
 public static void WritePrompt(ConsoleColorExt colour, string str)
 {
     WriteMessage(ConsoleMessage.Prompt, colour, str);
 }
예제 #29
0
 public static void WriteError(ConsoleColorExt colour, int id, string str)
 {
     WriteMessage(ConsoleMessage.Error, colour, id, str);
 }
예제 #30
0
 public static void WriteLine(ConsoleVerbosity level, ConsoleColorExt colour, string str)
 {
     if (level <= m_Verbosity)
     {
         if (colour != ConsoleColorExt.Inhreit)
         {
             ConsoleColor foregroundColor = Console.ForegroundColor;
             if (colour != ConsoleColorExt.Inhreit)
             {
                 Console.ForegroundColor = (ConsoleColor) colour;
             }
             Console.WriteLine(str);
             Console.ForegroundColor = foregroundColor;
         }
         else
         {
             Console.WriteLine(str);
         }
     }
 }
예제 #31
0
 public void WriteWarning(ConsoleColorExt colour, int id, string str)
 {
     ConsoleExt.WriteWarning(colour, id, str);
 }
예제 #32
0
 public ConsoleColorState(ConsoleColorExt ForegroundColor, ConsoleColorExt BackgroundColor)
 {
     this.ForegroundColor = ForegroundColor;
     this.BackgroundColor = BackgroundColor;
 }
예제 #33
0
 public static void WritePrompt(ConsoleColorExt colour, string str)
 {
     WriteMessage(ConsoleMessage.Prompt, colour, str);
 }
예제 #34
0
 public static void WriteInfoToConsole(string label, string value, ConsoleColorExt valueColor, bool extended)
 {
     RugConsole.Write(ConsoleThemeColor.TitleText, " " + label.PadRight(0x12) + ":");
     if (extended)
     {
         RugConsole.WriteLine(valueColor, value);
     }
     else if (value.Length < 0x16)
     {
         RugConsole.Write(ConsoleThemeColor.SubText, new string('.', 0x16 - value.Length));
         RugConsole.WriteLine(valueColor, value);
     }
     else
     {
         RugConsole.WriteLine(valueColor, value.Substring(value.Length - 0x16));
     }
 }
예제 #35
0
 public static void WriteMessage(ConsoleMessage type, ConsoleColorExt colour, int errorId, string sourceFile, int line, int character, string str)
 {
     string str2 = str;
     if (IsBuildMode)
     {
         string str3 = "";
         if (type == ConsoleMessage.Warning)
         {
             if (WarningsAsErrors)
             {
                 str3 = "error";
             }
             else
             {
                 str3 = "warning";
             }
         }
         else if (type == ConsoleMessage.Prompt)
         {
             if (WarningsAsErrors)
             {
                 str3 = "error";
             }
             else
             {
                 str3 = "warning";
             }
         }
         else
         {
             str3 = "error";
         }
         string executablePath = null;
         if (sourceFile == null)
         {
             executablePath = Application.ExecutablePath;
         }
         else
         {
             executablePath = string.Concat(new object[] { sourceFile, "(", line, ",", character, ")" });
         }
         if ((str3 != "warning") || ((str3 == "warning") && ReportWarnings))
         {
             str2 = executablePath + ": " + str3 + " " + ApplicationBuildReportPrefix + errorId.ToString().PadLeft(4, '0') + ": " + str.Replace("\n", " ");
         }
     }
     ConsoleColor foregroundColor = Console.ForegroundColor;
     if (colour != ConsoleColorExt.Inhreit)
     {
         Console.ForegroundColor = (ConsoleColor) colour;
     }
     if (CanManipulateBuffer)
     {
         if (Console.CursorLeft > 0)
         {
             Console.WriteLine();
         }
         Console.WriteLine(str2);
     }
     else
     {
         Console.WriteLine(Environment.NewLine + str2);
     }
     Console.ForegroundColor = foregroundColor;
 }
예제 #36
0
 public static void WriteInfoToConsole(ConsoleVerbosity verbose, string label, string value, ConsoleColorExt valueColor, bool extended)
 {
     if (RugConsole.Verbosity >= verbose)
     {
         WriteInfoToConsole(label, value, valueColor, extended);
     }
 }
예제 #37
0
 public static void WriteWrapped(ConsoleColorExt colour, string message, int paddingLeft, int paddingRight)
 {
     App.WriteWrapped(colour, message, paddingLeft, paddingRight);
 }
예제 #38
0
 public static void WriteSimpleBanner(string str, char fill, ConsoleColorExt ForeColour, ConsoleColorExt BackColour)
 {
     WriteSimpleBanner(str, fill, 0, ForeColour, BackColour);
 }
예제 #39
0
 public static void Write(ConsoleVerbosity level, ConsoleColorExt colour, string str)
 {
     App.Write(level, colour, str);
 }
예제 #40
0
 public void Write(ConsoleColorExt colour, string str)
 {
     ConsoleExt.Write(colour, str);
 }
예제 #41
0
 public void WriteMessage(ConsoleMessage type, ConsoleColorExt colour, int errorId, string str)
 {
     ConsoleExt.WriteMessage(type, colour, errorId, str);
 }
예제 #42
0
 public void WriteError(ConsoleColorExt colour, int id, string str)
 {
     ConsoleExt.WriteError(colour, id, str);
 }
예제 #43
0
 public void WriteWarning(ConsoleColorExt colour, int id, string str)
 {
     ConsoleExt.WriteWarning(colour, id, str);
 }
예제 #44
0
 public static void WriteInterpreted(ConsoleColorExt colour, string buffer, int paddingLeft, int paddingRight)
 {
     ConsoleFormatter.WriteInterpreted(m_SystemConsole, colour, buffer, paddingLeft, paddingRight);
 }
예제 #45
0
 public void WriteWrapped(ConsoleColorExt colour, string message, int paddingLeft, int paddingRight)
 {
     ConsoleExt.WriteWrapped(colour, message, paddingLeft, paddingRight);
 }
예제 #46
0
 public static void WriteError(ConsoleColorExt colour, int id, string str)
 {
     WriteMessage(ConsoleMessage.Error, colour, id, str);
 }
예제 #47
0
 public static void WriteInterpreted(ConsoleColorExt colour, string buffer, int paddingLeft, int paddingRight)
 {
     ConsoleFormatter.WriteInterpreted(m_SystemConsole, colour, buffer, paddingLeft, paddingRight);
 }
예제 #48
0
 public static void WriteInterpreted(ConsoleColorExt colour, string buffer, int paddingLeft, int paddingRight)
 {
     App.WriteInterpreted(colour, buffer, paddingLeft, paddingRight);
 }
예제 #49
0
 public static void WriteMessage(ConsoleMessage type, ConsoleColorExt colour, string str)
 {
     WriteMessage(type, colour, 0, str);
 }
예제 #50
0
 public static void WriteMessage(ConsoleMessage type, ConsoleColorExt colour, int errorId, string str)
 {
     App.WriteMessage(type, colour, errorId, str);
 }
예제 #51
0
        public static void WriteMessage(ConsoleMessage type, ConsoleColorExt colour, int errorId, string sourceFile, int line, int character, string str)
        {
            string str2 = str;

            if (IsBuildMode)
            {
                string str3 = "";
                if (type == ConsoleMessage.Warning)
                {
                    if (WarningsAsErrors)
                    {
                        str3 = "error";
                    }
                    else
                    {
                        str3 = "warning";
                    }
                }
                else if (type == ConsoleMessage.Prompt)
                {
                    if (WarningsAsErrors)
                    {
                        str3 = "error";
                    }
                    else
                    {
                        str3 = "warning";
                    }
                }
                else
                {
                    str3 = "error";
                }
                string executablePath = null;
                if (sourceFile == null)
                {
                    executablePath = Application.ExecutablePath;
                }
                else
                {
                    executablePath = string.Concat(new object[] { sourceFile, "(", line, ",", character, ")" });
                }
                if ((str3 != "warning") || ((str3 == "warning") && ReportWarnings))
                {
                    str2 = executablePath + ": " + str3 + " " + ApplicationBuildReportPrefix + errorId.ToString().PadLeft(4, '0') + ": " + str.Replace("\n", " ");
                }
            }
            ConsoleColor foregroundColor = Console.ForegroundColor;

            if (colour != ConsoleColorExt.Inhreit)
            {
                Console.ForegroundColor = (ConsoleColor)colour;
            }
            if (CanManipulateBuffer)
            {
                if (Console.CursorLeft > 0)
                {
                    Console.WriteLine();
                }
                Console.WriteLine(str2);
            }
            else
            {
                Console.WriteLine(Environment.NewLine + str2);
            }
            Console.ForegroundColor = foregroundColor;
        }
예제 #52
0
 public static void WriteMessage(ConsoleMessage type, ConsoleColorExt colour, int errorId, string sourceFile, int line, int character, string str)
 {
     App.WriteMessage(type, colour, errorId, sourceFile, line, character, str);
 }
예제 #53
0
 public static void WriteWarning(ConsoleColorExt colour, int id, string str)
 {
     WriteMessage(ConsoleMessage.Warning, colour, id, str);
 }
예제 #54
0
 public static void WriteWarning(ConsoleColorExt colour, int id, string str)
 {
     App.WriteWarning(colour, id, str);
 }
예제 #55
0
 public static void WriteSimpleBanner(string str, char fill, int paddingRight, ConsoleColorExt ForeColour, ConsoleColorExt BackColour)
 {
     ConsoleColorState colorState = RugConsole.ColorState;
     int num = RugConsole.BufferWidth - paddingRight;
     int count = (num - str.Length) / 2;
     if (ForeColour != ConsoleColorExt.Inhreit)
     {
         RugConsole.ForegroundColor = ForeColour;
     }
     if (BackColour != ConsoleColorExt.Inhreit)
     {
         RugConsole.BackgroundColor = BackColour;
     }
     if (paddingRight > 0)
     {
         RugConsole.Write(ConsoleVerbosity.Silent, new string(fill, count) + str + new string(fill, num - (count + str.Length)));
         RugConsole.ColorState = colorState;
         RugConsole.WriteLine(ConsoleVerbosity.Silent);
     }
     else
     {
         RugConsole.Write(ConsoleVerbosity.Silent, new string(fill, count) + str + new string(fill, num - (count + str.Length)));
         RugConsole.ColorState = colorState;
         RugConsole.Write(ConsoleVerbosity.Silent, new string(' ', RugConsole.BufferWidth));
         if (RugConsole.CanManipulateBuffer)
         {
             RugConsole.CursorTop--;
         }
     }
 }
예제 #56
0
 public static void WriteMessage(ConsoleMessage type, ConsoleColorExt colour, string str)
 {
     WriteMessage(type, colour, 0, str);
 }
예제 #57
0
 public void Write(ConsoleVerbosity level, ConsoleColorExt colour, string str)
 {
     ConsoleExt.Write(level, colour, str);
 }
예제 #58
0
 public static void WriteInfoToConsole(string label, string value, ConsoleColorExt valueColor)
 {
     RugConsole.Write(ConsoleThemeColor.TitleText, " " + label.PadRight(0x12) + ":");
     RugConsole.Write(ConsoleThemeColor.SubText, new string('.', 0x16 - value.Length));
     RugConsole.WriteLine(valueColor, value);
 }
예제 #59
0
 public void WriteInterpreted(ConsoleColorExt colour, string buffer, int paddingLeft, int paddingRight)
 {
     ConsoleExt.WriteInterpreted(colour, buffer, paddingLeft, paddingRight);
 }
예제 #60
0
		public static void WriteInterpreted(View3D view,
											RectangleF RemainingBounds, SizeF lineSize, int maxWidth, 
											string buffer, FontType fontType, Vector3 start, float scale, 
											ConsoleColorExt foregroundColor, Color4[] colorLookup,
											SlimDX.DataStream TriangleVerts, ref int TriangleVertsCount,
											SlimDX.DataStream TriangleIndices, ref int TriangleIndicesCount)
		{
			string prefix = ""; 
			int lastIndex = 0;
			Stack<ConsoleColorExt> stack = new Stack<ConsoleColorExt>();

			ConsoleColorExt activeForegroundColor = foregroundColor;

			float x = start.X, y = start.Y; 

			foreach (Match match in ConsoleFormatter.FormatRegex.Matches(buffer))
			{
				if (match.Groups["Tag"].Success)
				{
					// start tag 
					// parse the tags inner value
					// e.g. c:# (where # is the name or ID of the colour to use (From ConsoleColourExt) 
					// add the parsed colour to the stack 

					ConsoleColorExt col = ConsoleFormatter.ParseColour(match.Groups["Inner"].Value, RC.Theme);

					stack.Push(activeForegroundColor);

					activeForegroundColor = col;
				}
				else if (match.Groups["EndTag"].Success)
				{
					// end tag 
					// handle stack changes
					if (stack.Count >= 0)
					{
						activeForegroundColor = stack.Pop();
					}
					else
					{
						throw new Exception(string.Format("Unexpected end tag at index {0}", match.Index));
					}
				}
				else if (match.Groups["Text"].Success)
				{
					string wholeMessage = ConsoleFormatter.UnescapeString(match.Value);

					List<string> lines = ConsoleFormatter.SplitLinebreaks(wholeMessage);

					foreach (string line in lines)
					{
						string str = line;

						if (str == "\n" || str == Environment.NewLine)
						{
							//BufferWriteLine("");
							x = start.X;
							y += lineSize.Height; 

							lastIndex = 0;
						}
						else
						{
							while (str.Length > 0)
							{
								if (lastIndex + str.Length > maxWidth)
								{
									int lastWord = str.LastIndexOf(' ', maxWidth - lastIndex, maxWidth - lastIndex);

									if (lastWord <= 0)
									{
										lastWord = maxWidth - lastIndex;
									}

									string toRender;

									if (lastIndex > 0)
									{
										toRender = str.Substring(0, lastWord);
									}
									else
									{
										toRender = prefix + str.Substring(0, lastWord);
									}

									if (maxWidth == lastIndex + toRender.Length)
									{
										WriteString(view,
													RemainingBounds,
													toRender, fontType, ref x, ref y, start.Z, scale, colorLookup[(int)activeForegroundColor],
													TriangleVerts, ref TriangleVertsCount,
													TriangleIndices, ref TriangleIndicesCount);
										
										//BufferWrite(toRender);
									}
									else
									{
										WriteString(view,
													RemainingBounds,
													toRender, fontType, ref x, ref y, start.Z, scale, colorLookup[(int)activeForegroundColor],
													TriangleVerts, ref TriangleVertsCount,
													TriangleIndices, ref TriangleIndicesCount);

//										BufferWriteLine(toRender);
										
										x = start.X;
										y += lineSize.Height; 
									}

									str = str.Substring(lastWord + 1);

									lastIndex = 0;
								}
								else
								{
									string toRender = str;

									if (lastIndex <= 0)
									{
										toRender = prefix + str;
									}

									//BufferWrite(toRender);
									WriteString(view,
													RemainingBounds,
													toRender, fontType, ref x, ref y, start.Z, scale, colorLookup[(int)activeForegroundColor],
													TriangleVerts, ref TriangleVertsCount,
													TriangleIndices, ref TriangleIndicesCount);
										
									lastIndex += str.Length;

									str = "";
								}
							}
						}
					}
				}
			}
		}