Skip to content

Commit

Permalink
remove scene load button
Browse files Browse the repository at this point in the history
  • Loading branch information
misternebula committed Feb 28, 2024
1 parent fda5405 commit 707198e
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 121 deletions.
1 change: 0 additions & 1 deletion src/OWML.Common/Interfaces/Menus/IPauseMenuManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,5 @@ public interface IPauseMenuManager

public GameObject MakeMenuOpenButton(string name, Menu menuToOpen, Menu customMenu = null);

public GameObject MakeSceneLoadButton(string name, SubmitActionLoadScene.LoadableScenes sceneToLoad, PopupMenu confirmPopup = null, Menu customMenu = null);
}
}
100 changes: 0 additions & 100 deletions src/OWML.ModHelper.Menus/NewMenuSystem/OWMLSubmitActionLoadScene.cs

This file was deleted.

20 changes: 0 additions & 20 deletions src/OWML.ModHelper.Menus/NewMenuSystem/PauseMenuManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,26 +103,6 @@ public GameObject MakeMenuOpenButton(string name, Menu menuToOpen, Menu customMe
return menuRootObject;
}

public GameObject MakeSceneLoadButton(string name, SubmitActionLoadScene.LoadableScenes sceneToLoad, PopupMenu confirmPopup = null, Menu customMenu = null)
{
if (LoadManager.GetCurrentScene() != OWScene.SolarSystem && LoadManager.GetCurrentScene() != OWScene.EyeOfTheUniverse)
{
_console.WriteLine("Error - Cannot create pause button in this scene!", OWML.Common.MessageType.Error);
return null;
}

var menuRootObject = CreateBase(name, customMenu);

var submitActionLoadScene = menuRootObject.AddComponent<OWMLSubmitActionLoadScene>();
submitActionLoadScene.SetSceneToLoad(sceneToLoad);
submitActionLoadScene.EnableConfirm(confirmPopup != null);
submitActionLoadScene._confirmPopup = confirmPopup;
submitActionLoadScene._loadingText = menuRootObject.GetComponentInChildren<Text>();

menuRootObject.SetActive(true);
return menuRootObject;
}

private GameObject CreateBase(string name, Menu customMenu = null)
{
if (_pauseMenuItemsTemplate == null)
Expand Down

0 comments on commit 707198e

Please sign in to comment.