JavidPack / RecipeBrowser

RecipeBrowser mod for tModLoader
https://forums.terraria.org/index.php?threads/recipe-browser.62462/
79 stars 49 forks source link

Favorite recipes panel is on top of recipe browser even though it is drawn beneath #118

Open VSMent opened 9 months ago

VSMent commented 9 months ago

When I overlap recipe browser panel and favorite recipes panel, recipe browser is drawn on top of favorite recipes. But mouse ignores recipe browser as if it is underneath favorite recipes panel.

20231125004907_1 20231125005406_1

It would be awesome to move panels up when focused, but for now consistency between image and interactivity would be great as well.

VSMent commented 9 months ago

Both recipe browser (which has solid background color) and favorite recipes panel (transparent background) allow click through them on other UI elements.

I do not know if that was intentional but is a bit unexpected when panels overlap with inventory, crafting menu or other UI elements. They are drawn above, but do not capture click.

JavidPack commented 9 months ago

This is a limitation of the UI logic in Terraria. It wasn't designed to handle overlap. There have been ideas about how to fix it in tModLoader, but it is still being thought through.

Basically, UI windows are drawn and updated in order, so the first window sees that something is hovering and sets the tooltip, then the 2nd window draws over the 1st.

There is a way I can work around the issue for within Recipe Browser I think, but that wouldn't fix the issue with other mods and Terraria UI behaving as they do. It'll require work done on tmodloader itself to work correctly.