Fix bug of MenuChanged Event
This commit is contained in:
parent
528c7459d0
commit
2cd19042c9
|
@ -692,8 +692,8 @@ namespace StardewModdingAPI.Framework
|
||||||
*********/
|
*********/
|
||||||
if (state.ActiveMenu.IsChanged)
|
if (state.ActiveMenu.IsChanged)
|
||||||
{
|
{
|
||||||
IClickableMenu was = this.Watchers.ActiveMenuWatcher.PreviousValue;
|
IClickableMenu was = state.ActiveMenu.Old;
|
||||||
IClickableMenu now = this.Watchers.ActiveMenuWatcher.CurrentValue;
|
IClickableMenu now = state.ActiveMenu.New;
|
||||||
|
|
||||||
if (this.Monitor.IsVerbose)
|
if (this.Monitor.IsVerbose)
|
||||||
this.Monitor.Log($"Context: menu changed from {state.ActiveMenu.Old?.GetType().FullName ?? "none"} to {state.ActiveMenu.New?.GetType().FullName ?? "none"}.", LogLevel.Trace);
|
this.Monitor.Log($"Context: menu changed from {state.ActiveMenu.Old?.GetType().FullName ?? "none"} to {state.ActiveMenu.New?.GetType().FullName ?? "none"}.", LogLevel.Trace);
|
||||||
|
|
Loading…
Reference in New Issue