spacechase0 / StardewValleyMods

New home for my stardew valley mod source code
Other
120 stars 142 forks source link

[GMCM] #464

Open Digus opened 5 months ago

Digus commented 5 months ago

/// <summary>Add an image at the current position in the form.</summary> /// <param name="mod">The mod's manifest.</param> /// <param name="texture">The image texture to display.</param> /// <param name="texturePixelArea">The pixel area within the texture to display, or <c>null</c> to show the entire image.</param> /// <param name="scale">The zoom factor to apply to the image.</param> void AddImage(IManifest mod, Func<Texture2D> texture, Rectangle? texturePixelArea = null, int scale = Game1.pixelZoom);

Couldn't texturePixelArea also be a function? I wanted to show NPC sprites based on a input filed. The way it works I could load a different texture but can't change the frame since the Rectangle is fixed when the menu is created.