idTech4.idGameConsole.DrawNotify C# (CSharp) Method

DrawNotify() private method

private DrawNotify ( ) : void
return void
		private void DrawNotify()
		{
			if(idE.CvarSystem.GetBool("con_noPrint") == true)
			{
				return;
			}

			Vector4 color = idColor.White;
			idE.RenderSystem.Color = color;

			int y = 0;

			for(int i = _currentLine - (idGameConsole.NotificationCount + 1); i <= _currentLine; i++)
			{
				if(i < 0)
				{
					continue;
				}

				int time = _notificationTimes[i % idGameConsole.NotificationCount];

				if(time == 0)
				{
					continue;
				}

				time = idE.System.FrameTime - time;

				if(time > (idE.CvarSystem.GetFloat("con_notifyTime") * 1000))
				{
					continue;
				}

				if(i >= _buffer.Count)
				{
					break;
				}

				string text = _buffer[i];
				int length = text.Length;

				for(int n = 0, x = 0; n < length; n++, x++)
				{
					if(idHelper.IsColor(text, n) == true)
					{
						color = idHelper.ColorForIndex(text[n + 1]);
						idE.RenderSystem.Color = color;
						n += 1;
		
						continue;
					}

					idE.RenderSystem.DrawSmallCharacter((x + 1) * idE.SmallCharacterWidth, y, text[n], _charSetShader);
				}

				y += idE.SmallCharacterHeight;
			}

			idE.RenderSystem.Color = idColor.Cyan;
		}