idTech4.Renderer.idRenderSystem.DrawBigString C# (CSharp) Method

DrawBigString() public method

Draws a multi-colored string with a drop shadow, optionally forcing to a fixed color. Coordinates are at 640 by 480 virtual resolution.
public DrawBigString ( int x, int y, string str, Vector4 color, bool forceColor, idMaterial material ) : void
x int
y int
str string
color Vector4
forceColor bool
material idMaterial
return void
		public void DrawBigString(int x, int y, string str, Vector4 color, bool forceColor, idMaterial material)
		{
			Vector4 tmpColor;
			int xx = x;
			int length = str.Length;

			this.Color = color;

			for(int i = 0; i < length; i++)
			{
				if(idHelper.IsColor(str, i) == true)
				{
					if(forceColor == false)
					{
						if(str[i + 1] == (char) idColorIndex.Default)
						{
							this.Color = color;
						}
						else
						{
							tmpColor = idHelper.ColorForIndex(str[i + 1]);
							tmpColor.W = color.W;

							this.Color = tmpColor;
						}
					}

					i += 2;
					continue;
				}

				DrawBigCharacter(xx, y, str[i], material);

				xx += idE.BigCharacterWidth;
			}

			this.Color = idColor.White;
		}