Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |
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 |
//============================================================================== // Created on: 09/14/2003 // Configures a keybind and channel name for quickly switching active voice chat room // // Written by Ron Prestenback // © 2003, Epic Games, Inc. All Rights Reserved //============================================================================== class VoiceChatKeyBindPage extends LargeWindow; var automated GUILabel l_PageTitle, l_KeyLabel1, l_KeyLabel2, l_Key1, l_Key2; var automated moEditBox ed_ChannelName; var automated GUIButton b_OK/*, b_Cancel*/; var localized string NoneText, AnyKeyText; var string Channel; var array<string> Keys, LocalizedKeys; function InitComponent(GUIController MyController, GUIComponent MyOwner) { Super.InitComponent(MyController, MyOwner); l_Key1.Caption = NoneText; l_Key2.Caption = NoneText; } function HandleParameters(string Value, string Nothing) { Channel = Value; ed_ChannelName.SetText(Channel); GetBinds(); } function GetBinds() { UpdateLabel(l_Key1, False); UpdateLabel(l_Key2, False); Controller.GetAssignedKeys("Speak" @ Channel, Keys, LocalizedKeys); if ( LocalizedKeys.Length > 0 ) l_Key1.Caption = LocalizedKeys[0]; if ( LocalizedKeys.Length > 1 ) l_Key2.Caption = LocalizedKeys[1]; } function bool CloseClick(GUIComponent Sender) { Controller.CloseMenu(False); return true; } function InternalOnChange(GUIComponent Sender) { switch ( Sender ) { case ed_ChannelName: Channel = ed_ChannelName.GetText(); break; } } function bool KeyClick(GUIComponent Sender) { if ( GUILabel(Sender) != None ) { UpdateLabel( GUILabel(Sender), True ); Controller.OnNeedRawKeyPress = RawKeyPress; Controller.Master.bRequireRawJoystick = True; PlayerOwner().ConsoleCommand("toggleime 0"); return true; } return false; } function UpdateLabel( GUILabel Label, bool bWaitingForRawInput ) { if ( Label == None ) return; if ( bWaitingForRawInput ) { Label.Caption = AnyKeyText; Label.FontScale = FNS_Small; } else { Label.FontScale = FNS_Medium; Label.Caption = NoneText; } } function bool RawKeyPress(byte NewKey) { local string NewKeyName, LocalizedKeyName; Controller.OnNeedRawKeyPress = None; Controller.Master.bRequireRawJoystick = False; PlayerOwner().ConsoleCommand("toggleime 1"); if ( NewKey == 0x1B ) { GetBinds(); return true; } Controller.KeyNameFromIndex( NewKey, NewKeyName, LocalizedKeyName ); Controller.SetKeyBind( NewKeyName, "Speak" @ Channel ); PlayerOwner().ClientPlaySound(Controller.ClickSound); GetBinds(); return true; } DefaultProperties { NoneText="None" AnyKeyText="Press Any Key|To Bind Command" WinLeft=0 WinTop=0.375 WinWidth=1 WinHeight=0.3 Begin Object Class=GUILabel Name=Title WinWidth=0.629687 WinHeight=0.068164 WinLeft=0.185352 WinTop=0.388802 Caption="Modify Quick Switch KeyBind" StyleName="TextLabel" FontScale=FNS_Large End Object l_PageTitle=Title Begin Object Class=moEditBox Name=ChannelName Caption="Channel Name" LabelJustification=TXTA_Center bVerticalLayout=True WinWidth=0.278125 WinHeight=0.087695 WinLeft=0.142383 WinTop=0.486458 OnChange=InternalOnChange End Object ed_ChannelName=ChannelName Begin Object Class=GUILabel Name=KeyLabel1 WinWidth=0.082813 WinHeight=0.038867 WinLeft=0.464649 WinTop=0.487760 Caption="Key 1" StyleName="TextLabel" End Object l_KeyLabel1=KeyLabel1 Begin Object Class=GUILabel Name=KeyLabel2 WinWidth=0.200000 WinHeight=0.038867 WinLeft=0.654102 WinTop=0.487760 Caption="Key 2" StyleName="TextLabel" End Object l_KeyLabel2=KeyLabel2 Begin Object Class=GUILabel Name=Key1 WinWidth=0.163867 WinHeight=0.082813 WinLeft=0.463673 WinTop=0.529427 bAcceptsInput=True OnClick=KeyClick StyleName="TextLabel" bMultiLine=True End Object l_Key1=Key1 Begin Object Class=GUILabel Name=Key2 WinWidth=0.130664 WinHeight=0.082813 WinLeft=0.654102 WinTop=0.529427 bAcceptsInput=True OnClick=KeyClick StyleName="TextLabel" bMultiLine=True End Object l_Key2=Key2 Begin Object Class=GUIButton Name=OKButton WinWidth=0.116992 WinHeight=0.04 WinLeft=0.673633 WinTop=0.616667 Caption="Apply" OnClick=CloseClick End Object b_OK=OKButton /* Begin Object Class=GUIButton Name=CancelButton WinWidth=0.116992 WinHeight=0.04 WinLeft=0.795703 WinTop=0.616667 Caption="Cancel" OnClick=CloseClick End Object b_Cancel=CancelButton Begin Object Class=GUIImage Name=PageBackground End Object i_PageBackground=PageBackground */ } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |