Justenoughitems: Move JEI to left side?

Created on 25 Mar 2016  Â·  5Comments  Â·  Source: mezz/JustEnoughItems

Is it possible to move JEI to the left side? I was able to move it by changing the calculation of this:

        final int leftEdge = guiProperties.getGuiLeft() - xSize - (xEmptySpace / 2);
        final int rightEdge = leftEdge + xSize;

But after it's on the left the buttons are unclickable and don't do anything. I assume there's some sort of Z-index that's making the click events go to the main UI or something?

question

Most helpful comment

ctrl+o enables disables JEI, and there is a api thing to have it wrap around your buttons. RFTools already does that.

All 5 comments

What is the reason you want to move JEI to the left side of the screen?

I looked into this more, the problem was other mods like Buildcraft and
InventoryTweaks (depending on the size of the chest) have UI elements that
overlap on the right side, and it becomes impossible to click them. I also
realize now that the left side of the screen has the Status Effects area
which would get hidden by JEI if I placed the UI there.

I assume this is an unsolved problem with conflicting mods competing for UI
space and no standard UI manager for things in Forge (unless you can point
me to something) so I ended up forking a couple mods to position the UI
exactly where I wanted. In JEI case I actually made it only 1/3 of the size
of the left screen, so that the other things aren't overridden.

Other options would be a toggle able button to hide and show the UI, I
thought about implementing this, but that adds friction. In the future, do
you have any recommendations for combatting this problem?
On Sat, Mar 26, 2016 at 18:50 Girafi [email protected] wrote:

What is the reason you want to move JEI to the left side of the screen?

—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
https://github.com/mezz/JustEnoughItems/issues/223#issuecomment-201905194

ctrl+o enables disables JEI, and there is a api thing to have it wrap around your buttons. RFTools already does that.

Someone can make a PR to BuildcraftCompat and InventoryTweaks to fix this.
Just get the latest JEI with gradle (see readme for JEI) and then implement an IAdvancedGuiHandler. Here's the implementation for McJty's mods, it's very simple:
https://github.com/mezz/McJtyLib/commit/7bce309a2bf1412184122c3d35fbd35f0bd597ba
You basically just give JEI a list of Rectangles that define the extra gui areas, and JEI will move out of the way of those.

Thanks! Didn't realize this api existed. Unsure if I'll get the time for that, but this answers my question so closing out for now.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

TeamDman picture TeamDman  Â·  5Comments

qwerwastaken picture qwerwastaken  Â·  5Comments

MeinKraft picture MeinKraft  Â·  6Comments

gendalv picture gendalv  Â·  4Comments

MysticAura picture MysticAura  Â·  4Comments