add asset propagation for DayTimeMoneyBox buttons

This commit is contained in:
Jesse Plamondon-Willard 2019-07-14 14:55:31 -04:00
parent 4f7d861ce4
commit 1053232c20
No known key found for this signature in database
GPG Key ID: CF8B1456B3E29F49
2 changed files with 6 additions and 1 deletions

View File

@ -29,7 +29,7 @@ These changes have not been released yet.
* Added support for content pack translations. * Added support for content pack translations.
* Added fields and methods: `IContentPack.HasFile`, `Context.IsGameLaunched`, and `SemanticVersion.TryParse`. * Added fields and methods: `IContentPack.HasFile`, `Context.IsGameLaunched`, and `SemanticVersion.TryParse`.
* Added separate `LogNetworkTraffic` option to make verbose logging less overwhelmingly verbose. * Added separate `LogNetworkTraffic` option to make verbose logging less overwhelmingly verbose.
* Added asset propagation for critter textures. * Added asset propagation for critter textures and `DayTimeMoneyBox` buttons.
* The installer now recognises custom game paths stored in `stardewvalley.targets`, if any. * The installer now recognises custom game paths stored in `stardewvalley.targets`, if any.
* When a mod is incompatible, the trace logs now list all detected issues instead of the first one. * When a mod is incompatible, the trace logs now list all detected issues instead of the first one.
* Removed all deprecated APIs. * Removed all deprecated APIs.

View File

@ -293,6 +293,11 @@ namespace StardewModdingAPI.Metadata
case "loosesprites\\cursors": // Game1.LoadContent case "loosesprites\\cursors": // Game1.LoadContent
Game1.mouseCursors = content.Load<Texture2D>(key); Game1.mouseCursors = content.Load<Texture2D>(key);
foreach (DayTimeMoneyBox menu in Game1.onScreenMenus.OfType<DayTimeMoneyBox>())
{
foreach (ClickableTextureComponent button in new[] { menu.questButton, menu.zoomInButton, menu.zoomOutButton })
button.texture = Game1.mouseCursors;
}
return true; return true;
case "loosesprites\\daybg": // Game1.LoadContent case "loosesprites\\daybg": // Game1.LoadContent