Skip to content

Commit

Permalink
Force hardcoded references to the vanilla singleplayer menu to the new
Browse files Browse the repository at this point in the history
mutator menu
  • Loading branch information
theastropath committed Jan 26, 2025
1 parent 41810d4 commit fc43c39
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions Classes/UT2K4GUIControllerMutator.uc
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
class UT2K4GUIControllerMutator extends UT2K4GUIController;

function String SwapSPMenuClass(string NewMenuName)
{
if ( NewMenuName ~= "GUI2K4.UT2K4SP_Main") //The vanilla single player menu
{
NewMenuName=Default.MainMenuOptions[0];
}

return NewMenuName;
}

event bool OpenMenu(string NewMenuName, optional string Param1, optional string Param2)
{
return Super.OpenMenu(SwapSPMenuClass(NewMenuName), Param1, Param2);
}

event bool ReplaceMenu(string NewMenuName, optional string Param1, optional string Param2, optional bool bCancelled)
{
return Super.ReplaceMenu(SwapSPMenuClass(NewMenuName),Param1,Param2,bCancelled);
}

defaultproperties
{
MainMenuOptions(0)="UT2k4SPMutators.UT2K4SPMutator_Main"
Expand Down

0 comments on commit fc43c39

Please sign in to comment.