public class LabelElement extends GuiElement implements ILabelElement
| Modifier and Type | Field and Description |
|---|---|
static net.minecraft.client.gui.FontRenderer |
FONT_RENDERER |
protected java.lang.String |
rawText |
protected ITextStyle |
style |
protected java.lang.String |
text |
protected boolean |
textLength |
cropElement, cropHeight, cropWidth, cropX, cropY, height, parent, visible, width, xOffset, xPos, yOffset, yPos| Constructor and Description |
|---|
LabelElement(int xPos,
int yPos,
int width,
int height,
java.lang.String text,
GuiElementAlignment align,
ITextStyle style) |
LabelElement(java.lang.String text,
GuiElementAlignment align,
ITextStyle style) |
| Modifier and Type | Method and Description |
|---|---|
void |
drawElement(int mouseX,
int mouseY)
Draws the element itself at the current position.
|
java.util.Collection<java.lang.String> |
getLines() |
java.util.Map<ITextStyle,java.lang.String> |
getRawLines() |
java.lang.String |
getRawText()
The current text of this element without its
TextFormattings. |
ITextStyle |
getStyle() |
java.lang.String |
getText() |
ILabelElement |
setStyle(ITextStyle style) |
ILabelElement |
setText(java.lang.String text) |
addEventHandler, addTooltip, addTooltip, addTooltip, clearTooltip, draw, getAbsoluteX, getAbsoluteY, getAlign, getCropElement, getCropHeight, getCropWidth, getCropX, getCropY, getHeight, getParent, getTooltip, getTooltip, getWidth, getWindow, getX, getY, hasTooltip, hide, isCropped, isEnabled, isMouseOver, isMouseOver, isVisible, onCreation, onDeletion, onUpdateClient, receiveEvent, setAlign, setBounds, setCroppedZone, setHeight, setLocation, setOffset, setParent, setSize, setWidth, setXPosition, setYPosition, show, toString, updateClientdrawCenteredString, drawGradientRect, drawHorizontalLine, drawModalRectWithCustomSizedTexture, drawRect, drawScaledCustomSizeModalRect, drawString, drawTexturedModalRect, drawTexturedModalRect, drawTexturedModalRect, drawVerticalLineclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddEventHandler, addEventHandler, addEventHandler, addSelfEventHandler, addTooltip, addTooltip, addTooltip, canFocus, canMouseOver, clearTooltip, draw, getAbsoluteX, getAbsoluteY, getAlign, getHeight, getParent, getTooltip, getTooltip, getWidth, getWindow, getX, getY, hasTooltip, hide, isEnabled, isMouseOver, isMouseOver, isVisible, onCreation, onDeletion, postEvent, postEvent, receiveEvent, setAlign, setBounds, setHeight, setLocation, setOffset, setParent, setSize, setWidth, setXPosition, setYPosition, show, updateClientgetCropElement, getCropHeight, getCropWidth, getCropX, getCropY, isCropped, setCroppedZonepublic static final net.minecraft.client.gui.FontRenderer FONT_RENDERER
protected ITextStyle style
protected java.lang.String text
protected java.lang.String rawText
protected boolean textLength
public LabelElement(java.lang.String text,
GuiElementAlignment align,
ITextStyle style)
public LabelElement(int xPos,
int yPos,
int width,
int height,
java.lang.String text,
GuiElementAlignment align,
ITextStyle style)
public ILabelElement setStyle(ITextStyle style)
setStyle in interface ILabelElementpublic ITextStyle getStyle()
getStyle in interface ILabelElementpublic java.lang.String getText()
getText in interface ILabelElementTextFormattings.public ILabelElement setText(java.lang.String text)
setText in interface ILabelElementsetText in interface ITextElementpublic java.lang.String getRawText()
ILabelElementTextFormattings.getRawText in interface ILabelElementpublic java.util.Collection<java.lang.String> getLines()
getLines in interface ITextElementpublic java.util.Map<ITextStyle,java.lang.String> getRawLines()
getRawLines in interface ITextElementpublic void drawElement(int mouseX,
int mouseY)
IGuiElementdrawElement in interface IGuiElementdrawElement in class GuiElementmouseX - The x position of the mouse relative to the parent of the element.mouseY - The y position of the mouse relative to the parent of the element.