rott/kf_sources/GUI2K4/Classes/UT2K4GenericMessageBox.uc
2026-07-14 20:27:09 +07:00

87 lines
1.9 KiB
Ucode

// ====================================================================
// Generic message box. For any dialog box that has nothing but a caption,
// message, and OK button.
//
// Written by Matt Oelfke
// (C) 2003, Epic Games
// ====================================================================
class UT2K4GenericMessageBox extends MessageWindow;
var automated GUIButton b_OK;
var automated GUILabel l_Text, l_Text2;
var color MyRedColor;
function bool InternalOnClick(GUIComponent Sender)
{
Controller.CloseMenu(false);
return true;
}
function HandleParameters(string Param1, string Param2)
{
if ( Param1 != "" )
l_Text.Caption = Param1;
if ( Param2 != "" )
l_Text2.Caption = Param2;
}
function bool InternalOnKeyEvent(out byte Key, out byte State, float delta)
{
if ( Key == 0x0D && State == 3 ) // Enter
return InternalOnClick(b_OK);
return false;
}
defaultproperties
{
OnKeyEvent=InternalOnKeyEvent
//MyRedColor=(R=255,G=0,B=0,A=255)
Begin Object Class=GUIButton Name=OkButton
Caption="OK"
WinWidth=0.200000
WinHeight=0.040000
WinLeft=0.400000
WinTop=0.549479
OnClick=InternalOnClick
// if _RO_
// StyleName="SelectButton"
// end if _RO_
End Object
b_Ok=OKButton
Begin Object class=GUILabel Name=DialogText
Caption="WARNING"
TextALign=TXTA_Center
// if _RO_
// StyleName="TextLabel"
// else
// StyleName="TextButton"
// end if _RO_
TextColor=(R=255,G=0,B=0,A=255)
FontScale=FNS_Large
WinWidth=0.884722
WinHeight=0.042149
WinLeft=0.056771
WinTop=0.389843
VertAlign=TXTA_Center
End Object
l_Text=DialogText
Begin Object class=GUILabel Name=DialogText2
TextALign=TXTA_Center
//StyleName="TextLabel"
TextColor=(R=255,G=0,B=0,A=255)
WinWidth=0.912500
WinHeight=0.126524
WinLeft=0.043750
WinTop=0.431249
bMultiline=true
End Object
l_Text2=DialogText2
}