Class ExtendedButton

All Implemented Interfaces:
GuiEventListener, Renderable, NarratableEntry, NarrationSupplier
Direct Known Subclasses:
UnicodeGlyphButton

public class ExtendedButton extends Button
This class provides a button that fixes several bugs present in the vanilla GuiButton drawing code. The gist of it is that it allows buttons of any size without gaps in the graphics and with the borders drawn properly. It also prevents button text from extending out of the sides of the button by trimming the end of the string and adding an ellipsis.

The code that handles drawing the button is in GuiUtils.
Author:
bspkrs
  • Constructor Details

  • Method Details

    • renderButton

      public void renderButton(PoseStack poseStack, int mouseX, int mouseY, float partialTick)
      Draws this button to the screen.
      Overrides:
      renderButton in class AbstractWidget