Buttons on remotes always render with even widths
ThizThizzyDizzy opened this issue ยท 1 comments
Minecraft version 1.12.2
Minecraft forge 14.23.5.2838
Mod version 1.12.2-0.11.3-366
When buttons are given an odd number for their width, they render one pixel shorter.
Steps to reproduce:
- Create a remote control
- Add a button to the GUI
- Set the width to 51
- Note how the button did not increase in size, though the click detection area did.
This is actually a vanilla "feature": the GuiButton#render()
method does some integer division on the integer width, so odd sizes are always going to end up truncated by a pixel. (It does this because it splits the button texture in two and draws both halves separately to allow for variable widths).
Nothing I can do about this one, sorry.