summaryrefslogtreecommitdiff
path: root/src/SMAPI/Utilities/PerScreen.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2023-02-18 15:09:18 -0500
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2023-04-02 15:31:15 -0400
commit7b5566d0751bec14c5bf93b727fa66e7c58fbf00 (patch)
tree8fd4c7a2a972e7025ab15b8e00c01c4d74c63c52 /src/SMAPI/Utilities/PerScreen.cs
parent7f7561469fd74d461b8dc4a1e934eed98d2c808b (diff)
downloadSMAPI-7b5566d0751bec14c5bf93b727fa66e7c58fbf00.tar.gz
SMAPI-7b5566d0751bec14c5bf93b727fa66e7c58fbf00.tar.bz2
SMAPI-7b5566d0751bec14c5bf93b727fa66e7c58fbf00.zip
add PerScreen.IsActiveForScreen()
Diffstat (limited to 'src/SMAPI/Utilities/PerScreen.cs')
-rw-r--r--src/SMAPI/Utilities/PerScreen.cs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/SMAPI/Utilities/PerScreen.cs b/src/SMAPI/Utilities/PerScreen.cs
index 87bf2027..674ec760 100644
--- a/src/SMAPI/Utilities/PerScreen.cs
+++ b/src/SMAPI/Utilities/PerScreen.cs
@@ -101,6 +101,12 @@ namespace StardewModdingAPI.Utilities
this.RemoveScreens(_ => true);
}
+ /// <summary>Get whether the current screen has a value created yet.</summary>
+ public bool IsActiveForScreen()
+ {
+ return this.States.ContainsKey(Context.ScreenId);
+ }
+
/*********
** Private methods