Class ExtendedButton

All Implemented Interfaces:
GuiEventListener, Renderable, TabOrderedElement, LayoutElement, NarratableEntry, NarrationSupplier

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.
  • Constructor Details

  • Method Details

    • renderWidget

      public void renderWidget(GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTick)
      Draws this button to the screen.
      Overrides:
      renderWidget in class AbstractButton