Fixed for new beta.

This commit is contained in:
cdaragorn 2018-05-07 20:26:37 -06:00
parent 007452cf88
commit 43b6dfeabf
3 changed files with 5 additions and 7 deletions

View File

@ -116,11 +116,10 @@ namespace UIInfoSuite.Options
private void RemoveModOptionsFromMenu(object sender, EventArgsClickableMenuClosed e)
{
GraphicsEvents.OnPostRenderGuiEvent -= DrawButton;
_modOptionsPageButton.OnLeftClicked -= OnButtonLeftClicked;
if (Game1.activeClickableMenu is GameMenu)
{
GraphicsEvents.OnPostRenderGuiEvent -= DrawButton;
_modOptionsPageButton.OnLeftClicked -= OnButtonLeftClicked;
List<IClickableMenu> tabPages = _helper.Reflection.GetField<List<IClickableMenu>>(Game1.activeClickableMenu, "pages").GetValue();
tabPages.Remove(_modOptionsPage);
}
@ -135,7 +134,6 @@ namespace UIInfoSuite.Options
_modOptionsPage = new ModOptionsPage(_optionsElements);
_modOptionsPageButton = new ModOptionsPageButton();
}
GraphicsEvents.OnPostRenderGuiEvent -= DrawButton;
GraphicsEvents.OnPostRenderGuiEvent += DrawButton;
_modOptionsPageButton.OnLeftClicked += OnButtonLeftClicked;
List<IClickableMenu> tabPages = _helper.Reflection.GetField<List<IClickableMenu>>(Game1.activeClickableMenu, "pages").GetValue();

View File

@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.7.1.0")]
[assembly: AssemblyFileVersion("1.7.1.0")]
[assembly: AssemblyVersion("1.7.2.0")]
[assembly: AssemblyFileVersion("1.7.2.0")]

View File

@ -5,6 +5,6 @@
"Description": "Adds a lot of useful information to the user interface. This is based on Demiacle's excellent UIModSuite.",
"UniqueID": "Cdaragorn.UiInfoSuite",
"EntryDll": "UIInfoSuite.dll",
"MinimumApiVersion" : "2.0",
"MinimumApiVersion" : "2.6-beta",
"UpdateKeys": [ "Nexus:1150" ]
}