From 2cd19042c9942fbc758ef5ed5e4f7bc2d46134d2 Mon Sep 17 00:00:00 2001 From: yangzhi <@4F!xZpJwly&KbWq> Date: Thu, 13 Feb 2020 15:29:50 +0800 Subject: [PATCH] Fix bug of MenuChanged Event --- src/SMAPI/Framework/SGame.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SMAPI/Framework/SGame.cs b/src/SMAPI/Framework/SGame.cs index 265e4348..6208fe2c 100644 --- a/src/SMAPI/Framework/SGame.cs +++ b/src/SMAPI/Framework/SGame.cs @@ -692,8 +692,8 @@ namespace StardewModdingAPI.Framework *********/ if (state.ActiveMenu.IsChanged) { - IClickableMenu was = this.Watchers.ActiveMenuWatcher.PreviousValue; - IClickableMenu now = this.Watchers.ActiveMenuWatcher.CurrentValue; + IClickableMenu was = state.ActiveMenu.Old; + IClickableMenu now = state.ActiveMenu.New; 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);