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

GUI2K4.UT2K4GetDataMenu


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
//==============================================================================
//	Created on: 10/05/2003
//	This menu contains an editbox for entering a single data item
//
//	Written by Ron Prestenback
//	© 2003, Epic Games, Inc.  All Rights Reserved
//==============================================================================
class UT2K4GetDataMenu extends UT2K4GenericMessageBox;

var automated GUIButton b_Cancel;
var automated moEditbox ed_Data;

function InitComponent( GUIController MyController, GUIComponent MyOwner )
{
	ed_Data.TabOrder = 0;
	b_OK.TabOrder = 1;
	b_Cancel.TabOrder = 2;

	Super.InitComponent( MyController, MyOwner );

	RemoveComponent(l_Text2);

	b_Ok.bBoundtoParent=true;
	b_Ok.bStandardized=true;
	b_Ok.bScaletoPArent=true;
	b_Cancel.bBoundtoParent=true;
	b_Cancel.bStandardized=true;
	b_Cancel.bScaletoPArent=true;

}

function HandleParameters( string A, string B )
{
	l_Text.Caption = A;
	ed_Data.SetCaption(B);
}

function string GetDataString()
{
	return ed_Data.GetText();
}

function SetDataString( string Str )
{
	Super.SetDataString(Str);
	ed_Data.SetText(Str);
}

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

function bool InternalOnKeyEvent( out byte Key, out byte State, float Delta )
{
	if ( State == 3 && Key == 0x0B )	// Escape
		return InternalOnClick(b_Cancel);

	return Super.InternalOnKeyEvent(Key,State,Delta);
}

function bool InternalOnPreDraw( Canvas C )
{
	local bool b;
	local float w,l,t;
	b = super.InternalOnPreDraw(c);

	t = 1 - ( 64/ActualHeight() ) - b_Cancel.WinHeight;
	w = 0.15 + (b_Cancel.WinWidth*2);
	l = 0.5 - (w*0.5);

	b_Cancel.SetPosition(l,t,b_Cancel.WinWidth,b_Cancel.WinHeight);
	l+= 0.15 + b_Cancel.WinWidth;
	b_Ok.SetPosition(l,t,b_Cancel.WinWidth,b_Cancel.WinHeight);

	return b;
}

DefaultProperties
{
	WinWidth=1.000000
	WinHeight=0.423438
	WinLeft=0.000000
	WinTop=0.289583

	Begin Object class=GUILabel Name=DialogText
		TextALign=TXTA_Center
		StyleName="TextButton"
		FontScale=FNS_Large
		WinWidth=1
		WinLeft=0
		WinTop=0.388281
		WinHeight=0.09375
	End Object
    l_Text=DialogText

	Begin Object Class=GUIButton Name=CancelButton
		OnClick=InternalOnClick
		WinWidth=0.131641
		WinHeight=0.047812
		WinLeft=0.573047
		WinTop=0.554167
		Caption="CANCEL"
		Hint="Close this menu, discarding changes."
	End Object
	b_Cancel=CancelButton

	Begin Object class=moEditBox Name=Data
		WinWidth=0.500000
		WinHeight=0.047305
		WinLeft=0.250000
		WinTop=0.487710
		CaptionWidth=0.4
		TabOrder=0
	End Object
	ed_Data=Data
}

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:53.393 - Created with UnCodeX