Class ColorPickerAddon

java.lang.Object
com.hrznstudio.titanium.client.screen.addon.BasicScreenAddon
com.hrznstudio.titanium.client.screen.addon.color.ColorPickerAddon
All Implemented Interfaces:
IScreenAddon, ICanMouseDrag, IClickable

public class ColorPickerAddon extends BasicScreenAddon implements IClickable, ICanMouseDrag
  • Constructor Details

    • ColorPickerAddon

      public ColorPickerAddon​(int posX, int posY, int color, Consumer<Integer> colorConsumer)
  • Method Details

    • getXSize

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

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

      public void drawBackgroundLayer​(com.mojang.blaze3d.vertex.PoseStack stack, 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
      Specified by:
      drawBackgroundLayer in interface IScreenAddon
      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​(com.mojang.blaze3d.vertex.PoseStack stack, net.minecraft.client.gui.screens.Screen screen, IAssetProvider provider, int guiX, int guiY, int mouseX, int mouseY)
      Description copied from interface: IScreenAddon
      Draws the component in the foreground layer
      Specified by:
      drawForegroundLayer in interface IScreenAddon
      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
    • handleClick

      public void handleClick​(net.minecraft.client.gui.screens.Screen screen, int guiX, int guiY, double mouseX, double mouseY, int button)
      Specified by:
      handleClick in interface IClickable
    • drag

      public void drag​(int x, int y)
      Specified by:
      drag in interface ICanMouseDrag
    • setColor

      public void setColor​(int color)