UMenu
Class UMenuRaisedButton

source: e:\games\UnrealTournament\UMenu\Classes\UMenuRaisedButton.uc
Core.Object
   |
   +--UWindow.UWindowBase
      |
      +--UWindow.UWindowWindow
         |
         +--UWindow.UWindowDialogControl
            |
            +--UWindow.UWindowButton
               |
               +--UMenu.UMenuRaisedButton
Direct Known Subclasses:None

class UMenuRaisedButton
extends UWindow.UWindowButton


Variables
 int Index


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



Source Code


00001	class UMenuRaisedButton extends UWindowButton;
00002	
00003	var int Index;
00004	
00005	function Created()
00006	{
00007		Super.Created();
00008	
00009		TextX = 0;
00010		TextY = 0;
00011		Font = F_Normal;
00012		TextColor.R = 0;
00013		TextColor.G = 0;
00014		TextColor.B = 0;
00015	}
00016	
00017	function BeforePaint(Canvas C, float X, float Y)
00018	{
00019		local float W, H;
00020	
00021		Super.BeforePaint(C, X, Y);
00022	
00023		WinHeight = 18;
00024	
00025		TextSize(C, Text, W, H);
00026	
00027		TextY = (WinHeight - H) / 2;
00028	
00029		switch(Align)
00030		{
00031		case TA_Left:
00032			TextX = 3;
00033			break;
00034		case TA_Right:
00035			TextX = WinWidth - W - 3;
00036			break;
00037		case TA_Center:	
00038			TextX = (WinWidth - W) / 2;
00039			break;
00040		}
00041	}
00042	
00043	function Paint(Canvas C, float X, float Y)
00044	{
00045		if(bMouseDown)
00046		{
00047			DrawMiscBevel(C, 0, 0, WinWidth, WinHeight, LookAndFeel.Misc, 1);
00048		} else if (bDisabled) {
00049			DrawMiscBevel(C, 0, 0, WinWidth, WinHeight, LookAndFeel.Misc, 1);
00050		} else {
00051			DrawMiscBevel(C, 0, 0, WinWidth, WinHeight, LookAndFeel.Misc, 0);
00052		}
00053	
00054		Super.Paint(C, X, Y);
00055	}
00056	
00057	defaultproperties
00058	{
00059	}

End Source Code