Core.Object | +--UWindow.UWindowBase | +--UWindow.UWindowWindow | +--UTMenu.MessageWindow
UTFadeTextArea
TextArea
Color
TextColor
void
AddMessage(string NewMessage)
BeforePaint(Canvas C, float X, float Y)
Created()
00001 class MessageWindow extends UWindowWindow; 00002 00003 var UTFadeTextArea TextArea; 00004 var Color TextColor; 00005 00006 function Created() 00007 { 00008 local float AreaLeft, AreaTop, AreaWidth, AreaHeight; 00009 00010 Super.Created(); 00011 00012 bLeaveOnScreen = True; 00013 bAlwaysOnTop = True; 00014 00015 WinLeft = Root.WinWidth/4; 00016 WinTop = Root.WinHeight/4; 00017 WinWidth = Root.WinWidth/2; 00018 WinHeight = Root.WinHeight/2; 00019 00020 AreaLeft = 0; 00021 AreaTop = 0; 00022 AreaWidth = WinWidth; 00023 AreaHeight = WinHeight; 00024 00025 TextArea = UTFadeTextArea(CreateWindow(Class<UWindowWindow>(DynamicLoadObject("UTMenu.UTFadeTextArea", Class'Class')), AreaLeft, AreaTop, AreaWidth, AreaHeight)); 00026 TextArea.FadeFactor = 3; 00027 TextArea.MyFont = class'UTLadderStub'.Static.GetStubClass().Static.GetBigFont(Root); 00028 TextColor.R = 255; 00029 TextColor.G = 255; 00030 TextColor.B = 255; 00031 TextArea.SetTextColor(TextColor); 00032 } 00033 00034 function BeforePaint( Canvas C, float X, float Y ) 00035 { 00036 local float AreaLeft, AreaTop, AreaWidth, AreaHeight; 00037 00038 Super.BeforePaint(C, X, Y); 00039 00040 WinLeft = Root.WinWidth/4; 00041 WinTop = Root.WinHeight/4; 00042 WinWidth = Root.WinWidth/2; 00043 WinHeight = Root.WinHeight/2; 00044 00045 AreaLeft = 0; 00046 AreaTop = 0; 00047 AreaWidth = WinWidth; 00048 AreaHeight = WinHeight; 00049 00050 TextArea.SetSize( AreaWidth, AreaHeight ); 00051 TextArea.WinLeft = AreaLeft; 00052 TextArea.WinTop = AreaTop; 00053 } 00054 00055 function AddMessage( string NewMessage ) 00056 { 00057 TextArea.Clear(); 00058 TextArea.AddText( NewMessage ); 00059 } 00060 00061 defaultproperties 00062 { 00063 }