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

GUI2K4.LockedFloatingWindow


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
//==============================================================================
//  Created on: 12/29/2003
//  This implementation of floating window has an internal frame, and is intended for
//  menus which contain one or two large components (like lists)
//
//  Written by Ron Prestenback
//  © 2003, Epic Games, Inc. All Rights Reserved
//==============================================================================

class LockedFloatingWindow extends FloatingWindow;

var automated GUISectionBackground sb_Main;
var automated GUIButton b_Cancel, b_OK;

var() localized string SubCaption;  // this is the caption that will go onto the sectionbackground header
var() float EdgeBorder[4];

function InitComponent(GUIController InController, GUIComponent InOwner)
{
	Super.InitComponent(InController, InOwner);

	if ( SubCaption != "" )
		sb_Main.Caption = SubCaption;

	AlignButtons();

}

function InternalOnCreateComponent(GUIComponent NewComp, GUIComponent Sender)
{
	if ( Sender == Self )
		NewComp.bBoundToParent = True;
	else Super.InternalOnCreateComponent(NewComp, Sender);
}

function bool InternalOnClick(GUIComponent Sender)
{
	if ( Sender == b_OK )
	{
		Controller.CloseMenu(false);
		return true;
	}

	if ( Sender == b_Cancel )
	{
		Controller.CloseMenu(true);
		return true;
	}

	return false;
}

function AlignButtons()
{
	local float X,Y,Xs,Ys;
	local float WIP,HIP;

	WIP = ActualWidth();
	HIP = ActualHeight();

	Xs = b_Ok.ActualWidth() * 0.1;
	Ys = b_Ok.ActualHeight() * 0.1;

	X = 1 - ( (b_Ok.ActualWidth()  + Xs) / WIP) - (EdgeBorder[2] / WIP);
	Y = 1 - ( (b_Ok.ActualHeight() + Ys) / HIP) - (EdgeBorder[3] / WIP);

	b_Ok.WinLeft = X;
	b_Ok.WinTop = Y;

	X = 1 -( (b_Ok.ActualWidth() + b_Cancel.ActualWidth() + Xs) / WIP) - (EdgeBorder[2] / WIP);

	b_Cancel.WinLeft = X;
	b_Cancel.WinTop = Y;
}

defaultproperties
{
	InactiveFadeColor=(R=60,G=60,B=60,A=255)
	bResizeWidthAllowed=False
	bResizeHeightAllowed=False
	bAllowedAsLast=false
	bCaptureInput=True

	DefaultLeft=0.125
	DefaultTop=0.15
	DefaultWidth=0.74
	DefaultHeight=0.7

	WinLeft=0.125
	WinTop=0.15
	WinWidth=0.74
	WinHeight=0.7

	Begin Object class=AltSectionBackground name=InternalFrameImage
		WinWidth=0.675859
		WinHeight=0.550976
		WinLeft=0.040000
		WinTop=0.075000
    End Object
    sb_Main=InternalFrameImage

	Begin Object Class=GUIButton Name=LockedCancelButton
        bBoundToParent=true
		WinWidth=0.159649
		WinLeft=0.512695
		WinTop=0.872397
        Caption="Cancel"
        TabOrder=99
        OnClick=InternalOnClick
        bAutoShrink=False
    End Object
    b_Cancel=LockedCancelButton

	Begin Object Class=GUIButton Name=LockedOKButton
        bBoundToParent=true
		WinWidth=0.159649
		WinLeft=0.742188
		WinTop=0.872397
        Caption="OK"
        OnClick=InternalOnClick
        TabOrder=100
        bAutoShrink=False
    End Object
    b_OK=LockedOKButton
    EdgeBorder(0)=16
    EdgeBorder(1)=24
    EdgeBorder(2)=16
    EdgeBorder(3)=24

}

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