public class GuiComponentText extends BaseComponent
Modifier and Type | Field and Description |
---|---|
protected java.awt.Color |
color |
protected int |
colorDefault |
protected java.lang.String |
label |
fontRenderer, keyboardEventListener, mouseEventListener, parent, toolTip, xPos, yPos
Constructor and Description |
---|
GuiComponentText(GuiBase<?> parent,
int x,
int y,
java.lang.String label,
java.awt.Color color)
Creates the text component
|
Modifier and Type | Method and Description |
---|---|
java.awt.Color |
getColor() |
int |
getHeight()
Used to find how tall this is
|
java.lang.String |
getLabel()
Accessors/Mutators *
|
int |
getWidth()
Used to find how wide this is
|
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 |
setColor(java.awt.Color color) |
void |
setLabel(java.lang.String label) |
getArea, getDynamicToolTip, getKeyboardEventListener, getMouseEventListener, getParent, getToolTip, getXPos, getYPos, isMouseOver, keyTyped, mouseDown, mouseDrag, mouseScrolled, mouseUp, renderToolTip, 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
protected java.lang.String label
protected int colorDefault
protected java.awt.Color color
public GuiComponentText(GuiBase<?> parent, int x, int y, java.lang.String label, @Nullable java.awt.Color color)
parent
- The gui parentx
- The x posy
- The y poslabel
- The string to rendercolor
- Optional colorpublic 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.lang.String getLabel()
public void setLabel(java.lang.String label)
public java.awt.Color getColor()
public void setColor(java.awt.Color color)