Class HuePickerAddon
java.lang.Object
com.hrznstudio.titanium.client.screen.addon.BasicScreenAddon
com.hrznstudio.titanium.client.screen.addon.color.HuePickerAddon
- All Implemented Interfaces:
IScreenAddon,net.minecraft.client.gui.components.events.GuiEventListener,net.minecraft.client.gui.components.TabOrderedElement
-
Field Summary
Fields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedHuePickerAddon(int posX, int posY, float hue, Consumer<Float> consumer) -
Method Summary
Modifier and TypeMethodDescriptionvoiddrawBackgroundLayer(net.minecraft.client.gui.GuiGraphics guiGraphics, net.minecraft.client.gui.screens.Screen screen, IAssetProvider provider, int guiX, int guiY, int mouseX, int mouseY, float partialTicks) Draws the component in the background layervoiddrawForegroundLayer(net.minecraft.client.gui.GuiGraphics stack, net.minecraft.client.gui.screens.Screen screen, IAssetProvider provider, int guiX, int guiY, int mouseX, int mouseY, float partialTicks) Draws the component in the foreground layerintgetXSize()intgetYSize()booleanmouseClicked(double mouseX, double mouseY, int button) Called when a mouse button is clickedbooleanmouseDragged(double mouseX, double mouseY, int button, double dragX, double dragY) Called when the mouse is pressed and draggedvoidsetHue(float hue) Methods inherited from class com.hrznstudio.titanium.client.screen.addon.BasicScreenAddon
getPosX, getPosY, isFocused, isMouseOver, setFocused, setPosX, setPosYMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
getCurrentFocusPath, getRectangle, nextFocusPathMethods inherited from interface com.hrznstudio.titanium.api.client.IScreenAddon
charTyped, getTooltipLines, init, isBackground, keyPressed, keyReleased, mouseMoved, mouseReleased, mouseScrolledMethods inherited from interface net.minecraft.client.gui.components.TabOrderedElement
getTabOrderGroup
-
Constructor Details
-
HuePickerAddon
-
-
Method Details
-
getXSize
public int getXSize()- Specified by:
getXSizein classBasicScreenAddon
-
getYSize
public int getYSize()- Specified by:
getYSizein classBasicScreenAddon
-
drawBackgroundLayer
public void drawBackgroundLayer(net.minecraft.client.gui.GuiGraphics guiGraphics, net.minecraft.client.gui.screens.Screen screen, IAssetProvider provider, int guiX, int guiY, int mouseX, int mouseY, float partialTicks) Description copied from interface:IScreenAddonDraws the component in the background layerscreen- 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 ticks
-
drawForegroundLayer
public void drawForegroundLayer(net.minecraft.client.gui.GuiGraphics stack, net.minecraft.client.gui.screens.Screen screen, IAssetProvider provider, int guiX, int guiY, int mouseX, int mouseY, float partialTicks) Description copied from interface:IScreenAddonDraws the component in the foreground layerscreen- 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 Ticks
-
mouseClicked
public boolean mouseClicked(double mouseX, double mouseY, int button) Description copied from interface:IScreenAddonCalled when a mouse button is clicked- Parameters:
mouseX- The mouse X coordinate where it was clickedmouseY- The mouse Y coordinate where it was clickedbutton- The Id of the button that was clicked- Returns:
- Returns whether the mouse was clicked successfully or not
-
mouseDragged
public boolean mouseDragged(double mouseX, double mouseY, int button, double dragX, double dragY) Description copied from interface:IScreenAddonCalled when the mouse is pressed and dragged- Parameters:
mouseX- The X coordinate of the mouse where the drag was initiatedmouseY- The Y coordinate of the mouse where the drag was initiatedbutton- The Id of the Button that was presseddragX- The X coordinate of the mouse where the drag was finisheddragY- The Y coordinate of the mouse where the drag was finished- Returns:
- Returns true if the drag was handled
-
setHue
public void setHue(float hue)
-