java.lang.Object
net.minecraft.client.gui.DrawableHelper
net.minecraft.client.gui.widgets.Button
net.glasslauncher.mods.api.gcapi.screen.widget.FancyButton
All Implemented Interfaces:
HasDrawable, HasToolTip

public class FancyButton extends net.minecraft.client.gui.widgets.Button implements HasDrawable, HasToolTip
  • Field Summary

    Fields inherited from class net.minecraft.client.gui.widgets.Button

    active, height, id, text, visible, width, x, y

    Fields inherited from class net.minecraft.client.gui.DrawableHelper

    zOffset
  • Constructor Summary

    Constructors
    Constructor
    Description
    FancyButton(int id, int x, int y, int width, int height, String text)
     
    FancyButton(int id, int x, int y, int width, int height, String text, int overriddenColour)
     
    FancyButton(int id, int x, int y, String text)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    draw(int mouseX, int mouseY)
     
    The tooltip to show, can be multiline by adding another element onto the list.
    int[]
    The position and size of your element.
    void
    keyPressed(char character, int key)
     
    void
    mouseClicked(int mouseX, int mouseY, int button)
     
    void
    render(net.minecraft.client.Minecraft minecraft, int mouseX, int mouseY)
     
    void
    setID(int id)
     
    void
    setXYWH(int x, int y, int width, int height)
     
    void
     

    Methods inherited from class net.minecraft.client.gui.widgets.Button

    getYImage, isMouseOver, mouseReleased, postRender

    Methods inherited from class net.minecraft.client.gui.DrawableHelper

    blit, drawLineHorizontal, drawLineVertical, drawTextWithShadow, drawTextWithShadowCentred, fill, fillGradient

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • FancyButton

      public FancyButton(int id, int x, int y, int width, int height, String text, int overriddenColour)
    • FancyButton

      public FancyButton(int id, int x, int y, int width, int height, String text)
    • FancyButton

      public FancyButton(int id, int x, int y, String text)
  • Method Details

    • setXYWH

      public void setXYWH(int x, int y, int width, int height)
      Specified by:
      setXYWH in interface HasDrawable
    • tick

      public void tick()
      Specified by:
      tick in interface HasDrawable
    • keyPressed

      public void keyPressed(char character, int key)
      Specified by:
      keyPressed in interface HasDrawable
    • draw

      public void draw(int mouseX, int mouseY)
      Specified by:
      draw in interface HasDrawable
    • render

      public void render(net.minecraft.client.Minecraft minecraft, int mouseX, int mouseY)
      Overrides:
      render in class net.minecraft.client.gui.widgets.Button
    • mouseClicked

      public void mouseClicked(int mouseX, int mouseY, int button)
      Specified by:
      mouseClicked in interface HasDrawable
    • setID

      public void setID(int id)
      Specified by:
      setID in interface HasDrawable
    • getTooltip

      public List<String> getTooltip()
      Description copied from interface: HasToolTip
      The tooltip to show, can be multiline by adding another element onto the list.
      Specified by:
      getTooltip in interface HasToolTip
      Returns:
      a List of colour-enabled strings to use as a tooltip.
    • getXYWH

      public int[] getXYWH()
      Description copied from interface: HasToolTip
      The position and size of your element. Required.
      Specified by:
      getXYWH in interface HasToolTip
      Returns:
      a 4 length array of ints, the X position, Y position, width and height of your element.