public class GuiTabCollection extends BaseComponent
Modifier and Type | Field and Description |
---|---|
protected GuiTab |
activeTab |
protected java.util.List<GuiTab> |
tabs |
fontRenderer, keyboardEventListener, mouseEventListener, parent, toolTip, xPos, yPos
Constructor and Description |
---|
GuiTabCollection(GuiBase<?> parentGui,
int x)
Main constructor for all components
|
Modifier and Type | Method and Description |
---|---|
GuiTabCollection |
addReverseTab(java.util.List<BaseComponent> components,
int maxWidth,
int maxHeight,
int textureU,
int textureV,
net.minecraft.item.ItemStack stack)
Adds a reverse tab to the collection
|
GuiTabCollection |
addTab(java.util.List<BaseComponent> components,
int maxWidth,
int maxHeight,
int textureU,
int textureV,
net.minecraft.item.ItemStack stack)
Adds a tab to the collection
|
java.util.List<java.awt.Rectangle> |
getAreasCovered(int guiLeft,
int guiTop)
Gets the areas covered by the tab collection
|
int |
getHeight()
Used to find how tall this is
|
java.util.List<GuiTab> |
getTabs()
Accessors/Mutators *
|
int |
getWidth()
Used to find how wide this is
|
boolean |
isMouseOver(int mouseX,
int mouseY)
Used to check if the mouse if currently over the component
You must have the getWidth() and getHeight() functions defined for this to work properly
|
void |
keyTyped(char letter,
int keyCode)
Used when a key is pressed
|
void |
mouseScrolled(int dir)
Called when the mouse is scrolled
|
void |
render(int guiLeft,
int guiTop,
int mouseX,
int mouseY)
Called to render the component
|
void |
renderOverlay(int guiLeft,
int guiTop,
int mouseX,
int mouseY)
Called after base render, is already translated to guiLeft and guiTop, just move offset
|
void |
renderToolTip(int mouseX,
int mouseY)
Render the tooltip if you can
|
void |
setTabs(java.util.List<GuiTab> tabs) |
getArea, getDynamicToolTip, getKeyboardEventListener, getMouseEventListener, getParent, getToolTip, getXPos, getYPos, mouseDown, mouseDrag, mouseUp, setKeyboardEventListener, setMouseEventListener, setParent, setToolTip, setXPos, setYPos
addButton, children, getMinecraft, getNarrationMessage, getTitle, getTooltipFromItem, handleComponentClicked, hasAltDown, hasControlDown, hasShiftDown, init, init, insertText, isCopy, isCut, isMouseOver, isPaste, isPauseScreen, isSelectAll, isValidCharacterForName, keyPressed, onClose, removed, render, renderBackground, renderBackground, renderComponentHoverEffect, renderDirtBackground, renderTooltip, renderTooltip, renderTooltip, renderTooltip, resize, sendMessage, sendMessage, setSize, shouldCloseOnEsc, tick, wrapScreenError
getFocused, isDragging, setDragging, setFocused
blit, blit, blit, blit, blit, drawCenteredString, drawRightAlignedString, drawString, fill, fillGradient, hLine, innerBlit, vLine
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public GuiTabCollection(GuiBase<?> parentGui, int x)
parentGui
- The parent Guix
- The x positionpublic GuiTabCollection addTab(java.util.List<BaseComponent> components, int maxWidth, int maxHeight, int textureU, int textureV, @Nullable net.minecraft.item.ItemStack stack)
components
- The components to add to the tabmaxWidth
- The max width of the tabmaxHeight
- The max height of the tabtextureU
- The tabs u texturetextureV
- The tabs v texturestack
- The display stack, can be nullpublic GuiTabCollection addReverseTab(java.util.List<BaseComponent> components, int maxWidth, int maxHeight, int textureU, int textureV, @Nullable net.minecraft.item.ItemStack stack)
components
- The components to add to the tabmaxWidth
- The max width of the tabmaxHeight
- The max height of the tabtextureU
- The tabs u texturetextureV
- The tabs v texturestack
- The display stack, can be nullpublic java.util.List<java.awt.Rectangle> getAreasCovered(int guiLeft, int guiTop)
guiLeft
- The gui left of the parentguiTop
- The gui top of the parentpublic void mouseScrolled(int dir)
mouseScrolled
in class BaseComponent
dir
- 1 for positive, -1 for negativepublic boolean isMouseOver(int mouseX, int mouseY)
isMouseOver
in class BaseComponent
mouseX
- Mouse X PositionmouseY
- Mouse Y Positionpublic void keyTyped(char letter, int keyCode)
keyTyped
in class BaseComponent
letter
- The letterkeyCode
- The codepublic void renderToolTip(int mouseX, int mouseY)
renderToolTip
in class BaseComponent
mouseX
- Mouse XmouseY
- Mouse Ypublic void render(int guiLeft, int guiTop, int mouseX, int mouseY)
render
in class BaseComponent
public void renderOverlay(int guiLeft, int guiTop, int mouseX, int mouseY)
renderOverlay
in class BaseComponent
public int getWidth()
getWidth
in class BaseComponent
public int getHeight()
getHeight
in class BaseComponent
public java.util.List<GuiTab> getTabs()
public void setTabs(java.util.List<GuiTab> tabs)