EMI

EMI

1M Downloads

Tooltips rendering behind items

pupnewfster opened this issue ยท 4 comments

commented

When in a Mekanism screen it seems that tooltips render behind the actual items
image

I believe this is related to us doing various transformations in order to have more vertical space available for our movable windows, and EMI using mixins rather than events for when renderForeground and renderBackground happen https://github.com/emilyploszaj/emi/blob/1.20.4/xplat/src/main/java/dev/emi/emi/mixin/HandledScreenMixin.java. I am not sure if the background mixin actually causes any issues, but moving NeoForge (and likely Forge) to using the following events instead would probably fix this issue:

  • ContainerScreenEvent.Render.Foreground
  • ScreenEvent.BackgroundRendered (I think this will work? maybe, I honestly don't really have experience with the screen level event vs the container screen one)

Version: 1.1.1+1.20.4

commented

Actually this is not the case. EmiAgnos.isForge returns true on Neo, so only the renderBackground call is coming from this mixin. That is only responsible for rendering the backgrounds of sidebar panels (like the grid and vanilla themes) which does not seem present in this screenshot. EMI on Neo uses the ContainerScreenEvents for foreground and background rendering as well as the ScreenEvent for foreground rendering for its tooltips. This means when mekanism's screens are triggering these events (automatically or manually) the matrix stack has just been setup in a way that puts stuff in the wrong spot.

As summary, EMI uses events both for rendering stacks in the sidebar and its tooltips.

As an inconsequential sidenote, before EMI used Forge/Neo events for this, the mixin based approach actually did work on mekanism screens, but for compatibility with certain mods it had to be moved away from.

commented

Hmm, I guess I will need to debug further what is going on then

commented
commented

The offending line was removed in the latest release