Class GuiColourPicker.SliderBG

All Implemented Interfaces:
BackgroundRender, ElementEvents, GuiParent<GuiColourPicker.SliderBG>, TooltipHandler<GuiColourPicker.SliderBG>
Enclosing class:
GuiColourPicker

public static class GuiColourPicker.SliderBG extends GuiElement<GuiColourPicker.SliderBG> implements BackgroundRender
  • Field Details

    • colour

      public int colour
    • highlight

      public int highlight
    • slider

      public GuiSlider slider
    • pressed

      public boolean pressed
  • Constructor Details

    • SliderBG

      public SliderBG(@NotNull @NotNull GuiParent<?> parent, int colour, int highlight)
  • Method Details

    • mouseClicked

      public boolean mouseClicked(double mouseX, double mouseY, int button, boolean consumed)
      Description copied from interface: ElementEvents
      Root handler for mouseClick event. This method will always be called for all elements even if the event has already been consumed. There are a few uses for this method, but the fast majority of mouseClick handling should be implemented via ElementEvents.mouseClicked(double, double, int)

      Note: If overriding this method, do so with caution, You must either return true (if you wish to consume the event) or you must return the result of the super call.

      Specified by:
      mouseClicked in interface ElementEvents
      Parameters:
      mouseX - Mouse X position
      mouseY - Mouse Y position
      button - Mouse Button
      consumed - Will be true if this action has already been consumed.
      Returns:
      true if this event has been consumed.
    • mouseReleased

      public boolean mouseReleased(double mouseX, double mouseY, int button, boolean consumed)
      Description copied from interface: ElementEvents
      Root handler for mouseReleased event. This method will always be called for all elements even if the event has already been consumed. There are a few uses for this method, but the fast majority of mouseReleased handling should be implemented via ElementEvents.mouseReleased(double, double, int)

      Note: If overriding this method, do so with caution, You must either return true (if you wish to consume the event) or you must return the result of the super call.

      Specified by:
      mouseReleased in interface ElementEvents
      Parameters:
      mouseX - Mouse X position
      mouseY - Mouse Y position
      button - Mouse Button
      consumed - Will be true if this action has already been consumed.
      Returns:
      true if this event has been consumed.
    • renderBackground

      public void renderBackground(GuiRender render, double mouseX, double mouseY, float partialTicks)
      Description copied from interface: BackgroundRender
      Used to render content behind this elements child elements. When rendering element content, always use the PoseStack available via the provided GuiRender Where applicable, always use push/pop to ensure the stack is returned to its original state after your rendering is complete.
      Specified by:
      renderBackground in interface BackgroundRender
      Parameters:
      render - Contains gui context information as well as essential render methods/utils including the PoseStack.