Class ShadePickerAddon

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

public class ShadePickerAddon extends BasicScreenAddon implements IClickable, ICanMouseDrag
  • 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​(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
    • drag

      public void drag​(int x, int y)
      Specified by:
      drag in interface ICanMouseDrag
    • 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
    • setBrightness

      public void setBrightness​(float brightness)
    • setSaturation

      public void setSaturation​(float saturation)