Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

XInterface.GUIButton


00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
// ====================================================================
//  Class:  UT2K4UI.GUIButton
//
//	GUIButton - The basic button class
//
//  Written by Joe Wilcox
//  (c) 2002, Epic Games, Inc.  All Rights Reserved
// ====================================================================

class GUIButton extends GUIComponent
        Native;

// (cpptext)
// (cpptext)
// (cpptext)
// (cpptext)
// (cpptext)

var()   eTextAlign                  CaptionAlign;
var() editconst     GUIStyles       CaptionEffectStyle;
var()   string                      CaptionEffectStyleName;
var()   localized   string          Caption;


var() struct native PaddingPercent
{ var() float HorzPerc, VertPerc; }  AutoSizePadding; // Padding (space) to insert around caption if autosizing

// When multiple buttons should be the same size, set this value to the longest caption of the group
// and all buttons will be sized using this caption instead
var()   string                      SizingCaption;
var()   bool                        bAutoSize;       // Size according to caption size.
var()   bool                        bAutoShrink;     // Reduce size of button if bAutoSize & caption is smaller than WinWidth
var()   bool                        bWrapCaption;    // Wrap the caption if its too long - ignored if bAutoSize = true
var()   bool                        bUseCaptionHeight; // Get the Height from the caption


function InitComponent(GUIController MyController, GUIComponent MyOwner)
{
    local eFontScale x;
    Super.InitComponent(MyController, MyOwner);

    if (CaptionEffectStyleName!="")
        CaptionEffectStyle = Controller.GetStyle(CaptionEffectStyleName,x);

}

function bool InternalOnKeyEvent(out byte Key, out byte State, float delta)
{
    if ((key==0x0D || Key == 0x20) && State==1) // ENTER or Space Pressed
    {
        OnClick(self);
        return true;
    }

    return false;
}

defaultproperties
{
     CaptionAlign=TXTA_Center
     AutoSizePadding=(HorzPerc=0.125000)
     bAutoShrink=Wahr
     StyleName="SquareButton"
     WinHeight=0.040000
     bTabStop=Wahr
     bAcceptsInput=Wahr
     bCaptureMouse=Wahr
     bMouseOverSound=Wahr
     Begin Object Class=GUIToolTip Name=GUIButtonToolTip
     End Object
     ToolTip=GUIToolTip'XInterface.GUIButton.GUIButtonToolTip'

     OnClickSound=CS_Click
     StandardHeight=0.040000
     OnKeyEvent=GUIButton.InternalOnKeyEvent
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: Fr 30.3.2007 08:43:46.000 - Creation time: Mo 16.4.2007 11:20:47.781 - Created with UnCodeX