Class TexturedButton
java.lang.Object
net.minecraft.client.gui.DrawableHelper
net.minecraft.client.gui.widgets.Button
net.glasslauncher.mods.api.gcapi.screen.widget.TexturedButton
- All Implemented Interfaces:
HasToolTip
Copied from ModMenu
-
Field Summary
Fields inherited from class net.minecraft.client.gui.widgets.Button
active, height, id, text, visible, width, x, yFields inherited from class net.minecraft.client.gui.DrawableHelper
zOffset -
Constructor Summary
ConstructorsConstructorDescriptionTexturedButton(int buttonId, int x, int y, int width, int height, int u, int v, String texture, int uWidth, int vHeight) TexturedButton(int buttonId, int x, int y, int width, int height, int u, int v, String texture, int uWidth, int vHeight, String message) -
Method Summary
Modifier and TypeMethodDescriptionThe tooltip to show, can be multiline by adding another element onto the list.int[]getXYWH()The position and size of your element.protected booleanisHovered(int mouseX, int mouseY) voidrender(net.minecraft.client.Minecraft mc, int mouseX, int mouseY) voidsetPos(int x, int y) Methods inherited from class net.minecraft.client.gui.widgets.Button
getYImage, isMouseOver, mouseReleased, postRenderMethods inherited from class net.minecraft.client.gui.DrawableHelper
blit, drawLineHorizontal, drawLineVertical, drawTextWithShadow, drawTextWithShadowCentred, fill, fillGradient
-
Constructor Details
-
TexturedButton
public TexturedButton(int buttonId, int x, int y, int width, int height, int u, int v, String texture, int uWidth, int vHeight) -
TexturedButton
-
-
Method Details
-
setPos
public void setPos(int x, int y) -
isHovered
protected boolean isHovered(int mouseX, int mouseY) -
render
public void render(net.minecraft.client.Minecraft mc, int mouseX, int mouseY) - Overrides:
renderin classnet.minecraft.client.gui.widgets.Button
-
getTooltip
Description copied from interface:HasToolTipThe tooltip to show, can be multiline by adding another element onto the list.- Specified by:
getTooltipin interfaceHasToolTip- Returns:
- a List of colour-enabled strings to use as a tooltip.
-
getXYWH
public int[] getXYWH()Description copied from interface:HasToolTipThe position and size of your element. Required.- Specified by:
getXYWHin interfaceHasToolTip- Returns:
- a 4 length array of ints, the X position, Y position, width and height of your element.
-