PneumaticCraft: Repressurized

PneumaticCraft: Repressurized

50M Downloads

Buttons on remotes always render with even widths

ThizThizzyDizzy opened this issue ยท 1 comments

commented

Minecraft version 1.12.2

Minecraft forge 14.23.5.2838

Mod version 1.12.2-0.11.3-366

image
When buttons are given an odd number for their width, they render one pixel shorter.

Steps to reproduce:

  1. Create a remote control
  2. Add a button to the GUI
  3. Set the width to 51
  4. Note how the button did not increase in size, though the click detection area did.
commented

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.