Class GuiColourPicker
java.lang.Object
codechicken.lib.gui.modular.lib.geometry.ConstrainedGeometry<GuiManipulable>
codechicken.lib.gui.modular.elements.GuiElement<GuiManipulable>
codechicken.lib.gui.modular.elements.GuiManipulable
codechicken.lib.gui.modular.elements.GuiColourPicker
- All Implemented Interfaces:
ContentElement<GuiElement<?>>,ElementEvents,GuiParent<GuiManipulable>,TooltipHandler<GuiManipulable>
Created by brandon3055 on 17/11/2023
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classNested classes/interfaces inherited from class codechicken.lib.gui.modular.elements.GuiManipulable
GuiManipulable.PositionRestraint -
Field Summary
Fields inherited from class codechicken.lib.gui.modular.elements.GuiManipulable
maxSize, minSize, onMovedCallback, onResizedCallback, positionRestraint, xMax, xMin, yMax, yMinFields inherited from class codechicken.lib.gui.modular.elements.GuiElement
hoverTime, initialized -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcancel()voidclose()static GuiColourPickercreate(GuiParent<?> guiParent, ColourState colourState) static GuiColourPickercreate(GuiParent<?> guiParent, ColourState colourState, boolean hasAlpha) If cancel button is disabled, ok button will automatically resize.getState()static GuiColourPicker.SliderBGmakeSlider(GuiElement<?> background, int colour, SliderState state) booleanmouseClicked(double mouseX, double mouseY, int button, boolean consumed) Root handler for mouseClick event.setBlockOutsideClicks(boolean blockOutsideClicks) setCancelOnOutsideClick(boolean closeOnOutsideClick) setColourState(ColourState colourState) Methods inherited from class codechicken.lib.gui.modular.elements.GuiManipulable
addBottomHandle, addLeftHandle, addMoveHandle, addResizeHandles, addRightHandle, addTopHandle, constrain, enableCursors, getBottomHandle, getContentElement, getLeftHandle, getMaxSize, getMinSize, getMoveHandle, getRightHandle, getTopHandle, isMoving, isResizing, mouseMoved, mouseReleased, onMoved, onResized, onScreenInit, resetBounds, setBottomHandle, setLeftHandle, setMaxSize, setMinSize, setMoveHandle, setOnMovedCallback, setOnMovedCallback, setOnResizedCallback, setOnResizedCallback, setPositionRestraint, setResetOnUiInit, setRightHandle, setTopHandle, startDragging, tick, validatePositionMethods inherited from class codechicken.lib.gui.modular.elements.GuiElement
addChild, addJeiDropTargets, addJeiExclusions, adoptChild, applyQueuedChildUpdates, blockMouseEvents, blockMouseOver, bringChildToForeground, font, getChildren, getCombinedElementDepth, getJeiDropConsumer, getModularGui, getParent, getTooltip, getTooltipDelay, hoverTime, initElement, isDescendantOf, isEnabled, isJeiDropTarget, isJeiExcluded, isMouseOver, isOpaque, isRemoved, isTooltipEnabled, jeiExclude, mc, removeChild, render, renderChild, renderOverlay, scaledScreenHeight, scaledScreenWidth, sendChildToBackground, sendChildToIndex, setEnabled, setEnabled, setEnableToolTip, setJeiDropTarget, setJeiExcluded, setOpaque, setRenderCull, setTooltip, setTooltipDelay, setZStacking, showToolTip, toString, updateMouseOver, updateScreenData, zStackingMethods inherited from class codechicken.lib.gui.modular.lib.geometry.ConstrainedGeometry
addBoundsToRect, clearConstraints, clearGeometryCache, get, getChildBounds, getEnclosingRect, getParent, getPosition, getRectangle, placeInside, placeInside, placeOutside, placeOutside, setHeight, setPos, setSize, setWidth, setXPos, setYPos, strictMode, validate, xCenter, xMax, xMin, xSize, yCenter, yMax, yMin, ySizeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface codechicken.lib.gui.modular.lib.ElementEvents
charTyped, charTyped, keyPressed, keyPressed, keyReleased, keyReleased, mouseClicked, mouseReleased, mouseScrolled, mouseScrolledMethods inherited from interface codechicken.lib.gui.modular.lib.geometry.GuiParent
addChild, getValueMethods inherited from interface codechicken.lib.gui.modular.lib.TooltipHandler
renderTooltip, setTooltip, setTooltip, setTooltip, setTooltipSingle, setTooltipSingle
-
Constructor Details
-
GuiColourPicker
-
-
Method Details
-
create
-
create
public static GuiColourPicker create(GuiParent<?> guiParent, ColourState colourState, boolean hasAlpha) -
makeSlider
public static GuiColourPicker.SliderBG makeSlider(GuiElement<?> background, int colour, SliderState state) -
setBlockOutsideClicks
-
setCancelOnOutsideClick
-
mouseClicked
public boolean mouseClicked(double mouseX, double mouseY, int button, boolean consumed) Description copied from interface:ElementEventsRoot 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 viaElementEvents.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 positionmouseY- Mouse Y positionbutton- Mouse Buttonconsumed- 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
-
getState
-
sliderStateAlpha
-
sliderStateRed
-
sliderStateGreen
-
sliderStateBlue
-
getTextState
-
getOkButton
-
getCancelButton
If cancel button is disabled, ok button will automatically resize.
-