Class BasicButtonAddon

java.lang.Object
com.hrznstudio.titanium.client.screen.addon.BasicScreenAddon
com.hrznstudio.titanium.client.screen.addon.BasicButtonAddon
All Implemented Interfaces:
IScreenAddon, net.minecraft.client.gui.components.events.GuiEventListener, net.minecraft.client.gui.components.TabOrderedElement
Direct Known Subclasses:
ArrowButtonScreenAddon, StateButtonAddon

public class BasicButtonAddon extends BasicScreenAddon
  • Constructor Details

    • BasicButtonAddon

      public BasicButtonAddon(ButtonComponent buttonComponent)
  • Method Details

    • drawBackgroundLayer

      public void drawBackgroundLayer(net.minecraft.client.gui.GuiGraphics guiGraphics, net.minecraft.client.gui.screens.Screen screen, IAssetProvider provider, int guiX, int guiY, int mouseX, int mouseY, float partialTicks)
      Description copied from interface: IScreenAddon
      Draws the component in the background layer
      screen - The current open screen
      provider - The current asset provider used in the GUI
      guiX - The gui X in the top left corner
      guiY - The gui Y in the top left corner
      mouseX - The current mouse X
      mouseY - The current mouse Y
      partialTicks - Partial ticks
    • drawForegroundLayer

      public void drawForegroundLayer(net.minecraft.client.gui.GuiGraphics guiGraphics, net.minecraft.client.gui.screens.Screen screen, IAssetProvider provider, int guiX, int guiY, int mouseX, int mouseY, float partialTicks)
      Description copied from interface: IScreenAddon
      Draws the component in the foreground layer
      screen - The current open screen
      provider - The current asset provider used in the GUI
      guiX - The gui X in the top left corner
      guiY - The gui Y in the top left corner
      mouseX - The current mouse X
      mouseY - The current mouse Y
      partialTicks - Partial Ticks
    • getTooltipLines

      public List<net.minecraft.network.chat.Component> getTooltipLines()
      Description copied from interface: IScreenAddon
      A list of strings that will be drawn as a tooltip when `isInside` returns true
      Returns:
      Returns a list of tooltip lines represented as Component's
    • mouseClicked

      public boolean mouseClicked(double mouseX, double mouseY, int button)
      Description copied from interface: IScreenAddon
      Called when a mouse button is clicked
      Parameters:
      mouseX - The mouse X coordinate where it was clicked
      mouseY - The mouse Y coordinate where it was clicked
      button - The Id of the button that was clicked
      Returns:
      Returns whether the mouse was clicked successfully or not
    • getXSize

      public int getXSize()
      Specified by:
      getXSize in class BasicScreenAddon
    • getYSize

      public int getYSize()
      Specified by:
      getYSize in class BasicScreenAddon
    • getButton

      public ButtonComponent getButton()