GUI
Class GUIButton

source: C:\XIII\GUI\Classes\GUIButton.uc
Core.Object
   |
   +--GUI.GUI
      |
      +--GUI.GUIComponent
         |
         +--GUI.GUIButton
Direct Known Subclasses:GUIGFXButton, XIIIGUIButton

class GUIButton
extends GUI.GUIComponent

// ==================================================================== // (c) 2002, Epic Games, Inc. All Rights Reserved // ====================================================================

Function Summary
 void InitComponent(GUIController MyController, GUIComponent MyOwner)
 bool InternalOnKeyEvent(out byte, out byte, float delta)



Source Code


00001	// ====================================================================
00002	//  (c) 2002, Epic Games, Inc.  All Rights Reserved
00003	// ====================================================================
00004	
00005	class GUIButton extends GUIComponent
00006			Native;
00007	
00008			
00009	var		localized	string			Caption;
00010	
00011	function InitComponent(GUIController MyController, GUIComponent MyOwner)
00012	{
00013		Super.InitComponent(MyController, MyOwner);
00014		OnKeyEvent=InternalOnKeyEvent;
00015	}
00016	
00017	function bool InternalOnKeyEvent(out byte Key, out byte State, float delta)
00018	{
00019		if (key==0x0D && State==3)	// ENTER Pressed
00020		{
00021			OnClick(self);
00022			return true;
00023		}
00024		
00025		if (key==0x26 && (State==1 || State==2))
00026		{
00027			PrevControl(none);
00028			return true;
00029		}
00030				
00031		if (key==0x28 && (State==1 || State==2))
00032		{
00033			NextControl(none);
00034			return true;
00035		}
00036		
00037		return false;
00038	}
00039	
00040	
00041	
00042	event ButtonPressed();		// Called when the button is pressed;
00043	event ButtonReleased();		// Called when the button is released;
00044	
00045	
00046	
00047	defaultproperties
00048	{
00049	     bAcceptsInput=True
00050	     bCaptureMouse=True
00051	     WinHeight=0.040000
00052	     bTabStop=True
00053	     bFocusOnWatch=True
00054	     bMouseOverSound=True
00055	     OnClickSound=GUI_CS_Click
00056	}

End Source Code