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

XInterface.GUI


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
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153
00154
00155
00156
00157
00158
00159
00160
00161
00162
00163
00164
00165
00166
00167
00168
00169
00170
00171
00172
00173
00174
00175
00176
00177
00178
00179
00180
00181
00182
00183
00184
00185
00186
00187
00188
00189
00190
00191
00192
00193
00194
00195
00196
00197
00198
00199
00200
00201
00202
00203
00204
00205
00206
00207
00208
00209
00210
00211
00212
00213
00214
00215
00216
00217
00218
00219
00220
00221
00222
00223
00224
00225
00226
00227
00228
00229
00230
00231
00232
00233
00234
00235
00236
00237
00238
00239
00240
00241
00242
00243
00244
00245
00246
00247
00248
00249
00250
00251
00252
00253
00254
00255
00256
00257
00258
00259
00260
00261
00262
00263
00264
00265
00266
00267
00268
00269
00270
00271
00272
00273
00274
00275
00276
00277
00278
00279
00280
00281
00282
00283
00284
00285
00286
// ====================================================================
//  Class:  UT2K4UI.GUI
//
//  GUI is an abstract class that holds all of the enums and structs
//  for the UI system
//
//  Written by Joe Wilcox
//  Updated by Ron Prestenback
//  (c) 2002, Epic Games, Inc.  All Rights Reserved
// ====================================================================

class GUI extends Object
    abstract
    instanced
    native
    editinlinenew
    config(User);

cpptext
{
    virtual void  SaveCanvasState(UCanvas* Canvas);                         // Save the current state of the canvas
    virtual void  RestoreCanvasState(UCanvas* Canvas);                      // Restores the state of the canvas
}

// Number of times each of the rendering functions are allowed to be called on a single component each tick
// (PreDraw, Draw, and all delegates)
// Set to 1 to find components that are being rendered (or pre-drawn, or anything) twice each tick
// Set to 0 to disable render debugging
const Counter = 0;

var noexport GUIController Controller;             // Callback to the GUIController running the show
var noexport    plane      SaveModulation;
var noexport     float     SaveX,SaveY;
var noexport     color     SaveColor;
var noexport     font      SaveFont;
var noexport     byte      SaveStyle;


enum eMenuState     // Defines the various states of a component
{
    MSAT_Blurry,            // Component has no focus at all
    MSAT_Watched,           // Component is being watched (ie: Mouse is hovering over, etc)
    MSAT_Focused,           // Component is Focused (ie: selected)
    MSAT_Pressed,           // Component is being pressed
    MSAT_Disabled,          // Component is disabled.
};

enum eDropState     // Defines the state for components allowed to participate in drop operations
{
    DRP_None,       // Not participating in a drop operation
    DRP_Source,     // Currently acting as a source
    DRP_Target,     // Currently a target
    DRP_Accept,     // Accepted dropped data
    DRP_Reject      // Reject dropped data
};

enum eFontScale     // Defines which range of font/fontcolors are used for this component's style
{
    FNS_Small,
    FNS_Medium,
    FNS_Large
};

enum eTextAlign     // Used for aligning text in a box
{
    TXTA_Left,
    TXTA_Center,
    TXTA_Right,
};

enum eTextCase      // Used for forcing case on text
{
    TXTC_None,
    TXTC_Upper,
    TXTC_Lower,
};

enum eImgStyle      // Used to define the style for an image
{
    ISTY_Normal,
    ISTY_Stretched,
    ISTY_Scaled,
    ISTY_Bound,
    ISTY_Justified,
    ISTY_PartialScaled,
    ISTY_Tiled,
};

enum eImgAlign      // Used for aligning justified images in a box
{
    IMGA_TopLeft,
    IMGA_Center,
    IMGA_BottomRight,
};

enum eEditMask      // Used to define the mask of an input box
{
    EDM_None,
    EDM_Alpha,
    EDM_Numeric,
};

