home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Game Level Design
/
GLDesign.bin
/
Software
/
UnrealEngine2Runtime
/
UE2Runtime-22262001_Demo.exe
/
GUI
/
Classes
/
GUIGFXButton.uc
< prev
next >
Wrap
Text File
|
2003-06-30
|
1KB
|
61 lines
// ====================================================================
// Class: GUI.GUIButton
//
// GUIGFXButton - The basic button class. It can be used for icon buttons
// or Checkboxes
//
// Written by Joe Wilcox
// (c) 2002, Epic Games, Inc. All Rights Reserved
// ====================================================================
class GUIGFXButton extends GUIButton
Native;
#exec OBJ LOAD FILE=GUIContent.utx
cpptext
{
void Draw(UCanvas* Canvas);
}
var(Menu) Material Graphic; // The graphic to display
var(Menu) eIconPosition Position; // How do we draw the Icon
var(Menu) bool bCheckBox; // Is this a check box button (ie: supports 2 states)
var(Menu) bool bClientBound; // Graphic is drawn using clientbounds if true
var bool bChecked;
function InitComponent(GUIController MyController, GUIComponent MyOwner)
{
Super.Initcomponent(MyController, MyOwner);
if (bCheckBox)
OnCLick = InternalOnClick;
}
function SetChecked(bool bNewChecked)
{
if (bCheckBox)
{
bChecked = bNewChecked;
OnChange(Self);
}
}
function bool InternalOnClick(GUIComponent Sender)
{
if (bCheckBox)
bChecked = !bChecked;
OnChange(Self);
return true;
}
defaultproperties
{
Position=ICP_Normal
bCheckBox=false
bRepeatClick=true
bChecked=false
bTabStop=false
}