public interface ITerminalButton<C extends ITerminalStorageTabClient,O extends ITerminalStorageTabCommon,B extends net.minecraft.client.gui.widget.button.Button>
| Modifier and Type | Method and Description |
|---|---|
B |
createButton(int x,
int y)
Create a gui button for displaying this button.
|
void |
getTooltip(net.minecraft.entity.player.PlayerEntity player,
net.minecraft.client.util.ITooltipFlag tooltipFlag,
java.util.List<net.minecraft.util.text.ITextComponent> lines)
Get the tooltip of this sorter.
|
java.lang.String |
getTranslationKey() |
default int |
getX(int guiLeft,
int offset)
Calculate the final X position for this button.
|
default int |
getY(int guiTop,
int offset)
Calculate the final Y position for this button.
|
default boolean |
isInLeftColumn() |
void |
onClick(C clientTab,
O commonTab,
B guiButton,
int channel,
int mouseButton)
Callback for when the gui button has been clicked.
|
default int getX(int guiLeft,
int offset)
guiLeft - Gui left Xoffset - X offset.default int getY(int guiTop,
int offset)
guiTop - Gui top Yoffset - Y offset.default boolean isInLeftColumn()
B createButton(int x, int y)
x - The button X position.y - The button Y position.void onClick(C clientTab, @Nullable O commonTab, B guiButton, int channel, int mouseButton)
clientTab - The client tab in which the button was clicked.commonTab - The common tab in which the button was clicked.guiButton - The gui button.channel - The active channel.mouseButton - The mouse button that was used to click with.java.lang.String getTranslationKey()
void getTooltip(net.minecraft.entity.player.PlayerEntity player,
net.minecraft.client.util.ITooltipFlag tooltipFlag,
java.util.List<net.minecraft.util.text.ITextComponent> lines)
player - The player that is requesting the tooltip.tooltipFlag - The tooltip flag.lines - The tooltip lines.