Class ColorPickerScreen
java.lang.Object
net.minecraft.client.gui.components.events.AbstractContainerEventHandler
net.minecraft.client.gui.screens.Screen
net.ixdarklord.coolcatcanvas.internal.client.gui.style.StyledPopup
net.ixdarklord.coolcatcore.internal.config.client.gui.ColorPickerScreen
- All Implemented Interfaces:
net.minecraft.client.gui.components.events.ContainerEventHandler, net.minecraft.client.gui.components.events.GuiEventListener, net.minecraft.client.gui.components.Renderable, net.minecraft.client.gui.components.TabOrderedElement
An HSV color picker in a popup over the screen it was opened from: a saturation/brightness square, a hue bar, an
alpha bar (for colors with alpha), a hex field, the 16 dye colors, and the old and new color side by side, with
Cancel and Done in the footer below them. "Done" hands the ARGB color to the callback.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.client.gui.screens.Screen
net.minecraft.client.gui.screens.Screen.NarratableSearchResult -
Field Summary
Fields inherited from class StyledPopup
FOOTER, PADDING, panelHeight, panelWidth, panelX, panelY, parent, theme, TITLE_HEIGHTFields inherited from class net.minecraft.client.gui.screens.Screen
FADE_IN_TIME, font, FOOTER_SEPARATOR, HEADER_SEPARATOR, height, INWORLD_FOOTER_SEPARATOR, INWORLD_HEADER_SEPARATOR, MENU_BACKGROUND, minecraft, narratorButton, screenExecutor, title, width -
Constructor Summary
ConstructorsConstructorDescriptionColorPickerScreen(@Nullable net.minecraft.client.gui.screens.Screen parent, net.minecraft.network.chat.Component title, int color, boolean alpha, IntConsumer onDone) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidextractPopup(net.minecraft.client.gui.GuiGraphicsExtractor graphics, int mouseX, int mouseY, float a) Draws fixed content inside the panel, under the widgets.protected voidMethods inherited from class StyledPopup
added, contentBottom, contentLeft, contentTop, contentWidth, extractBackground, extractRenderState, footerButtonY, footerTop, init, isPauseScreen, mouseClicked, onClose, overlayParent, removed, repositionElements, resize, setPanel, titleIcon, titleNoteMethods inherited from class net.minecraft.client.gui.screens.Screen
addRenderableOnly, addRenderableWidget, addWidget, afterKeyboardAction, afterMouseAction, afterMouseMove, canInterruptWithAnotherScreen, changeFocus, children, clearFocus, clearWidgets, clickCommandAction, clickUrlAction, defaultHandleClickEvent, defaultHandleGameClickEvent, extractBlurredBackground, extractMenuBackground, extractMenuBackground, extractMenuBackgroundTexture, extractPanorama, extractRenderStateWithTooltipAndSubtitles, extractTransparentBackground, fadeWidgets, fillCrashDetails, findNarratableWidget, getBackgroundMusic, getFont, getNarrationMessage, getRectangle, getTitle, getTooltipFromItem, getUsageNarration, handleDelayedNarration, init, insertText, isAllowedInPortal, isInGameUi, isMouseOver, isValidCharacterForName, keyPressed, onFilesDrop, panoramaShouldSpin, rebuildWidgets, removeWidget, setInitialFocus, setInitialFocus, shouldCloseOnEsc, shouldNarrateNavigation, showsActiveEffects, tick, triggerImmediateNarration, updateNarratedWidget, updateNarrationState, updateNarratorStatusMethods inherited from class net.minecraft.client.gui.components.events.AbstractContainerEventHandler
getFocused, isDragging, setDragging, setFocusedMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.components.events.ContainerEventHandler
charTyped, getBorderForArrowNavigation, getChildAt, getCurrentFocusPath, isFocused, keyReleased, mouseDragged, mouseReleased, mouseScrolled, nextFocusPath, preeditUpdated, setFocusedMethods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
mouseMoved, shouldTakeFocusAfterInteractionMethods inherited from interface net.minecraft.client.gui.components.TabOrderedElement
getTabOrderGroup
-
Constructor Details
-
ColorPickerScreen
public ColorPickerScreen(@Nullable @Nullable net.minecraft.client.gui.screens.Screen parent, net.minecraft.network.chat.Component title, int color, boolean alpha, IntConsumer onDone)
-
-
Method Details
-
initPopup
protected void initPopup()- Specified by:
initPopupin classStyledPopup
-
extractPopup
protected void extractPopup(net.minecraft.client.gui.GuiGraphicsExtractor graphics, int mouseX, int mouseY, float a) Description copied from class:StyledPopupDraws fixed content inside the panel, under the widgets.- Overrides:
extractPopupin classStyledPopup
-