Class ExtendedButton

  • All Implemented Interfaces:
    IGuiEventListener, IRenderable
    Direct Known Subclasses:
    Slider, 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 Detail

    • Method Detail

      • renderButton

        public void renderButton​(MatrixStack mStack,
                                 int mouseX,
                                 int mouseY,
                                 float partial)
        Draws this button to the screen.
        Overrides:
        renderButton in class Button