Hi you guys,
I'm new to modding for Stardew Valley (and C# for that matter), but I managed to create a nice little mod that adds "sparkles" to recipes I haven't crafted yet:
However the sparkles are drawn over the tooltips that appear when the mouse hovers over an item. I want to draw them below the tooltips (and to be precise above the menu itself).
The sprite is drawn in IModHelper#Events.Display.RenderedActiveMenu via
spriteBatch.Draw(sparkleImage, targetRect, null, Color.White, 0, new Vector2(0, 0), SpriteEffects.None, 0);
I believe the last argument, layerDepth, is what should be used to draw the image in a specific layer. However it appears to me that both the main menu and the popups are drawn on layer 0. Is that correct? If so, is there a minimally invasive way to change either the popups or the menu to be drawn another layer? If it's not correct, what is the right way to do this?
(Also, as a bonus question: how do I trigger a rerendering of the screen?)
Thanks for your help!