Core.Object | +--UWindow.UWindowBase | +--UWindow.UWindowWindow | +--UWindow.UWindowDialogControl | +--UWindow.UWindowListControl | +--UWindow.UWindowPulldownMenu | +--UMenu.UMenuOptionsMenu
string
DesktopHelp
DesktopName
Advanced,
Player
PlayerMenuHelp
PlayerMenuName
Class
PlayerWindowClass
PreferencesHelp
PreferencesName
PrioritizeHelp
PrioritizeName
class
WeaponPriorityWindowClass
void
Created()
ExecuteItem(UWindowPulldownMenuItem I)
UWindowWindow
PlayerSetup()
Select(UWindowPulldownMenuItem I)
ShowPreferences(optional bool)
00001 class UMenuOptionsMenu extends UWindowPulldownMenu; 00002 00003 var UWindowPulldownMenuItem Preferences, Prioritize, Desktop, Advanced, Player; 00004 00005 var localized string PreferencesName; 00006 var localized string PreferencesHelp; 00007 var localized string PrioritizeName; 00008 var localized string PrioritizeHelp; 00009 var localized string DesktopName; 00010 var localized string DesktopHelp; 00011 var localized string PlayerMenuName; 00012 var localized string PlayerMenuHelp; 00013 00014 var Class<UWindowWindow> PlayerWindowClass; 00015 var class<UWindowWindow> WeaponPriorityWindowClass; 00016 00017 function Created() 00018 { 00019 Super.Created(); 00020 00021 Preferences = AddMenuItem(PreferencesName, None); 00022 Player = AddMenuItem(PlayerMenuName, None); 00023 Prioritize = AddMenuItem(PrioritizeName, None); 00024 00025 AddMenuItem("-", None); 00026 00027 Desktop = AddMenuItem(DesktopName, None); 00028 Desktop.bChecked = Root.Console.ShowDesktop; 00029 } 00030 00031 function UWindowWindow PlayerSetup() 00032 { 00033 return Root.CreateWindow(PlayerWindowClass, 100, 100, 200, 200, Self, True); 00034 } 00035 00036 function ShowPreferences(optional bool bNetworkSettings) 00037 { 00038 local UMenuOptionsWindow O; 00039 00040 O = UMenuOptionsWindow(Root.CreateWindow(Class'UMenuOptionsWindow', 100, 100, 200, 200, Self, True)); 00041 if(bNetworkSettings) 00042 UMenuOptionsClientWindow(O.ClientArea).ShowNetworkTab(); 00043 } 00044 00045 function ExecuteItem(UWindowPulldownMenuItem I) 00046 { 00047 switch (I) 00048 { 00049 case Preferences: 00050 ShowPreferences(); 00051 break; 00052 case Prioritize: 00053 // Create prioritize weapons dialog. 00054 Root.CreateWindow(WeaponPriorityWindowClass, 100, 100, 200, 200, Self, True); 00055 break; 00056 case Desktop: 00057 // Toggle show desktop. 00058 Desktop.bChecked = !Desktop.bChecked; 00059 Root.Console.ShowDesktop = !Root.Console.ShowDesktop; 00060 Root.Console.bNoDrawWorld = Root.Console.ShowDesktop; 00061 Root.Console.SaveConfig(); 00062 break; 00063 case Player: 00064 // Create player dialog. 00065 PlayerSetup(); 00066 break; 00067 } 00068 00069 Super.ExecuteItem(I); 00070 } 00071 00072 function Select(UWindowPulldownMenuItem I) 00073 { 00074 switch (I) 00075 { 00076 case Preferences: 00077 UMenuMenuBar(GetMenuBar()).SetHelp(PreferencesHelp); 00078 break; 00079 case Prioritize: 00080 UMenuMenuBar(GetMenuBar()).SetHelp(PrioritizeHelp); 00081 break; 00082 case Desktop: 00083 UMenuMenuBar(GetMenuBar()).SetHelp(DesktopHelp); 00084 break; 00085 case Player: 00086 UMenuMenuBar(GetMenuBar()).SetHelp(PlayerMenuHelp); 00087 break; 00088 } 00089 00090 Super.Select(I); 00091 } 00092 00093 defaultproperties 00094 { 00095 PreferencesName="P&references" 00096 PreferencesHelp="Change your game options, audio and video setup, HUD configuration, controls and other options." 00097 PrioritizeName="&Weapons" 00098 PrioritizeHelp="Change your weapon priority, view and set weapon options." 00099 DesktopName="Show &Desktop" 00100 DesktopHelp="Toggle between showing your game behind the menus, or the desktop logo." 00101 PlayerMenuName="&Player Setup" 00102 PlayerMenuHelp="Configure your player setup for multiplayer and botmatch gaming." 00103 PlayerWindowClass=Class'UMenu.UMenuPlayerWindow' 00104 WeaponPriorityWindowClass=Class'UMenu.UMenuWeaponPriorityWindow' 00105 }