UWindow
Class UWindowConsoleWindow

source: e:\games\UnrealTournament\UWindow\Classes\UWindowConsoleWindow.uc
Core.Object
   |
   +--UWindow.UWindowBase
      |
      +--UWindow.UWindowWindow
         |
         +--UWindow.UWindowFramedWindow
            |
            +--UWindow.UWindowConsoleWindow
Direct Known Subclasses:UMenuConsoleWindow

class UWindowConsoleWindow
extends UWindow.UWindowFramedWindow


Variables
 OldParentWidth, OldParentHeight


Function Summary
 void Close(optional bool)
 void Created()
 void ResolutionChanged(float W, float H)
 void SetDimensions()
 void ShowWindow()



Source Code


00001	class UWindowConsoleWindow extends UWindowFramedWindow;
00002	
00003	var float OldParentWidth, OldParentHeight;
00004	
00005	function Created() 
00006	{
00007		Super.Created();
00008		bSizable = True;
00009		bStatusBar = True;
00010		bLeaveOnScreen = True;
00011	
00012		OldParentWidth = ParentWindow.WinWidth;
00013		OldParentHeight = ParentWindow.WinHeight;
00014	
00015		SetDimensions();
00016	
00017		SetAcceptsFocus();
00018	}
00019	
00020	function ShowWindow()
00021	{
00022		Super.ShowWindow();
00023	
00024		if(ParentWindow.WinWidth != OldParentWidth || ParentWindow.WinHeight != OldParentHeight)
00025		{
00026			SetDimensions();
00027			OldParentWidth = ParentWindow.WinWidth;
00028			OldParentHeight = ParentWindow.WinHeight;
00029		}
00030	}
00031	
00032	function ResolutionChanged(float W, float H)
00033	{
00034		SetDimensions();
00035	}
00036	
00037	function SetDimensions()
00038	{
00039		if (ParentWindow.WinWidth < 500)
00040		{
00041			SetSize(200, 150);
00042		} else {
00043			SetSize(410, 310);
00044		}
00045		WinLeft = ParentWindow.WinWidth/2 - WinWidth/2;
00046		WinTop = ParentWindow.WinHeight/2 - WinHeight/2;
00047	}
00048	
00049	function Close(optional bool bByParent)
00050	{
00051		ClientArea.Close(True);
00052		Root.Console.HideConsole();
00053	}
00054	
00055	defaultproperties
00056	{
00057	     ClientClass=Class'UWindow.UWindowConsoleClientWindow'
00058	     WindowTitle="System Console"
00059	}

End Source Code