Core.Object | +--UWindow.UWindowBase | +--UWindow.UWindowWindow | +--UWindow.UWindowDialogControl | +--UWindow.UWindowListControl | +--UWindow.UWindowPulldownMenu | +--UMenu.UMenuToolsMenu
string
ConsoleHelp
ConsoleName
LogHelp
LogName
TimeDemo,
ShowLog
TimeDemoHelp
TimeDemoName
void
Created()
ExecuteItem(UWindowPulldownMenuItem I)
Select(UWindowPulldownMenuItem I)
ShowWindow()
00001 class UMenuToolsMenu extends UWindowPulldownMenu; 00002 00003 var UWindowPulldownMenuItem Console, TimeDemo, ShowLog; 00004 00005 var localized string ConsoleName; 00006 var localized string ConsoleHelp; 00007 var localized string TimeDemoName; 00008 var localized string TimeDemoHelp; 00009 var localized string LogName; 00010 var localized string LogHelp; 00011 00012 function Created() 00013 { 00014 Super.Created(); 00015 00016 // Add menu items. 00017 Console = AddMenuItem(ConsoleName, None); 00018 Console.bChecked = Root.Console.bShowConsole; 00019 TimeDemo = AddMenuItem(TimeDemoName, None); 00020 TimeDemo.bChecked = Root.Console.bTimeDemo; 00021 ShowLog = AddMenuItem(LogName, None); 00022 } 00023 00024 function ShowWindow() 00025 { 00026 Super.ShowWindow(); 00027 00028 Console.bChecked = Root.Console.bShowConsole; 00029 } 00030 00031 function ExecuteItem(UWindowPulldownMenuItem I) 00032 { 00033 switch(I) 00034 { 00035 case Console: 00036 Console.bChecked = !Console.bChecked; 00037 if (Console.bChecked) 00038 Root.Console.ShowConsole(); 00039 else 00040 Root.Console.HideConsole(); 00041 break; 00042 case TimeDemo: 00043 TimeDemo.bChecked = !TimeDemo.bChecked; 00044 GetPlayerOwner().ConsoleCommand("TIMEDEMO "$TimeDemo.bChecked); 00045 break; 00046 case ShowLog: 00047 GetPlayerOwner().ConsoleCommand("SHOWLOG"); 00048 break; 00049 } 00050 00051 Super.ExecuteItem(I); 00052 } 00053 00054 00055 function Select(UWindowPulldownMenuItem I) 00056 { 00057 switch(I) 00058 { 00059 case Console: 00060 UMenuMenuBar(GetMenuBar()).SetHelp(ConsoleHelp); 00061 break; 00062 case TimeDemo: 00063 UMenuMenuBar(GetMenuBar()).SetHelp(TimeDemoHelp); 00064 break; 00065 case ShowLog: 00066 UMenuMenuBar(GetMenuBar()).SetHelp(LogHelp); 00067 break; 00068 } 00069 00070 Super.Select(I); 00071 } 00072 00073 defaultproperties 00074 { 00075 ConsoleName="System &Console" 00076 ConsoleHelp="This option brings up the Unreal Console. You can use the console to enter advanced commands and cheats." 00077 TimeDemoName="T&imeDemo Statistics" 00078 TimeDemoHelp="Enable the TimeDemo statistic to measure your frame rate." 00079 LogName="Show &Log" 00080 LogHelp="Show the Unreal log window." 00081 }