UWindow
Class UWindowSmallButton

source: e:\games\UnrealTournament\UWindow\Classes\UWindowSmallButton.uc
Core.Object
   |
   +--UWindow.UWindowBase
      |
      +--UWindow.UWindowWindow
         |
         +--UWindow.UWindowDialogControl
            |
            +--UWindow.UWindowButton
               |
               +--UWindow.UWindowSmallButton
Direct Known Subclasses:ngStatsButton, UWindowSmallCloseButton

class UWindowSmallButton
extends UWindow.UWindowButton



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



Source Code


00001	class UWindowSmallButton extends UWindowButton;
00002	
00003	function Created()
00004	{
00005		bNoKeyboard = True;
00006	
00007		Super.Created();
00008	
00009		ToolTipString = "";
00010		SetText("");
00011		SetFont(F_Normal);
00012	
00013		WinHeight = 16;
00014	}
00015	
00016	function AutoWidth(Canvas C)
00017	{
00018		local float W, H;
00019		C.Font = Root.Fonts[Font];
00020		
00021		TextSize(C, RemoveAmpersand(Text), W, H);
00022	
00023		if(WinWidth < W + 10)
00024			WinWidth = W + 10;
00025	}
00026	
00027	function BeforePaint(Canvas C, float X, float Y)
00028	{
00029		local float W, H;
00030		C.Font = Root.Fonts[Font];
00031		
00032		TextSize(C, RemoveAmpersand(Text), W, H);
00033	
00034		TextX = (WinWidth-W)/2;
00035		TextY = (WinHeight-H)/2;
00036	
00037		if(bMouseDown)
00038		{
00039			TextX += 1;
00040			TextY += 1;
00041		}		
00042	}
00043	
00044	function Paint(Canvas C, float X, float Y)
00045	{
00046		LookAndFeel.Button_DrawSmallButton(Self, C);
00047		Super.Paint(C, X, Y);
00048	}
00049	
00050	defaultproperties
00051	{
00052	}

End Source Code