enum EMenuRenderStyle
{
    MSTY_None,
    MSTY_Normal,
    MSTY_Masked,
    MSTY_Translucent,
    MSTY_Modulated,
    MSTY_Alpha,
    MSTY_Additive,
    MSTY_Subtractive,
    MSTY_Particle,
    MSTY_AlphaZ,
};

enum eIconPosition
{
    ICP_Normal,
    ICP_Center,
    ICP_Scaled,
    ICP_Stretched,
    ICP_Bound,
};

enum ePageAlign         // Used to Align panels to a form.
{
    PGA_None,
    PGA_Client,
    PGA_Left,
    PGA_Right,
    PGA_Top,
    PGA_Bottom,
};

enum eDrawDirection
{
	DRD_LeftToRight,
	DRD_RightToLeft,
	DRD_TopToBottom,
	DRD_BottomToTop,
};

enum eCellStyle
{
	CELL_FixedSize,
    CELL_FixedCount
};

enum EOrientation
{
	ORIENT_Vertical, ORIENT_Horizontal
};

enum EAnimationType
{
	AT_Position, AT_Dimension,
};

const QBTN_Ok           =1;
const QBTN_Cancel       =2;
const QBTN_Retry        =4;
const QBTN_Continue     =8;
const QBTN_Yes          =16;
const QBTN_No           =32;
const QBTN_Abort        =64;
const QBTN_Ignore       =128;
const QBTN_OkCancel     =3;
const QBTN_AbortRetry   =68;
const QBTN_YesNo        =48;
const QBTN_YesNoCancel  =50;


struct native init GUIListElem
{
    var string Item;
    var object ExtraData;
    var string ExtraStrData;
    var bool   bSection;
};

struct APackInfo	// OBSOLETE - Use CacheManager.GetAnnouncerList() instead
{
	var string PackageName;
    var localized string Description;
};

struct native init MultiSelectListElem
{
	var string Item;
	var object ExtraData;
	var string ExtraStrData;
	var bool   bSelected;
	var int    SelectionIndex;	// Used for tracking
    var bool   bSection;
};

struct native init ImageListElem
{
	var int      Item;
	var Material Image;
	var int	 	 Locked;
};

struct native init GUITreeNode
{
	var() string Caption;
	var() string Value;
	var() string ParentCaption;
	var() string ExtraInfo;
	var() int Level;
	var() bool bEnabled;

cppstruct
{
	UBOOL operator==( const FGUITreeNode& Other ) const;
}
};

struct AutoLoginInfo
{
	var() string IP;
	var() string Port;
	var() string Username;
	var() string Password;
	var() bool   bAutologin;
};

struct GUITabItem
{
	var() string ClassName;
	var() localized string Caption, Hint;
};


// GUI-wide utility functions
static function bool IsDigit( string Test, optional bool bAllowDecimal )
{
	if ( Test == "" )
		return false;

	while ( Test != "" )
	{
		if ( Asc(Left(Test,1)) > 57 )
			return false;
		if ( Asc(Left(Test,1)) < 48 && !(bAllowDecimal && Left(Test,1) == ".") )
			return false;
		Test = Mid(Test,1);
	}

	return true;
}

// Join together array elements into a single string
static final function string JoinArray(array<string> StringArray, optional string delim, optional bool bIgnoreBlanks)
{
    local int i;
    local string s;

    if (delim == "")
        delim = ",";

    for (i = 0; i < StringArray.Length; i++)
    {
        if ((StringArray[i] != "") || (!bIgnoreBlanks))
        {
            if (s != "")
                s $= delim;

            s $= StringArray[i];
        }
    }

    return s;
}


// Temp for profiling

native function Profile(string ProfileName);

native function 			GetModList(out array<string> ModDirs, out array<string> ModTitles);
native function string		GetModValue(string ModDir, string ModKey);
native function material 	GetModLogo(string ModDir);


Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: Di 5.9.2006 22:36:28.000 - Creation time: Do 14.8.2014 09:58:39.812 - Created with UnCodeX