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 |
class UTGameMenu extends UWindowPulldownMenu; var UWindowPulldownMenuItem NewGame, LoadGame, Botmatch, Quit, ReturnToGame; var localized string NewGameName; var localized string NewGameHelp; var localized string LoadGameName; var localized string LoadGameHelp; var localized string BotmatchName; var localized string BotmatchHelp; var localized string ReturnToGameName; var localized string ReturnToGameHelp; var localized string QuitName; var localized string QuitHelp; var localized string QuitTitle; var localized string QuitText; var localized string DemoQuitText; var UWindowMessageBox ConfirmQuit; function Created() { Super.Created(); // Add menu items. NewGame = AddMenuItem(NewGameName, None); Botmatch = AddMenuItem(BotmatchName, None); AddMenuItem("-", None); LoadGame = AddMenuItem(LoadGameName, None); ReturnToGame = AddMenuItem(ReturnToGameName, None); AddMenuItem("-", None); Quit = AddMenuItem(QuitName, None); } function ShowWindow() { Super.ShowWindow(); ReturnToGame.bDisabled = GetLevel().Game != None && GetLevel().Game.IsA('UTIntro'); } function MessageBoxDone(UWindowMessageBox W, MessageBoxResult Result) { if(class'GameInfo'.Default.DemoBuild == 1) { if(W == ConfirmQuit) { switch(Result) { case MR_Yes: GetPlayerOwner().ConsoleCommand("start http://www.unrealtournament.com"); GetPlayerOwner().ConsoleCommand("exit"); break; case MR_No: Root.QuitGame(); break; } } } else { if(W == ConfirmQuit && Result == MR_Yes) Root.QuitGame(); } } function ExecuteItem(UWindowPulldownMenuItem I) { local string StartMap; local int EmptySlot, j; switch(I) { case NewGame: GetPlayerOwner().ClientTravel( "UT-Logo-Map.unr?Game=Botpack.LadderNewGame", TRAVEL_Absolute, True ); break; case LoadGame: GetPlayerOwner().ClientTravel( "UT-Logo-Map.unr?Game=Botpack.LadderLoadGame", TRAVEL_Absolute, True ); break; case Botmatch: // Create botmatch dialog. Root.CreateWindow(class'UTBotmatchWindow', 100, 100, 200, 200, Self, True); break; case Quit: if(class'GameInfo'.Default.DemoBuild == 1) ConfirmQuit = MessageBox(QuitTitle, DemoQuitText, MB_YesNoCancel, MR_Cancel, MR_No); else ConfirmQuit = MessageBox(QuitTitle, QuitText, MB_YesNo, MR_No, MR_Yes); break; case ReturnToGame: Root.Console.CloseUWindow(); break; } Super.ExecuteItem(I); } function Select(UWindowPulldownMenuItem I) { switch(I) { case NewGame: UMenuMenuBar(GetMenuBar()).SetHelp(NewGameHelp); return; case LoadGame: UMenuMenuBar(GetMenuBar()).SetHelp(LoadGameHelp); return; case Botmatch: UMenuMenuBar(GetMenuBar()).SetHelp(BotmatchHelp); break; case Quit: UMenuMenuBar(GetMenuBar()).SetHelp(QuitHelp); break; case ReturnToGame: UMenuMenuBar(GetMenuBar()).SetHelp(ReturnToGameHelp); break; } Super.Select(I); } defaultproperties { NewGameName="&Start Unreal Tournament" NewGameHelp="Select to start a new Unreal Tournament game!" LoadGameName="&Resume Saved Tournament" LoadGameHelp="Select to resume a saved Unreal Tournament game." BotmatchName="Start &Practice Session" BotmatchHelp="Select to begin a practice game against bots." ReturnToGameName="Return to &Current Game" ReturnToGameHelp="Leave the menus and return to your current game. Pressing the ESC key also returns you to the current game." QuitName="&Quit" QuitHelp="Select to save preferences and exit Unreal." QuitTitle="Confirm Quit" QuitText="Are you sure you want to Quit?" DemoQuitText="Thank you for playing the Unreal Tournament Demo. Visit our website for information on the full version of the game, which contains 7 unique game types and over 50 levels!\n\nWould you like to visit the Unreal Tournament website now?" } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |