[ModUpdateMenu] Use ThemeManager for loading UI Assets #26
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces my ThemeManager class to
ModUpdateMenu
and uses it to load texture assets. You're probably wondering why this is a good thing. To summarize,ThemeManager
:To expand on "no effort on the part of the user", traditionally installing a user interface theme for Stardew Valley requires the user to copy files from the theme into other mods' folders. While not particularly taxing, it's still a point of frustration for users. Content Patcher does not support modifying mod assets, so it cannot be used.
ThemeManager
is designed to correct that problem. No file copying is required, and everything will just work seamlessly once both mod and theme are updated to support each other.Thank you for your time reading and considering this,
~ Khloe
Regarding Stardew Valley 1.6 and SMAPI 4.0
As you may know, the upcoming Stardew Valley 1.6 release and companion SMAPI 4.0 release introduce a replacement for
IAssetLoader
, theAssetRequested
event. This is already supported byThemeManager
, but requires an update.All you would have to do, as a mod author, to update
ThemeManager
is download the latest version from the main-4 branch on GitHub and replace your copy ofThemeManager.cs