Core.Object | +--Engine.Actor | +--Engine.Menu | +--UnrealShare.UnrealMenu | +--UnrealShare.UnrealLongMenu | +--UnrealShare.UnrealGameOptionsMenu | +--UnrealShare.UnrealDMGameOptionsMenu
string
GameStyle[3]
void
DrawOptions(Canvas Canvas, int StartX, int StartY, int Spacing)
DrawValues(Canvas Canvas, int StartX, int StartY, int Spacing)
bool
ProcessLeft()
ProcessNo()
ProcessRight()
ProcessSelection()
ProcessYes()
00001 //============================================================================= 00002 // UnrealDMGameOptionsMenu 00003 //============================================================================= 00004 class UnrealDMGameOptionsMenu extends UnrealGameOptionsMenu; 00005 00006 var() localized string GameStyle[3]; 00007 00008 function bool ProcessYes() 00009 { 00010 if ( Selection == 6 ) 00011 DeathMatchGame(GameType).bCoopWeaponMode = True; 00012 else if ( Selection == 9 ) 00013 GameType.bClassicDeathmessages = True; 00014 else 00015 return Super.ProcessYes(); 00016 00017 return true; 00018 } 00019 00020 function bool ProcessNo() 00021 { 00022 if ( Selection == 6 ) 00023 DeathMatchGame(GameType).bCoopWeaponMode = False; 00024 else if ( Selection == 9 ) 00025 GameType.bClassicDeathmessages = False; 00026 else 00027 return Super.ProcessNo(); 00028 00029 return true; 00030 } 00031 00032 function bool ProcessLeft() 00033 { 00034 if ( Selection == 3 ) 00035 DeathMatchGame(GameType).FragLimit = FMax(0, DeathMatchGame(GameType).FragLimit - 5); 00036 else if ( Selection == 4 ) 00037 DeathMatchGame(GameType).TimeLimit = FMax(0, DeathMatchGame(GameType).TimeLimit - 5); 00038 else if ( Selection == 5 ) 00039 GameType.MaxPlayers = Max(1, GameType.MaxPlayers - 1); 00040 else if ( Selection == 6 ) 00041 DeathMatchGame(GameType).bCoopWeaponMode = !DeathMatchGame(GameType).bCoopWeaponMode; 00042 else if ( Selection == 8 ) 00043 { 00044 if ( DeathMatchGame(GameType).bMegaSpeed ) 00045 DeathMatchGame(GameType).bMegaSpeed = false; 00046 else if ( DeathMatchGame(GameType).bHardCoreMode ) 00047 DeathMatchGame(GameType).bHardCoreMode = false; 00048 else 00049 { 00050 DeathMatchGame(GameType).bMegaSpeed = true; 00051 DeathMatchGame(GameType).bHardCoreMode = true; 00052 } 00053 } 00054 else if ( Selection == 9 ) 00055 GameType.bClassicDeathmessages = !GameType.bClassicDeathmessages; 00056 else 00057 return Super.ProcessLeft(); 00058 00059 return true; 00060 } 00061 00062 function bool ProcessRight() 00063 { 00064 if ( Selection == 3 ) 00065 DeathMatchGame(GameType).FragLimit += 5; 00066 else if ( Selection == 4 ) 00067 DeathMatchGame(GameType).TimeLimit += 5; 00068 else if ( Selection == 5 ) 00069 GameType.MaxPlayers = Min(16, GameType.MaxPlayers + 1); 00070 else if ( Selection == 6 ) 00071 DeathMatchGame(GameType).bCoopWeaponMode = !DeathMatchGame(GameType).bCoopWeaponMode; 00072 else if ( Selection == 8 ) 00073 { 00074 if ( DeathMatchGame(GameType).bMegaSpeed ) 00075 { 00076 DeathMatchGame(GameType).bMegaSpeed = false; 00077 DeathMatchGame(GameType).bHardCoreMode = false; 00078 } 00079 else if ( DeathMatchGame(GameType).bHardCoreMode ) 00080 DeathMatchGame(GameType).bMegaSpeed = true; 00081 else 00082 DeathMatchGame(GameType).bHardCoreMode = true; 00083 } 00084 else if ( Selection == 9 ) 00085 GameType.bClassicDeathmessages = !GameType.bClassicDeathmessages; 00086 else 00087 return Super.ProcessRight(); 00088 00089 return true; 00090 } 00091 00092 function bool ProcessSelection() 00093 { 00094 local Menu ChildMenu; 00095 00096 if ( Selection == 6 ) 00097 DeathMatchGame(GameType).bCoopWeaponMode = !DeathMatchGame(GameType).bCoopWeaponMode; 00098 else if ( Selection == 7 ) 00099 { 00100 ChildMenu = spawn(class'UnrealBotConfigMenu', owner); 00101 ChildMenu.ParentMenu = self; 00102 UnrealBotConfigMenu(ChildMenu).InitConfig(GameType); 00103 } 00104 else if ( Selection == 8 ) 00105 DeathMatchGame(GameType).bHardCoreMode = !DeathMatchGame(GameType).bHardCoreMode; 00106 else if ( Selection == 9 ) 00107 GameType.bClassicDeathmessages = !GameType.bClassicDeathmessages; 00108 else 00109 return Super.ProcessSelection(); 00110 00111 if ( ChildMenu != None ) 00112 { 00113 HUD(Owner).MainMenu = ChildMenu; 00114 ChildMenu.ParentMenu = self; 00115 ChildMenu.PlayerOwner = PlayerOwner; 00116 } 00117 return true; 00118 } 00119 00120 function DrawOptions(canvas Canvas, int StartX, int StartY, int Spacing) 00121 { 00122 local int i; 00123 00124 for ( i=3; i<MenuLength+1; i++ ) 00125 MenuList[i] = Default.MenuList[i]; 00126 00127 Super.DrawOptions(Canvas, StartX, StartY, Spacing); 00128 } 00129 00130 function DrawValues(canvas Canvas, int StartX, int StartY, int Spacing) 00131 { 00132 local DeathMatchGame DMGame; 00133 local int s; 00134 00135 DMGame = DeathMatchGame(GameType); 00136 00137 // draw text 00138 MenuList[3] = string(DMGame.FragLimit); 00139 MenuList[4] = string(DMGame.TimeLimit); 00140 MenuList[5] = string(DMGame.MaxPlayers); 00141 MenuList[6] = string(DMGame.bCoopWeaponMode); 00142 MenuList[7] = ""; 00143 if ( DMGame.bMegaSpeed ) 00144 MenuList[8] = GameStyle[2]; 00145 else if ( DMGame.bHardcoreMode ) 00146 MenuList[8] = GameStyle[1]; 00147 else 00148 MenuList[8] = GameStyle[0]; 00149 if (DMGame.bClassicDeathmessages) 00150 MenuList[9] = "Classic"; 00151 else 00152 MenuList[9] = "Weapon Based"; 00153 00154 Super.DrawValues(Canvas, StartX, StartY, Spacing); 00155 } 00156 00157 defaultproperties 00158 { 00159 GameStyle(0)="Classic" 00160 GameStyle(1)="Hardcore" 00161 GameStyle(2)="Turbo" 00162 GameClass=Class'UnrealShare.DeathMatchGame' 00163 MenuLength=9 00164 HelpMessage(3)="Number of frags scored by leading player to end game. If 0, there is no limit." 00165 HelpMessage(4)="Time limit (in minutes) to end game. If 0, there is no limit." 00166 HelpMessage(5)="Maximum number of players allowed in the game." 00167 HelpMessage(6)="If Weapons Stay is enabled, weapons respawn instantly, but can only be picked up once by a given player." 00168 HelpMessage(7)="Configure bot game and individual parameters." 00169 HelpMessage(8)="Choose Game Style: Hardcore game speed is faster and weapons do more damage than Classic. Turbo is Hardcore with really fast movement." 00170 HelpMessage(9)="Classic or new style (weapon based) deathmessages." 00171 MenuList(3)="Frag limit" 00172 MenuList(4)="Time Limit" 00173 MenuList(5)="Max Players" 00174 MenuList(6)="Weapons Stay" 00175 MenuList(7)="Configure Bots" 00176 MenuList(8)="Game Style" 00177 MenuList(9)="DeathMessages" 00178 }