public class ColorPickerAddon extends BasicScreenAddon implements IClickable, ICanMouseDrag
| Constructor and Description |
|---|
ColorPickerAddon(int posX,
int posY,
int color,
java.util.function.Consumer<java.lang.Integer> colorConsumer) |
| Modifier and Type | Method and Description |
|---|---|
void |
drag(int x,
int y) |
void |
drawBackgroundLayer(com.mojang.blaze3d.matrix.MatrixStack stack,
net.minecraft.client.gui.screen.Screen screen,
IAssetProvider provider,
int guiX,
int guiY,
int mouseX,
int mouseY,
float partialTicks)
Draws the component in the background layer
|
void |
drawForegroundLayer(com.mojang.blaze3d.matrix.MatrixStack stack,
net.minecraft.client.gui.screen.Screen screen,
IAssetProvider provider,
int guiX,
int guiY,
int mouseX,
int mouseY)
Draws the component in the foreground layer
|
int |
getXSize() |
int |
getYSize() |
void |
handleClick(net.minecraft.client.gui.screen.Screen screen,
int guiX,
int guiY,
double mouseX,
double mouseY,
int button) |
void |
setColor(int color) |
getPosX, getPosY, isInside, setPosX, setPosYclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetTooltipLines, init, isBackground, keyPressedpublic ColorPickerAddon(int posX,
int posY,
int color,
java.util.function.Consumer<java.lang.Integer> colorConsumer)
public int getXSize()
getXSize in class BasicScreenAddonpublic int getYSize()
getYSize in class BasicScreenAddonpublic void drawBackgroundLayer(com.mojang.blaze3d.matrix.MatrixStack stack,
net.minecraft.client.gui.screen.Screen screen,
IAssetProvider provider,
int guiX,
int guiY,
int mouseX,
int mouseY,
float partialTicks)
IScreenAddondrawBackgroundLayer in interface IScreenAddonscreen - The current open screenprovider - The current asset provider used in the GUIguiX - The gui X in the top left cornerguiY - The gui Y in the top left cornermouseX - The current mouse XmouseY - The current mouse YpartialTicks - Partial tickspublic void drawForegroundLayer(com.mojang.blaze3d.matrix.MatrixStack stack,
net.minecraft.client.gui.screen.Screen screen,
IAssetProvider provider,
int guiX,
int guiY,
int mouseX,
int mouseY)
IScreenAddondrawForegroundLayer in interface IScreenAddonscreen - The current open screenprovider - The current asset provider used in the GUIguiX - The gui X in the top left cornerguiY - The gui Y in the top left cornermouseX - The current mouse XmouseY - The current mouse Ypublic void handleClick(net.minecraft.client.gui.screen.Screen screen,
int guiX,
int guiY,
double mouseX,
double mouseY,
int button)
handleClick in interface IClickablepublic void drag(int x,
int y)
drag in interface ICanMouseDragpublic void setColor(int color)