Class GuiColourPicker

All Implemented Interfaces:
ContentElement<GuiElement<?>>, ElementEvents, GuiParent<GuiManipulable>, TooltipHandler<GuiManipulable>

public class GuiColourPicker extends GuiManipulable
Created by brandon3055 on 17/11/2023
  • Constructor Details

    • GuiColourPicker

      public GuiColourPicker(@NotNull @NotNull GuiParent<?> parent, Colour initialColour)
  • Method Details

    • create

      public static GuiColourPicker create(GuiParent<?> guiParent, ColourState colourState)
    • create

      public static GuiColourPicker create(GuiParent<?> guiParent, ColourState colourState, boolean hasAlpha)
    • makeSlider

      public static GuiColourPicker.SliderBG makeSlider(GuiElement<?> background, int colour, SliderState state)
    • setBlockOutsideClicks

      public GuiColourPicker setBlockOutsideClicks(boolean blockOutsideClicks)
    • setCancelOnOutsideClick

      public GuiColourPicker setCancelOnOutsideClick(boolean closeOnOutsideClick)
    • 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.

      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.
    • cancel

      public void cancel()
    • close

      public void close()
    • setColourState

      public GuiColourPicker setColourState(ColourState colourState)
    • getState

      public ColourState getState()
    • sliderStateAlpha

      public SliderState sliderStateAlpha()
    • sliderStateRed

      public SliderState sliderStateRed()
    • sliderStateGreen

      public SliderState sliderStateGreen()
    • sliderStateBlue

      public SliderState sliderStateBlue()
    • getTextState

      public TextState getTextState()
    • getOkButton

      public GuiButton getOkButton()
    • getCancelButton

      public GuiButton getCancelButton()
      If cancel button is disabled, ok button will automatically resize.