Class ShadePickerAddon

java.lang.Object
com.hrznstudio.titanium.client.screen.addon.BasicScreenAddon
com.hrznstudio.titanium.client.screen.addon.color.ShadePickerAddon
All Implemented Interfaces:
IScreenAddon, net.minecraft.client.gui.components.events.GuiEventListener, net.minecraft.client.gui.components.TabOrderedElement

public class ShadePickerAddon extends BasicScreenAddon
  • Constructor Details

    • ShadePickerAddon

      public ShadePickerAddon(int posX, int posY, float brightness, float saturation, Supplier<Float> hueSupplier, Consumer<Float> brightnessConsumer, Consumer<Float> saturationConsumer)
  • 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(net.minecraft.client.gui.GuiGraphics 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
      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 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 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
    • mouseDragged

      public boolean mouseDragged(double mouseX, double mouseY, int button, double dragX, double dragY)
      Description copied from interface: IScreenAddon
      Called when the mouse is pressed and dragged
      Parameters:
      mouseX - The X coordinate of the mouse where the drag was initiated
      mouseY - The Y coordinate of the mouse where the drag was initiated
      button - The Id of the Button that was pressed
      dragX - The X coordinate of the mouse where the drag was finished
      dragY - The Y coordinate of the mouse where the drag was finished
      Returns:
      Returns true if the drag was handled
    • 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
    • setBrightness

      public void setBrightness(float brightness)
    • setSaturation

      public void setSaturation(float saturation)