Just Enough Items (JEI)

Just Enough Items (JEI)

392M Downloads

Add support for buttons with larger than 2x2 px edges

Grapz opened this issue ยท 1 comments

commented

Edit: Apologies for the "do" in the title. I initially wrote something like "Buttons do not scale properly", but upon closer examination it seems like they do, but it's rather a design limitation. Whether intentional or not, I am not certain.

I was making an add-on for a resource pack to enable it to use JEI, and came across this.

2020-11-26_16 27 16

Notice the buttons on the page selection, and recipe type selection. These do not scale properly. For reference, this is button_enabled in the resource pack I am making:

button_enabled

As everything aligns itself with the lower left hand corner of the sprite, repeating the central 14x14 pixels of the sprite as needed, until 2 pixels away from the edge of the button. Then, it simply uses the outer 2 pixels for edging. This ends up breaking any sort of edging that the texture may use.

This works fine - technically - with the default textures for buttons, it does make texturing very annoying. A 2px edge is not a lot to work with. Any kind of detailing with that res is either incredibly simplistic or nigh impossible to do.

As the smallest button size in the UI - to my knowledge - is 13x13, this 2 px edge restriction seems unnecessary. It would be nice to see this be raised to a 4 or larger edge. Again, unless I am wrong - the smallest button is 13x13, so you could logically use the outer 6 px just fine.

commented

Thanks for the suggestion! I didn't design this with that type of texture in mind, but the system I have makes it easy to support with a small change.
I have added support for 6px on the buttons and the search bar.