UWindow
Class UWindowWrappedTextArea

source: e:\games\UnrealTournament\UWindow\Classes\UWindowWrappedTextArea.uc
Core.Object
   |
   +--UWindow.UWindowBase
      |
      +--UWindow.UWindowWindow
         |
         +--UWindow.UWindowDialogControl
            |
            +--UWindow.UWindowTextAreaControl
               |
               +--UWindow.UWindowWrappedTextArea
Direct Known Subclasses:UTFadeTextArea

class UWindowWrappedTextArea
extends UWindow.UWindowTextAreaControl



Function Summary
 void Paint(Canvas C, float X, float Y)



Source Code


00001	class UWindowWrappedTextArea extends UWindowTextAreaControl;
00002	
00003	function Paint( Canvas C, float X, float Y )
00004	{
00005		local int i, j, Line;
00006		local int TempHead, TempTail;
00007		local float XL, YL;
00008	
00009		C.Font = Root.Fonts[Font];
00010		C.DrawColor.R = 255;
00011		C.DrawColor.G = 255;
00012		C.DrawColor.B = 255;
00013	
00014		TextSize(C, "TEST", XL, YL);
00015		VisibleRows = WinHeight / YL;
00016	
00017		if (bScrollable)
00018		{
00019			VertSB.SetRange(0, Lines, VisibleRows);
00020		}
00021	
00022		TempHead = Head;
00023		TempTail = Tail;
00024		Line = TempHead;
00025		TextArea[Line] = Prompt;
00026		if (bScrollable)
00027		{
00028			if (VertSB.MaxPos - VertSB.Pos > 0)
00029			{
00030				Line -= VertSB.MaxPos - VertSB.Pos;
00031				TempTail -= VertSB.MaxPos - VertSB.Pos;
00032			}
00033		}
00034		for (i=0; i<VisibleRows; i++)
00035		{
00036			WrapClipText(C, 2, YL*(VisibleRows-i-1), TextArea[Line-1]);
00037			Line--;
00038			if (TempTail == Line)
00039				break;
00040			if (Line < 0)
00041				Line = BufSize-1;
00042		}
00043	}
00044	
00045	defaultproperties
00046	{
00047	}

End Source Code