RMenu
Class RuneLookAndFeel

source: c:\runehov\RMenu\Classes\RuneLookAndFeel.uc
Core.Object
   |
   +--UWindow.UWindowBase
      |
      +--UWindow.UWindowLookAndFeel
         |
         +--RMenu.RuneLookAndFeel
Direct Known Subclasses:None

class RuneLookAndFeel
extends UWindow.UWindowLookAndFeel

//============================================================================= // RuneLookAndFeel //=============================================================================
Variables
 Region CloseBoxDown
 int CloseBoxOffsetX
 int CloseBoxOffsetY
 Region CloseBoxUp
 Region FrameSB
 Region FrameSBL
 Region FrameSBR
 Region SBBackground
 Region SBDownDisabled
 Region SBDownDown
 Region SBDownUp
 Region SBLeftDisabled
 Region SBLeftDown
 Region SBLeftUp
 Region SBRightDisabled
 Region SBRightDown
 Region SBRightUp
 Region SBUpDisabled
 Region SBUpDown
 Region SBUpUp


Function Summary
 void Button_DrawSmallButton(UWindowSmallButton B, Canvas C)
 void Checkbox_SetupSizes(UWindowCheckbox W, Canvas C)
 void ComboList_DrawBackground(UWindowComboList W, Canvas C)
 void ComboList_DrawItem(UWindowComboList Combo, Canvas C, float X, float Y, float W, float H, string Text, bool bSelected)
 void Combo_Draw(UWindowComboControl W, Canvas C)
 void Combo_GetButtonBitmaps(UWindowComboButton W)
 void Combo_SetupLeftButton(UWindowComboLeftButton W)
 void Combo_SetupRightButton(UWindowComboRightButton W)
 void Combo_SetupSizes(UWindowComboControl W, Canvas C)
     
/* Combo Drawing Functions */
 void ControlFrame_Draw(UWindowControlFrame W, Canvas C)
 void ControlFrame_SetupSizes(UWindowControlFrame W, Canvas C)
 void DrawClientArea(UWindowClientWindow W, Canvas C)
     
/* Client Area Drawing Functions */
 void Editbox_Draw(UWindowEditControl W, Canvas C)
 void Editbox_SetupSizes(UWindowEditControl W, Canvas C)
 void FW_DrawWindowFrame(UWindowFramedWindow W, Canvas C)
     
/* Framed Window Drawing Functions */
 Region FW_GetClientArea(UWindowFramedWindow W)
 FrameHitTest FW_HitTest(UWindowFramedWindow W, float X, float Y)
 void FW_SetupFrameButtons(UWindowFramedWindow W, Canvas C)
 void Menu_DrawMenuBar(UWindowMenuBar W, Canvas C)
 void Menu_DrawMenuBarItem(UWindowMenuBar B, UWindowMenuBarItem I, float X, float Y, float W, float H, Canvas C)
 void Menu_DrawPulldownMenuBackground(UWindowPulldownMenu W, Canvas C)
 void Menu_DrawPulldownMenuItem(UWindowPulldownMenu M, UWindowPulldownMenuItem Item, Canvas C, float X, float Y, float W, float H, bool bSelected)
 
simulated
PlayMenuSound(UWindowWindow W, MenuSound S)
 void SB_HDraw(UWindowHScrollBar W, Canvas C)
 void SB_SetupDownButton(UWindowSBDownButton W)
 void SB_SetupLeftButton(UWindowSBLeftButton W)
 void SB_SetupRightButton(UWindowSBRightButton W)
 void SB_SetupUpButton(UWindowSBUpButton W)
 void SB_VDraw(UWindowVScrollBar W, Canvas C)
 void Tab_DrawTab(UWindowTabControlTabArea Tab, Canvas C, bool bActiveTab, bool bLeftmostTab, float X, float Y, float W, float H, string Text, bool bShowText)
 void Tab_DrawTabPageArea(UWindowPageControl W, Canvas C, UWindowPageWindow P)
 void Tab_GetTabSize(UWindowTabControlTabArea Tab, Canvas C, string Text, out float, out float)
 void Tab_SetTabPageSize(UWindowPageControl W, UWindowPageWindow P)
 void Tab_SetupLeftButton(UWindowTabControlLeftButton W)
 void Tab_SetupRightButton(UWindowTabControlRightButton W)



Source Code


00001	//=============================================================================
00002	// RuneLookAndFeel
00003	//=============================================================================
00004	class RuneLookAndFeel extends UWindowLookAndFeel;
00005	
00006	#exec AUDIO IMPORT FILE="Sounds\Checkbox.wav" NAME=BigSelect
00007	#exec AUDIO IMPORT FILE="Sounds\SmallSelect.wav" NAME=LittleSelect
00008	#exec AUDIO IMPORT FILE="Sounds\WindowOpen.wav" NAME=WindowOpen
00009	//#exec AUDIO IMPORT FILE="Sounds\WindowClose.wav" NAME=WindowClose
00010	//#exec AUDIO IMPORT FILE="Sounds\Uncheckbox.wav" NAME=ButtonSelect
00011	
00012	#exec AUDIO IMPORT FILE="Sounds\MenuTopSlide.wav" NAME=TopSlide
00013	#exec AUDIO IMPORT FILE="Sounds\MenuTopSlam.wav" NAME=TopSlam
00014	#exec AUDIO IMPORT FILE="Sounds\MenuBottomOpen.wav" NAME=BottomOpen
00015	#exec AUDIO IMPORT FILE="Sounds\MenuButton.wav" NAME=LeftButton
00016	#exec AUDIO IMPORT FILE="Sounds\MenuButton2.wav" NAME=TopButton
00017	#exec AUDIO IMPORT FILE="Sounds\MouseOver.wav" NAME=LeftMouseOver
00018	#exec AUDIO IMPORT FILE="Sounds\MouseOver2.wav" NAME=TopMouseOver
00019	
00020	
00021	#exec TEXTURE IMPORT NAME=StoneActiveFrame FILE=Textures\S_ActiveFrame.bmp GROUP="Icons" FLAGS=2 MIPS=OFF
00022	#exec TEXTURE IMPORT NAME=StoneInactiveFrame FILE=Textures\S_InactiveFrame.bmp GROUP="Icons" FLAGS=2 MIPS=OFF
00023	#exec TEXTURE IMPORT NAME=StoneActiveFrameS FILE=Textures\S_ActiveFrameS.bmp GROUP="Icons" FLAGS=2 MIPS=OFF
00024	#exec TEXTURE IMPORT NAME=StoneInactiveFrameS FILE=Textures\S_InactiveFrameS.bmp GROUP="Icons" FLAGS=2 MIPS=OFF
00025	
00026	#exec TEXTURE IMPORT NAME=StoneMisc FILE=Textures\S_Misc.bmp GROUP="Icons" MIPS=OFF
00027	#exec TEXTURE IMPORT NAME=StoneButton FILE=Textures\S_SmallButton.bmp GROUP="Icons" MIPS=OFF
00028	#exec TEXTURE IMPORT NAME=RuneButtonBack FILE=Textures\S_MenuButton.bmp FLAGS=2 MIPS=OFF
00029	
00030	// Big textures require Mip Maps in current D3D code
00031	#exec TEXTURE IMPORT NAME=SideBack FILE=Textures\S_SideBack.bmp MIPS=OFF
00032	#exec TEXTURE IMPORT NAME=TopBack FILE=Textures\S_TopBack.bmp MIPS=OFF
00033	
00034	// HOV-specific textures
00035	#exec TEXTURE IMPORT NAME=SideBackHOV1 FILE=Textures\S_SBHOV1.bmp MIPS=OFF
00036	#exec TEXTURE IMPORT NAME=SideBackHOV2 FILE=Textures\S_SBHOV2.bmp MIPS=OFF
00037	#exec TEXTURE IMPORT NAME=SBHOVTop FILE=Textures\S_SBHOVTop.bmp MIPS=OFF
00038	
00039	#exec TEXTURE IMPORT NAME=StoneMenuArea FILE=Textures\S_MenuArea.bmp GROUP="Icons" MIPS=OFF
00040	#exec TEXTURE IMPORT NAME=StoneClientAreaTiled FILE=Textures\S_ClientArea.bmp GROUP="Icons" MIPS=OFF
00041	#exec TEXTURE IMPORT NAME=StoneMenuTL FILE=Textures\S_MenuTL.bmp GROUP="Icons" MIPS=OFF
00042	#exec TEXTURE IMPORT NAME=StoneMenuT FILE=Textures\S_MenuT.bmp GROUP="Icons" MIPS=OFF
00043	#exec TEXTURE IMPORT NAME=StoneMenuTR FILE=Textures\S_MenuTR.bmp GROUP="Icons" MIPS=OFF
00044	#exec TEXTURE IMPORT NAME=StoneMenuL FILE=Textures\S_MenuL.bmp GROUP="Icons" MIPS=OFF
00045	#exec TEXTURE IMPORT NAME=StoneMenuR FILE=Textures\S_MenuR.bmp GROUP="Icons" MIPS=OFF
00046	#exec TEXTURE IMPORT NAME=StoneMenuBL FILE=Textures\S_MenuBL.bmp GROUP="Icons" MIPS=OFF
00047	#exec TEXTURE IMPORT NAME=StoneMenuB FILE=Textures\S_MenuB.bmp GROUP="Icons" MIPS=OFF
00048	#exec TEXTURE IMPORT NAME=StoneMenuBR FILE=Textures\S_MenuBR.bmp GROUP="Icons" MIPS=OFF
00049	#exec TEXTURE IMPORT NAME=StoneMenuHL FILE=Textures\S_MenuHL.bmp GROUP="Icons" MIPS=OFF
00050	#exec TEXTURE IMPORT NAME=StoneMenuHM FILE=Textures\S_MenuHM.bmp GROUP="Icons" MIPS=OFF
00051	#exec TEXTURE IMPORT NAME=StoneMenuHR FILE=Textures\S_MenuHR.bmp GROUP="Icons" MIPS=OFF
00052	#exec TEXTURE IMPORT NAME=StoneMenuLine FILE=Textures\S_MenuLine.bmp GROUP="Icons" MIPS=OFF
00053	
00054	#exec TEXTURE IMPORT NAME=StoneBarL FILE=Textures\M_BarL.bmp GROUP="Icons" MIPS=OFF
00055	#exec TEXTURE IMPORT NAME=StoneBarTile FILE=Textures\M_BarTile.bmp GROUP="Icons" MIPS=OFF
00056	#exec TEXTURE IMPORT NAME=StoneBarMax FILE=Textures\M_BarMax.bmp GROUP="Icons" MIPS=OFF
00057	#exec TEXTURE IMPORT NAME=StoneBarWin FILE=Textures\M_BarWin.bmp GROUP="Icons" MIPS=OFF
00058	
00059	
00060	#exec TEXTURE IMPORT NAME=StoneBarInL FILE=Textures\M_BarInL.bmp GROUP="Icons" MIPS=OFF
00061	#exec TEXTURE IMPORT NAME=StoneBarInR FILE=Textures\M_BarInR.bmp GROUP="Icons" MIPS=OFF
00062	#exec TEXTURE IMPORT NAME=StoneBarInM FILE=Textures\M_BarInM.bmp GROUP="Icons" MIPS=OFF
00063	
00064	#exec TEXTURE IMPORT NAME=StoneBarOutL FILE=Textures\M_BarOutL.bmp GROUP="Icons" MIPS=OFF
00065	#exec TEXTURE IMPORT NAME=StoneBarOutR FILE=Textures\M_BarOutR.bmp GROUP="Icons" MIPS=OFF
00066	#exec TEXTURE IMPORT NAME=StoneBarOutM FILE=Textures\M_BarOutM.bmp GROUP="Icons" MIPS=OFF
00067	
00068	var() Region	SBUpUp;
00069	var() Region	SBUpDown;
00070	var() Region	SBUpDisabled;
00071	
00072	var() Region	SBDownUp;
00073	var() Region	SBDownDown;
00074	var() Region	SBDownDisabled;
00075	
00076	var() Region	SBLeftUp;
00077	var() Region	SBLeftDown;
00078	var() Region	SBLeftDisabled;
00079	
00080	var() Region	SBRightUp;
00081	var() Region	SBRightDown;
00082	var() Region	SBRightDisabled;
00083	
00084	var() Region	SBBackground;
00085	
00086	var() Region	FrameSBL;
00087	var() Region	FrameSB;
00088	var() Region	FrameSBR;
00089	
00090	var() Region	CloseBoxUp;
00091	var() Region	CloseBoxDown;
00092	var() int		CloseBoxOffsetX;
00093	var() int		CloseBoxOffsetY;
00094	
00095	
00096	const SIZEBORDER = 3;
00097	const BRSIZEBORDER = 15;
00098	
00099	/* Framed Window Drawing Functions */
00100	function FW_DrawWindowFrame(UWindowFramedWindow W, Canvas C)
00101	{
00102		local Texture T;
00103		local Region R, Temp;
00104	
00105		C.DrawColor.r = 255;
00106		C.DrawColor.g = 255;
00107		C.DrawColor.b = 255;
00108	
00109		T = W.GetLookAndFeelTexture();
00110	
00111		R = FrameTL;
00112		W.DrawStretchedTextureSegment( C, 0, 0, R.W, R.H, R.X, R.Y, R.W, R.H, T );
00113	
00114		R = FrameT;
00115		W.DrawStretchedTextureSegment( C, FrameTL.W, 0, 
00116										W.WinWidth - FrameTL.W
00117										- FrameTR.W,
00118										R.H, R.X, R.Y, R.W, R.H, T );
00119	
00120		R = FrameTR;
00121		W.DrawStretchedTextureSegment( C, W.WinWidth - R.W, 0, R.W, R.H, R.X, R.Y, R.W, R.H, T );
00122		
00123	
00124		if(W.bStatusBar)
00125			Temp = FrameSBL;
00126		else
00127			Temp = FrameBL;
00128		
00129		R = FrameL;
00130		W.DrawStretchedTextureSegment( C, 0, FrameTL.H,
00131										R.W,  
00132										W.WinHeight - FrameTL.H
00133										- Temp.H,
00134										R.X, R.Y, R.W, R.H, T );
00135	
00136		R = FrameR;
00137		W.DrawStretchedTextureSegment( C, W.WinWidth - R.W, FrameTL.H,
00138										R.W,  
00139										W.WinHeight - FrameTL.H
00140										- Temp.H,
00141										R.X, R.Y, R.W, R.H, T );
00142	
00143		if(W.bStatusBar)
00144			R = FrameSBL;
00145		else
00146			R = FrameBL;
00147		W.DrawStretchedTextureSegment( C, 0, W.WinHeight - R.H, R.W, R.H, R.X, R.Y, R.W, R.H, T );
00148	
00149		if(W.bStatusBar)
00150		{
00151			R = FrameSB;
00152			W.DrawStretchedTextureSegment( C, FrameBL.W, W.WinHeight - R.H, 
00153											W.WinWidth - FrameSBL.W
00154											- FrameSBR.W,
00155											R.H, R.X, R.Y, R.W, R.H, T );
00156		}
00157		else
00158		{
00159			R = FrameB;
00160			W.DrawStretchedTextureSegment( C, FrameBL.W, W.WinHeight - R.H, 
00161											W.WinWidth - FrameBL.W
00162											- FrameBR.W,
00163											R.H, R.X, R.Y, R.W, R.H, T );
00164		}
00165	
00166		if(W.bStatusBar)
00167			R = FrameSBR;
00168		else
00169			R = FrameBR;
00170		W.DrawStretchedTextureSegment( C, W.WinWidth - R.W, W.WinHeight - R.H, R.W, R.H, R.X, R.Y, 
00171										R.W, R.H, T );
00172	
00173	
00174		if(W.IsActive())
00175		{
00176			C.DrawColor = FrameActiveTitleColor;
00177			C.Font = W.Root.Fonts[W.F_Bold];
00178		}
00179		else
00180		{
00181			C.DrawColor = FrameInactiveTitleColor;
00182			C.Font = W.Root.Fonts[W.F_Normal];
00183		}
00184	
00185	
00186		W.ClipTextWidth(C, FrameTitleX, FrameTitleY, 
00187						W.WindowTitle, W.WinWidth - 22);
00188	
00189		if(W.bStatusBar) 
00190		{
00191			C.Font = W.Root.Fonts[W.F_Normal];
00192			C.DrawColor.r = 0;
00193			C.DrawColor.g = 0;
00194			C.DrawColor.b = 0;
00195	
00196			W.ClipTextWidth(C, 6, W.WinHeight - 13, W.StatusBarText, W.WinWidth - 22);
00197	
00198			C.DrawColor.r = 255;
00199			C.DrawColor.g = 255;
00200			C.DrawColor.b = 255;
00201		}
00202	}
00203	
00204	function FW_SetupFrameButtons(UWindowFramedWindow W, Canvas C)
00205	{
00206		local Texture T;
00207	
00208		T = W.GetLookAndFeelTexture();
00209	
00210		if (W.CloseBox != None)
00211		{
00212			W.CloseBox.WinLeft = W.WinWidth - CloseBoxOffsetX - CloseBoxUp.W;
00213			W.CloseBox.WinTop = CloseBoxOffsetY;
00214	
00215			W.CloseBox.SetSize(CloseBoxUp.W, CloseBoxUp.H);
00216			W.CloseBox.bUseRegion = True;
00217	
00218			W.CloseBox.UpTexture = T;
00219			W.CloseBox.DownTexture = T;
00220			W.CloseBox.OverTexture = T;
00221			W.CloseBox.DisabledTexture = T;
00222	
00223			W.CloseBox.UpRegion = CloseBoxUp;
00224			W.CloseBox.DownRegion = CloseBoxDown;
00225			W.CloseBox.OverRegion = CloseBoxUp;
00226			W.CloseBox.DisabledRegion = CloseBoxUp;
00227		}
00228	}
00229	
00230	function Region FW_GetClientArea(UWindowFramedWindow W)
00231	{
00232		local Region R;
00233	
00234		R.X = FrameL.W;
00235		R.Y	= FrameT.H;
00236		R.W = W.WinWidth - (FrameL.W + FrameR.W);
00237		if(W.bStatusBar) 
00238			R.H = W.WinHeight - (FrameT.H + FrameSB.H);
00239		else
00240			R.H = W.WinHeight - (FrameT.H + FrameB.H);
00241	
00242		return R;
00243	}
00244	
00245	
00246	function FrameHitTest FW_HitTest(UWindowFramedWindow W, float X, float Y)
00247	{
00248		if((X >= 3) && (X <= W.WinWidth-3) && (Y >= 3) && (Y <= 14))
00249			return HT_TitleBar;
00250		if((X < BRSIZEBORDER && Y < SIZEBORDER) || (X < SIZEBORDER && Y < BRSIZEBORDER)) 
00251			return HT_NW;
00252		if((X > W.WinWidth - SIZEBORDER && Y < BRSIZEBORDER) || (X > W.WinWidth - BRSIZEBORDER && Y < SIZEBORDER))
00253			return HT_NE;
00254		if((X < BRSIZEBORDER && Y > W.WinHeight - SIZEBORDER)|| (X < SIZEBORDER && Y > W.WinHeight - BRSIZEBORDER)) 
00255			return HT_SW;
00256		if((X > W.WinWidth - BRSIZEBORDER) && (Y > W.WinHeight - BRSIZEBORDER))
00257			return HT_SE;
00258		if(Y < SIZEBORDER)
00259			return HT_N;
00260		if(Y > W.WinHeight - SIZEBORDER)
00261			return HT_S;
00262		if(X < SIZEBORDER)
00263			return HT_W;
00264		if(X > W.WinWidth - SIZEBORDER)	
00265			return HT_E;
00266	
00267		return HT_None;	
00268	}
00269	
00270	/* Client Area Drawing Functions */
00271	function DrawClientArea(UWindowClientWindow W, Canvas C)
00272	{
00273		// Draw frame top
00274		W.DrawClippedTexture(C, 0, 0, Texture'StoneMenuTL');
00275		W.DrawStretchedTexture(C, 2, 0, W.WinWidth-4, 2, Texture'StoneMenuT');
00276		W.DrawClippedTexture(C, W.WinWidth-2, 0, Texture'StoneMenuTR');
00277	
00278		// Draw frame bottom
00279		W.DrawClippedTexture(C, 0, W.WinHeight-2, Texture'StoneMenuBL');
00280		W.DrawStretchedTexture(C, 2, W.WinHeight-2, W.WinWidth-4, 2, Texture'StoneMenuB');
00281		W.DrawClippedTexture(C, W.WinWidth-2, W.WinHeight-2, Texture'StoneMenuBR');
00282	
00283		// Draw frame sides
00284		W.DrawStretchedTexture(C, 0, 2, 2, W.WinHeight-4, Texture'StoneMenuL');
00285		W.DrawStretchedTexture(C, W.WinWidth-2, 2, 2, W.WinHeight-4, Texture'StoneMenuR');
00286	
00287		// Draw client area
00288	//	W.DrawStretchedTexture(C, 2, 2, W.WinWidth-4, W.WinHeight-4, Texture'StoneClientArea');	// for ramp
00289		W.Tile(C, Texture'StoneClientAreaTiled');
00290	}
00291	
00292	
00293	/* Combo Drawing Functions */
00294	
00295	function Combo_SetupSizes(UWindowComboControl W, Canvas C)
00296	{
00297		local float TW, TH;
00298	
00299		C.Font = W.Root.Fonts[W.Font];
00300		W.TextSize(C, W.Text, TW, TH);
00301		
00302		W.WinHeight = 12 + MiscBevelT[2].H + MiscBevelB[2].H;
00303		
00304		switch(W.Align)
00305		{
00306		case TA_Left:
00307			W.EditAreaDrawX = W.WinWidth - W.EditBoxWidth;
00308			W.TextX = 0;
00309			break;
00310		case TA_Right:
00311			W.EditAreaDrawX = 0;	
00312			W.TextX = W.WinWidth - TW;
00313			break;
00314		case TA_Center:
00315			W.EditAreaDrawX = (W.WinWidth - W.EditBoxWidth) / 2;
00316			W.TextX = (W.WinWidth - TW) / 2;
00317			break;
00318		}
00319	
00320		W.EditAreaDrawY = (W.WinHeight - 2) / 2;
00321		W.TextY = (W.WinHeight - TH) / 2;
00322	
00323		W.EditBox.WinLeft = W.EditAreaDrawX + MiscBevelL[2].W;
00324		W.EditBox.WinTop = MiscBevelT[2].H;
00325		W.Button.WinWidth = ComboBtnUp.W;
00326	
00327		if(W.bButtons)
00328		{
00329			W.EditBox.WinWidth = W.EditBoxWidth - MiscBevelL[2].W - MiscBevelR[2].W - ComboBtnUp.W - SBLeftUp.W - SBRightUp.W;
00330			W.EditBox.WinHeight = W.WinHeight - MiscBevelT[2].H - MiscBevelB[2].H;
00331			W.Button.WinLeft = W.WinWidth - ComboBtnUp.W - MiscBevelR[2].W - SBLeftUp.W - SBRightUp.W;
00332			W.Button.WinTop = W.EditBox.WinTop;
00333	
00334			W.LeftButton.WinLeft = W.WinWidth - MiscBevelR[2].W - SBLeftUp.W - SBRightUp.W;
00335			W.LeftButton.WinTop = W.EditBox.WinTop;
00336			W.RightButton.WinLeft = W.WinWidth - MiscBevelR[2].W - SBRightUp.W;
00337			W.RightButton.WinTop = W.EditBox.WinTop;
00338	
00339			W.LeftButton.WinWidth = SBLeftUp.W;
00340			W.LeftButton.WinHeight = SBLeftUp.H;
00341			W.RightButton.WinWidth = SBRightUp.W;
00342			W.RightButton.WinHeight = SBRightUp.H;
00343		}
00344		else
00345		{
00346			W.EditBox.WinWidth = W.EditBoxWidth - MiscBevelL[2].W - MiscBevelR[2].W - ComboBtnUp.W;
00347			W.EditBox.WinHeight = W.WinHeight - MiscBevelT[2].H - MiscBevelB[2].H;
00348			W.Button.WinLeft = W.WinWidth - ComboBtnUp.W - MiscBevelR[2].W;
00349			W.Button.WinTop = W.EditBox.WinTop;
00350		}
00351		W.Button.WinHeight = W.EditBox.WinHeight;
00352	}
00353	
00354	function Combo_Draw(UWindowComboControl W, Canvas C)
00355	{
00356		W.DrawMiscBevel(C, W.EditAreaDrawX, 0, W.EditBoxWidth, W.WinHeight, Misc, 2);
00357	
00358		if(W.Text != "")
00359		{
00360			C.DrawColor = W.TextColor;
00361			W.ClipText(C, W.TextX, W.TextY, W.Text);
00362			C.DrawColor.R = 255;
00363			C.DrawColor.G = 255;
00364			C.DrawColor.B = 255;
00365		}
00366	}
00367	
00368	function ComboList_DrawBackground(UWindowComboList W, Canvas C)
00369	{
00370		W.DrawClippedTexture(C, 0, 0, Texture'StoneMenuTL');
00371		W.DrawStretchedTexture(C, 4, 0, W.WinWidth-8, 4, Texture'StoneMenuT');
00372		W.DrawClippedTexture(C, W.WinWidth-4, 0, Texture'StoneMenuTR');
00373	
00374		W.DrawClippedTexture(C, 0, W.WinHeight-4, Texture'StoneMenuBL');
00375		W.DrawStretchedTexture(C, 4, W.WinHeight-4, W.WinWidth-8, 4, Texture'StoneMenuB');
00376		W.DrawClippedTexture(C, W.WinWidth-4, W.WinHeight-4, Texture'StoneMenuBR');
00377	
00378		W.DrawStretchedTexture(C, 0, 4, 4, W.WinHeight-8, Texture'StoneMenuL');
00379		W.DrawStretchedTexture(C, W.WinWidth-4, 4, 4, W.WinHeight-8, Texture'StoneMenuR');
00380	
00381		W.DrawStretchedTexture(C, 4, 4, W.WinWidth-8, W.WinHeight-8, Texture'StoneMenuArea');
00382	}
00383	
00384	function ComboList_DrawItem(UWindowComboList Combo, Canvas C, float X, float Y, float W, float H, string Text, bool bSelected)
00385	{
00386		C.DrawColor.R = 255;
00387		C.DrawColor.G = 255;
00388		C.DrawColor.B = 255;
00389	
00390		if(bSelected)
00391		{
00392			Combo.DrawClippedTexture(C, X, Y, Texture'StoneMenuHL');
00393			Combo.DrawStretchedTexture(C, X + 4, Y, W - 8, 16, Texture'StoneMenuHM');
00394			Combo.DrawClippedTexture(C, X + W - 4, Y, Texture'StoneMenuHR');
00395			C.DrawColor.R = 0;
00396			C.DrawColor.G = 0;
00397			C.DrawColor.B = 0;
00398		}
00399		else
00400		{
00401			C.DrawColor.R = 0;
00402			C.DrawColor.G = 0;
00403			C.DrawColor.B = 0;
00404		}
00405	
00406		Combo.ClipText(C, X + Combo.TextBorder + 2, Y + 3, Text);
00407	}
00408	
00409	function Checkbox_SetupSizes(UWindowCheckbox W, Canvas C)
00410	{
00411		local float TW, TH;
00412	
00413		C.Font = W.Root.Fonts[W.Font];
00414		W.TextSize(C, W.Text, TW, TH);
00415		W.WinHeight = Max(TH+1, 16);
00416		
00417		switch(W.Align)
00418		{
00419		case TA_Left:
00420			W.ImageX = W.WinWidth - 16;
00421			W.TextX = 0;
00422			break;
00423		case TA_Right:
00424			W.ImageX = 0;	
00425			W.TextX = W.WinWidth - TW;
00426			break;
00427		case TA_Center:
00428			W.ImageX = (W.WinWidth - 16) / 2;
00429			W.TextX = (W.WinWidth - TW) / 2;
00430			break;
00431		}
00432	
00433		W.ImageY = (W.WinHeight - 16) / 2;
00434		W.TextY = (W.WinHeight - TH) / 2;
00435	
00436		if(W.bChecked) 
00437		{
00438			W.UpTexture = Texture'ChkChecked';
00439			W.DownTexture = Texture'ChkChecked';
00440			W.OverTexture = Texture'ChkChecked';
00441			W.DisabledTexture = Texture'ChkCheckedDisabled';
00442		}
00443		else 
00444		{
00445			W.UpTexture = Texture'ChkUnchecked';
00446			W.DownTexture = Texture'ChkUnchecked';
00447			W.OverTexture = Texture'ChkUnchecked';
00448			W.DisabledTexture = Texture'ChkUncheckedDisabled';
00449		}
00450	}
00451	
00452	function Combo_GetButtonBitmaps(UWindowComboButton W)
00453	{
00454		local Texture T;
00455	
00456		T = W.GetLookAndFeelTexture();
00457		
00458		W.bUseRegion = True;
00459	
00460		W.UpTexture = T;
00461		W.DownTexture = T;
00462		W.OverTexture = T;
00463		W.DisabledTexture = T;
00464	
00465		W.UpRegion = ComboBtnUp;
00466		W.DownRegion = ComboBtnDown;
00467		W.OverRegion = ComboBtnUp;
00468		W.DisabledRegion = ComboBtnDisabled;
00469	}
00470	
00471	function Combo_SetupLeftButton(UWindowComboLeftButton W)
00472	{
00473		local Texture T;
00474	
00475		T = W.GetLookAndFeelTexture();
00476	
00477		W.bUseRegion = True;
00478	
00479		W.UpTexture = T;
00480		W.DownTexture = T;
00481		W.OverTexture = T;
00482		W.DisabledTexture = T;
00483	
00484		W.UpRegion = SBLeftUp;
00485		W.DownRegion = SBLeftDown;
00486		W.OverRegion = SBLeftUp;
00487		W.DisabledRegion = SBLeftDisabled;
00488	}
00489	
00490	function Combo_SetupRightButton(UWindowComboRightButton W)
00491	{
00492		local Texture T;
00493	
00494		T = W.GetLookAndFeelTexture();
00495	
00496		W.bUseRegion = True;
00497	
00498		W.UpTexture = T;
00499		W.DownTexture = T;
00500		W.OverTexture = T;
00501		W.DisabledTexture = T;
00502	
00503		W.UpRegion = SBRightUp;
00504		W.DownRegion = SBRightDown;
00505		W.OverRegion = SBRightUp;
00506		W.DisabledRegion = SBRightDisabled;
00507	}
00508	
00509	
00510	
00511	function Editbox_SetupSizes(UWindowEditControl W, Canvas C)
00512	{
00513		local float TW, TH;
00514		local int B;
00515	
00516		B = EditBoxBevel;
00517			
00518		C.Font = W.Root.Fonts[W.Font];
00519		W.TextSize(C, W.Text, TW, TH);
00520		
00521		W.WinHeight = 12 + MiscBevelT[B].H + MiscBevelB[B].H;
00522		
00523		switch(W.Align)
00524		{
00525		case TA_Left:
00526			W.EditAreaDrawX = W.WinWidth - W.EditBoxWidth;
00527			W.TextX = 0;
00528			break;
00529		case TA_Right:
00530			W.EditAreaDrawX = 0;	
00531			W.TextX = W.WinWidth - TW;
00532			break;
00533		case TA_Center:
00534			W.EditAreaDrawX = (W.WinWidth - W.EditBoxWidth) / 2;
00535			W.TextX = (W.WinWidth - TW) / 2;
00536			break;
00537		}
00538	
00539		W.EditAreaDrawY = (W.WinHeight - 2) / 2;
00540		W.TextY = (W.WinHeight - TH) / 2;
00541	
00542		W.EditBox.WinLeft = W.EditAreaDrawX + MiscBevelL[B].W;
00543		W.EditBox.WinTop = MiscBevelT[B].H;
00544		W.EditBox.WinWidth = W.EditBoxWidth - MiscBevelL[B].W - MiscBevelR[B].W;
00545		W.EditBox.WinHeight = W.WinHeight - MiscBevelT[B].H - MiscBevelB[B].H;
00546	}
00547	
00548	function Editbox_Draw(UWindowEditControl W, Canvas C)
00549	{
00550		W.DrawMiscBevel(C, W.EditAreaDrawX, 0, W.EditBoxWidth, W.WinHeight, Misc, EditBoxBevel);
00551	
00552		if(W.Text != "")
00553		{
00554			C.DrawColor = W.TextColor;
00555			W.ClipText(C, W.TextX, W.TextY, W.Text);
00556			C.DrawColor.R = 255;
00557			C.DrawColor.G = 255;
00558			C.DrawColor.B = 255;
00559		}
00560	}
00561	
00562	function ControlFrame_SetupSizes(UWindowControlFrame W, Canvas C)
00563	{
00564		local int B;
00565	
00566		B = EditBoxBevel;
00567			
00568		W.Framed.WinLeft = MiscBevelL[B].W;
00569		W.Framed.WinTop = MiscBevelT[B].H;
00570		W.Framed.SetSize(W.WinWidth - MiscBevelL[B].W - MiscBevelR[B].W, W.WinHeight - MiscBevelT[B].H - MiscBevelB[B].H);
00571	}
00572	
00573	function ControlFrame_Draw(UWindowControlFrame W, Canvas C)
00574	{
00575		C.DrawColor.R = 255;
00576		C.DrawColor.G = 255;
00577		C.DrawColor.B = 255;
00578		
00579		W.DrawStretchedTexture(C, 0, 0, W.WinWidth, W.WinHeight, Texture'WhiteTexture');
00580		W.DrawMiscBevel(C, 0, 0, W.WinWidth, W.WinHeight, Misc, EditBoxBevel);
00581	}
00582	
00583	function Tab_DrawTab(UWindowTabControlTabArea Tab, Canvas C, bool bActiveTab, bool bLeftmostTab, float X, float Y, float W, float H, string Text, bool bShowText)
00584	{
00585		local Region R;
00586		local Texture T;
00587		local float TW, TH;
00588	
00589		C.DrawColor.R = 255;
00590		C.DrawColor.G = 255;
00591		C.DrawColor.B = 255;
00592	
00593		T = Tab.GetLookAndFeelTexture();
00594		
00595		if(bActiveTab)
00596		{
00597			R = TabSelectedL;
00598			Tab.DrawStretchedTextureSegment( C, X, Y, R.W, R.H, R.X, R.Y, R.W, R.H, T );
00599	
00600			R = TabSelectedM;
00601			Tab.DrawStretchedTextureSegment( C, X+TabSelectedL.W, Y, 
00602											W - TabSelectedL.W
00603											- TabSelectedR.W,
00604											R.H, R.X, R.Y, R.W, R.H, T );
00605	
00606			R = TabSelectedR;
00607			Tab.DrawStretchedTextureSegment( C, X + W - R.W, Y, R.W, R.H, R.X, R.Y, R.W, R.H, T );
00608	
00609			C.Font = Tab.Root.Fonts[Tab.F_Bold];
00610			C.DrawColor.R = 0;
00611			C.DrawColor.G = 0;
00612			C.DrawColor.B = 0;
00613	
00614			if(bShowText)
00615			{
00616				Tab.TextSize(C, Text, TW, TH);
00617				Tab.ClipText(C, X + (W-TW)/2, Y + 3, Text, True);
00618			}
00619		}
00620		else
00621		{
00622			R = TabUnselectedL;
00623			Tab.DrawStretchedTextureSegment( C, X, Y, R.W, R.H, R.X, R.Y, R.W, R.H, T );
00624	
00625			R = TabUnselectedM;
00626			Tab.DrawStretchedTextureSegment( C, X+TabUnselectedL.W, Y, 
00627											W - TabUnselectedL.W
00628											- TabUnselectedR.W,
00629											R.H, R.X, R.Y, R.W, R.H, T );
00630	
00631			R = TabUnselectedR;
00632			Tab.DrawStretchedTextureSegment( C, X + W - R.W, Y, R.W, R.H, R.X, R.Y, R.W, R.H, T );
00633	
00634			C.Font = Tab.Root.Fonts[Tab.F_Normal];
00635			C.DrawColor.R = 0;
00636			C.DrawColor.G = 0;
00637			C.DrawColor.B = 0;
00638	
00639			if(bShowText)
00640			{
00641				Tab.TextSize(C, Text, TW, TH);
00642				Tab.ClipText(C, X + (W-TW)/2, Y + 4, Text, True);
00643			}
00644		}
00645	}
00646	
00647	function SB_SetupUpButton(UWindowSBUpButton W)
00648	{
00649		local Texture T;
00650	
00651		T = W.GetLookAndFeelTexture();
00652	
00653		W.bUseRegion = True;
00654	
00655		W.UpTexture = T;
00656		W.DownTexture = T;
00657		W.OverTexture = T;
00658		W.DisabledTexture = T;
00659	
00660		W.UpRegion = SBUpUp;
00661		W.DownRegion = SBUpDown;
00662		W.OverRegion = SBUpUp;
00663		W.DisabledRegion = SBUpDisabled;
00664	}
00665	
00666	function SB_SetupDownButton(UWindowSBDownButton W)
00667	{
00668		local Texture T;
00669	
00670		T = W.GetLookAndFeelTexture();
00671	
00672		W.bUseRegion = True;
00673	
00674		W.UpTexture = T;
00675		W.DownTexture = T;
00676		W.OverTexture = T;
00677		W.DisabledTexture = T;
00678	
00679		W.UpRegion = SBDownUp;
00680		W.DownRegion = SBDownDown;
00681		W.OverRegion = SBDownUp;
00682		W.DisabledRegion = SBDownDisabled;
00683	}
00684	
00685	
00686	
00687	function SB_SetupLeftButton(UWindowSBLeftButton W)
00688	{
00689		local Texture T;
00690	
00691		T = W.GetLookAndFeelTexture();
00692	
00693		W.bUseRegion = True;
00694	
00695		W.UpTexture = T;
00696		W.DownTexture = T;
00697		W.OverTexture = T;
00698		W.DisabledTexture = T;
00699	
00700		W.UpRegion = SBLeftUp;
00701		W.DownRegion = SBLeftDown;
00702		W.OverRegion = SBLeftUp;
00703		W.DisabledRegion = SBLeftDisabled;
00704	}
00705	
00706	function SB_SetupRightButton(UWindowSBRightButton W)
00707	{
00708		local Texture T;
00709	
00710		T = W.GetLookAndFeelTexture();
00711	
00712		W.bUseRegion = True;
00713	
00714		W.UpTexture = T;
00715		W.DownTexture = T;
00716		W.OverTexture = T;
00717		W.DisabledTexture = T;
00718	
00719		W.UpRegion = SBRightUp;
00720		W.DownRegion = SBRightDown;
00721		W.OverRegion = SBRightUp;
00722		W.DisabledRegion = SBRightDisabled;
00723	}
00724	
00725	function SB_VDraw(UWindowVScrollbar W, Canvas C)
00726	{
00727		local Region R;
00728		local Texture T;
00729	
00730		T = W.GetLookAndFeelTexture();
00731	
00732		R = SBBackground;
00733		W.DrawStretchedTextureSegment( C, 0, 0, W.WinWidth, W.WinHeight, R.X, R.Y, R.W, R.H, T);
00734		
00735		if(!W.bDisabled)
00736		{
00737			W.DrawUpBevel( C, 0, W.ThumbStart, Size_ScrollbarWidth,	W.ThumbHeight, T);
00738		}
00739	}
00740	
00741	function SB_HDraw(UWindowHScrollbar W, Canvas C)
00742	{
00743		local Region R;
00744		local Texture T;
00745	
00746		T = W.GetLookAndFeelTexture();
00747	
00748		R = SBBackground;
00749		W.DrawStretchedTextureSegment( C, 0, 0, W.WinWidth, W.WinHeight, R.X, R.Y, R.W, R.H, T);
00750		
00751		if(!W.bDisabled) 
00752		{
00753			W.DrawUpBevel( C, W.ThumbStart, 0, W.ThumbWidth, Size_ScrollbarWidth, T);
00754		}
00755	}
00756	
00757	function Tab_SetupLeftButton(UWindowTabControlLeftButton W)
00758	{
00759		local Texture T;
00760	
00761		T = W.GetLookAndFeelTexture();
00762	
00763	
00764		W.WinWidth = Size_ScrollbarButtonHeight;
00765		W.WinHeight = Size_ScrollbarWidth;
00766		W.WinTop = Size_TabAreaHeight - W.WinHeight;
00767		W.WinLeft = W.ParentWindow.WinWidth - 2*W.WinWidth;
00768	
00769		W.bUseRegion = True;
00770	
00771		W.UpTexture = T;
00772		W.DownTexture = T;
00773		W.OverTexture = T;
00774		W.DisabledTexture = T;
00775	
00776		W.UpRegion = SBLeftUp;
00777		W.DownRegion = SBLeftDown;
00778		W.OverRegion = SBLeftUp;
00779		W.DisabledRegion = SBLeftDisabled;
00780	}
00781	
00782	function Tab_SetupRightButton(UWindowTabControlRightButton W)
00783	{
00784		local Texture T;
00785	
00786		T = W.GetLookAndFeelTexture();
00787	
00788		W.WinWidth = Size_ScrollbarButtonHeight;
00789		W.WinHeight = Size_ScrollbarWidth;
00790		W.WinTop = Size_TabAreaHeight - W.WinHeight;
00791		W.WinLeft = W.ParentWindow.WinWidth - W.WinWidth;
00792	
00793		W.bUseRegion = True;
00794	
00795		W.UpTexture = T;
00796		W.DownTexture = T;
00797		W.OverTexture = T;
00798		W.DisabledTexture = T;
00799	
00800		W.UpRegion = SBRightUp;
00801		W.DownRegion = SBRightDown;
00802		W.OverRegion = SBRightUp;
00803		W.DisabledRegion = SBRightDisabled;
00804	}
00805	
00806	function Tab_SetTabPageSize(UWindowPageControl W, UWindowPageWindow P)
00807	{
00808		P.WinLeft = 2;
00809		P.WinTop = W.TabArea.WinHeight-(TabSelectedM.H-TabUnselectedM.H) + 3;
00810		P.SetSize(W.WinWidth - 4, W.WinHeight-(W.TabArea.WinHeight-(TabSelectedM.H-TabUnselectedM.H)) - 6);
00811	}
00812	
00813	function Tab_DrawTabPageArea(UWindowPageControl W, Canvas C, UWindowPageWindow P)
00814	{
00815		W.DrawUpBevel( C, 0, W.TabArea.WinHeight-(TabSelectedM.H-TabUnselectedM.H), W.WinWidth, W.WinHeight-(W.TabArea.WinHeight-(TabSelectedM.H-TabUnselectedM.H)), W.GetLookAndFeelTexture());
00816	}
00817	
00818	function Tab_GetTabSize(UWindowTabControlTabArea Tab, Canvas C, string Text, out float W, out float H)
00819	{
00820		local float TW, TH;
00821	
00822		C.Font = Tab.Root.Fonts[Tab.F_Bold];
00823	
00824		Tab.TextSize( C, Text, TW, TH );
00825		W = TW + Size_TabSpacing;
00826		H = Size_TabAreaHeight;
00827	}
00828	
00829	function Menu_DrawMenuBar(UWindowMenuBar W, Canvas C)
00830	{
00831		W.DrawClippedTexture(C, 0, 0, Texture'StoneBarL');
00832		W.DrawStretchedTexture( C, 16, 0, W.WinWidth - 32, 16, Texture'StoneBarTile');
00833		W.DrawClippedTexture(C, W.WinWidth - 16, 0, Texture'StoneBarWin');
00834	}
00835	
00836	function Menu_DrawMenuBarItem(UWindowMenuBar B, UWindowMenuBarItem I, float X, float Y, float W, float H, Canvas C)
00837	{
00838		if(B.Selected == I)
00839		{
00840			B.DrawClippedTexture(C, X, 0, Texture'StoneBarInL');
00841			B.DrawClippedTexture(C, X+W-1, 0, Texture'StoneBarInR');
00842			B.DrawStretchedTexture(C, X+1, 0, W-2, 16, Texture'StoneBarInM');
00843		}
00844		else
00845		if (B.Over == I)
00846		{
00847			B.DrawClippedTexture(C, X, 0, Texture'StoneBarOutL');
00848			B.DrawClippedTexture(C, X+W-1, 0, Texture'StoneBarOutR');
00849			B.DrawStretchedTexture(C, X+1, 0, W-2, 16, Texture'StoneBarOutM');
00850		}
00851	
00852		C.Font = B.Root.Fonts[F_Normal];
00853		C.DrawColor.R = 0;
00854		C.DrawColor.G = 0;
00855		C.DrawColor.B = 0;
00856	
00857		B.ClipText(C, X + B.SPACING / 2, 3, I.Caption, True);
00858	}
00859	
00860	function Menu_DrawPulldownMenuBackground(UWindowPulldownMenu W, Canvas C)
00861	{
00862		W.DrawClippedTexture(C, 0, 0, Texture'StoneMenuTL');
00863		W.DrawStretchedTexture(C, 4, 0, W.WinWidth-8, 4, Texture'StoneMenuT');
00864		W.DrawClippedTexture(C, W.WinWidth-4, 0, Texture'StoneMenuTR');
00865	
00866		W.DrawClippedTexture(C, 0, W.WinHeight-4, Texture'StoneMenuBL');
00867		W.DrawStretchedTexture(C, 4, W.WinHeight-4, W.WinWidth-8, 4, Texture'StoneMenuB');
00868		W.DrawClippedTexture(C, W.WinWidth-4, W.WinHeight-4, Texture'StoneMenuBR');
00869	
00870		W.DrawStretchedTexture(C, 0, 4, 4, W.WinHeight-8, Texture'StoneMenuL');
00871		W.DrawStretchedTexture(C, W.WinWidth-4, 4, 4, W.WinHeight-8, Texture'StoneMenuR');
00872		W.DrawStretchedTexture(C, 4, 4, W.WinWidth-8, W.WinHeight-8, Texture'StoneMenuArea');
00873	}
00874	
00875	function Menu_DrawPulldownMenuItem(UWindowPulldownMenu M, UWindowPulldownMenuItem Item, Canvas C, float X, float Y, float W, float H, bool bSelected)
00876	{
00877		C.DrawColor.R = 255;
00878		C.DrawColor.G = 255;
00879		C.DrawColor.B = 255;
00880	
00881		Item.ItemTop = Y + M.WinTop;
00882	
00883		if(Item.Caption == "-")
00884		{
00885			C.DrawColor.R = 255;
00886			C.DrawColor.G = 255;
00887			C.DrawColor.B = 255;
00888			M.DrawStretchedTexture(C, X, Y+5, W, 2, Texture'StoneMenuLine');
00889			return;
00890		}
00891	
00892		C.Font = M.Root.Fonts[F_Normal];
00893	
00894		if(bSelected)
00895		{
00896			M.DrawClippedTexture(C, X, Y, Texture'StoneMenuHL');
00897			M.DrawStretchedTexture(C, X + 4, Y, W - 8, 16, Texture'StoneMenuHM');
00898			M.DrawClippedTexture(C, X + W - 4, Y, Texture'StoneMenuHR');
00899		}
00900	
00901		if(Item.bDisabled) 
00902		{
00903			// Black Shadow
00904			C.DrawColor.R = 96;
00905			C.DrawColor.G = 96;
00906			C.DrawColor.B = 96;
00907		}
00908		else
00909		{
00910			C.DrawColor.R = 0;
00911			C.DrawColor.G = 0;
00912			C.DrawColor.B = 0;
00913		}
00914	
00915		// DrawColor will render the tick black white or gray.
00916		if(Item.bChecked)
00917			M.DrawClippedTexture(C, X + 1, Y + 3, Texture'MenuTick');
00918	
00919		if(Item.SubMenu != None)
00920			M.DrawClippedTexture(C, X + W - 9, Y + 3, Texture'MenuSubArrow');
00921	
00922		M.ClipText(C, X + M.TextBorder + 2, Y + 3, Item.Caption, True);	
00923	}
00924	
00925	function Button_DrawSmallButton(UWindowSmallButton B, Canvas C)
00926	{
00927		local float Y;
00928	
00929		if(B.bDisabled)
00930			Y = 34;
00931		else
00932		if(B.bMouseDown)
00933			Y = 17;
00934		else
00935			Y = 0;
00936	
00937		B.DrawStretchedTextureSegment(C, 0, 0, 3, 16, 0, Y, 3, 16, Texture'StoneButton');
00938		B.DrawStretchedTextureSegment(C, B.WinWidth - 3, 0, 3, 16, 45, Y, 3, 16, Texture'StoneButton');
00939		B.DrawStretchedTextureSegment(C, 3, 0, B.WinWidth-6, 16, 3, Y, 42, 16, Texture'StoneButton');
00940	}
00941	
00942	simulated function PlayMenuSound(UWindowWindow W, MenuSound S)
00943	{
00944		local PlayerPawn P;
00945		local actor Ear;
00946	
00947		P = W.GetPlayerOwner();
00948	
00949		if (P.ViewTarget != None)
00950			Ear = P.ViewTarget;
00951		else
00952			Ear = P;
00953	
00954		switch(S)
00955		{
00956		case MS_MenuPullDown:
00957			Ear.PlaySound(sound'WindowOpen', SLOT_Interface);
00958			break;
00959		case MS_MenuCloseUp:
00960			break;
00961		case MS_MenuItem:
00962			Ear.PlaySound(sound'LittleSelect');
00963			break;
00964		case MS_ButtonSelect:
00965	//		Ear.PlaySound(sound'ButtonSelect', SLOT_Talk);
00966			break;
00967		case MS_WindowOpen:
00968	//		Ear.PlaySound(sound'BigSelect');
00969			break;
00970		case MS_WindowClose:
00971	//		Ear.PlaySound(sound'WindowClose');
00972			break;
00973		case MS_ChangeTab:
00974			Ear.PlaySound(sound'LittleSelect');
00975			break;
00976	
00977		case MS_TopSlide:
00978			Ear.PlaySound(sound'TopSlide', SLOT_Interface);
00979			break;
00980		case MS_TopSlam:
00981			Ear.PlaySound(sound'TopSlam', SLOT_Pain);
00982			break;
00983		case MS_BottomOpen:
00984			Ear.PlaySound(sound'BottomOpen', SLOT_None);
00985			break;
00986		case MS_LeftButton:
00987			Ear.PlaySound(sound'LeftButton', SLOT_Misc);
00988			break;
00989		case MS_TopButton:
00990			Ear.PlaySound(sound'TopButton', SLOT_Misc);
00991			break;
00992		case MS_LeftMouseOver:
00993			Ear.PlaySound(sound'LeftMouseOver', SLOT_None);
00994			break;
00995		case MS_TopMouseOver:
00996			Ear.PlaySound(sound'TopMouseOver', SLOT_None);
00997			break;
00998		case MS_WindowsStart:
00999			Ear.PlaySound(sound'WindowOpen', SLOT_None);
01000			break;
01001		case MS_WindowsEnd:
01002	//		Ear.PlaySound(sound'WindowClose', SLOT_None);
01003			break;
01004		}
01005	}
01006	
01007	defaultproperties
01008	{
01009	     SBUpUp=(X=20,Y=16,W=12,H=10)
01010	     SBUpDown=(X=32,Y=16,W=12,H=10)
01011	     SBUpDisabled=(X=44,Y=16,W=12,H=10)
01012	     SBDownUp=(X=20,Y=26,W=12,H=10)
01013	     SBDownDown=(X=32,Y=26,W=12,H=10)
01014	     SBDownDisabled=(X=44,Y=26,W=12,H=10)
01015	     SBLeftUp=(X=20,Y=48,W=10,H=12)
01016	     SBLeftDown=(X=30,Y=48,W=10,H=12)
01017	     SBLeftDisabled=(X=40,Y=48,W=10,H=12)
01018	     SBRightUp=(X=20,Y=36,W=10,H=12)
01019	     SBRightDown=(X=30,Y=36,W=10,H=12)
01020	     SBRightDisabled=(X=40,Y=36,W=10,H=12)
01021	     SBBackground=(X=4,Y=79,W=1,H=1)
01022	     FrameSBL=(Y=112,W=2,H=16)
01023	     FrameSB=(X=32,Y=112,W=1,H=16)
01024	     FrameSBR=(X=112,Y=112,W=16,H=16)
01025	     CloseBoxUp=(X=4,Y=32,W=11,H=11)
01026	     CloseBoxDown=(X=4,Y=43,W=11,H=11)
01027	     CloseBoxOffsetX=2
01028	     CloseBoxOffsetY=2
01029	     Active=Texture'RMenu.Icons.StoneActiveFrame'
01030	     Inactive=Texture'RMenu.Icons.StoneInactiveFrame'
01031	     ActiveS=Texture'RMenu.Icons.StoneActiveFrameS'
01032	     InactiveS=Texture'RMenu.Icons.StoneInactiveFrameS'
01033	     Misc=Texture'RMenu.Icons.StoneMisc'
01034	     FrameTL=(W=2,H=16)
01035	     FrameT=(X=32,W=1,H=16)
01036	     FrameTR=(X=126,W=2,H=16)
01037	     FrameL=(Y=32,W=2,H=1)
01038	     FrameR=(X=126,Y=32,W=2,H=1)
01039	     FrameBL=(Y=125,W=2,H=3)
01040	     FrameB=(X=32,Y=125,W=1,H=3)
01041	     FrameBR=(X=126,Y=125,W=2,H=3)
01042	     FrameInactiveTitleColor=(R=255,G=255,B=255)
01043	     HeadingInActiveTitleColor=(R=255,G=255,B=255)
01044	     FrameTitleX=6
01045	     FrameTitleY=2
01046	     BevelUpTL=(X=4,Y=16,W=2,H=2)
01047	     BevelUpT=(X=10,Y=16,W=1,H=2)
01048	     BevelUpTR=(X=18,Y=16,W=2,H=2)
01049	     BevelUpL=(X=4,Y=20,W=2,H=1)
01050	     BevelUpR=(X=18,Y=20,W=2,H=1)
01051	     BevelUpBL=(X=4,Y=30,W=2,H=2)
01052	     BevelUpB=(X=10,Y=30,W=1,H=2)
01053	     BevelUpBR=(X=18,Y=30,W=2,H=2)
01054	     BevelUpArea=(X=8,Y=20,W=1,H=1)
01055	     MiscBevelTL(0)=(Y=17,W=3,H=3)
01056	     MiscBevelTL(1)=(W=3,H=3)
01057	     MiscBevelTL(2)=(Y=33,W=2,H=2)
01058	     MiscBevelT(0)=(X=3,Y=17,W=116,H=3)
01059	     MiscBevelT(1)=(X=3,W=116,H=3)
01060	     MiscBevelT(2)=(X=2,Y=33,W=1,H=2)
01061	     MiscBevelTR(0)=(X=119,Y=17,W=3,H=3)
01062	     MiscBevelTR(1)=(X=119,W=3,H=3)
01063	     MiscBevelTR(2)=(X=11,Y=33,W=2,H=2)
01064	     MiscBevelL(0)=(Y=20,W=3,H=10)
01065	     MiscBevelL(1)=(Y=3,W=3,H=10)
01066	     MiscBevelL(2)=(Y=36,W=2,H=1)
01067	     MiscBevelR(0)=(X=119,Y=20,W=3,H=10)
01068	     MiscBevelR(1)=(X=119,Y=3,W=3,H=10)
01069	     MiscBevelR(2)=(X=11,Y=36,W=2,H=1)
01070	     MiscBevelBL(0)=(Y=30,W=3,H=3)
01071	     MiscBevelBL(1)=(Y=14,W=3,H=3)
01072	     MiscBevelBL(2)=(Y=44,W=2,H=2)
01073	     MiscBevelB(0)=(X=3,Y=30,W=116,H=3)
01074	     MiscBevelB(1)=(X=3,Y=14,W=116,H=3)
01075	     MiscBevelB(2)=(X=2,Y=44,W=1,H=2)
01076	     MiscBevelBR(0)=(X=119,Y=30,W=3,H=3)
01077	     MiscBevelBR(1)=(X=119,Y=14,W=3,H=3)
01078	     MiscBevelBR(2)=(X=11,Y=44,W=2,H=2)
01079	     MiscBevelArea(0)=(X=3,Y=20,W=116,H=10)
01080	     MiscBevelArea(1)=(X=3,Y=3,W=116,H=10)
01081	     MiscBevelArea(2)=(X=2,Y=35,W=9,H=9)
01082	     ComboBtnUp=(X=20,Y=60,W=12,H=12)
01083	     ComboBtnDown=(X=32,Y=60,W=12,H=12)
01084	     ComboBtnDisabled=(X=44,Y=60,W=12,H=12)
01085	     ColumnHeadingHeight=13
01086	     HLine=(X=5,Y=78,W=1,H=2)
01087	     EditBoxBevel=2
01088	     TabSelectedL=(X=4,Y=80,W=3,H=17)
01089	     TabSelectedM=(X=7,Y=80,W=1,H=17)
01090	     TabSelectedR=(X=55,Y=80,W=2,H=17)
01091	     TabUnselectedL=(X=57,Y=80,W=3,H=15)
01092	     TabUnselectedM=(X=60,Y=80,W=1,H=15)
01093	     TabUnselectedR=(X=109,Y=80,W=2,H=15)
01094	     TabBackground=(X=4,Y=79,W=1,H=1)
01095	     Size_ScrollbarWidth=12.000000
01096	     Size_ScrollbarButtonHeight=10.000000
01097	     Size_MinScrollbarHeight=6.000000
01098	     Size_TabAreaHeight=15.000000
01099	     Size_TabAreaOverhangHeight=2.000000
01100	     Size_TabSpacing=20.000000
01101	     Size_TabXOffset=1.000000
01102	     Pulldown_ItemHeight=16.000000
01103	     Pulldown_VBorder=4.000000
01104	     Pulldown_HBorder=3.000000
01105	     Pulldown_TextBorder=9.000000
01106	}

End Source Code