public class UIMultiLineLabel extends UILabel implements IScrollable
ITransformable.Alpha, ITransformable.Brightness, ITransformable.Color, ITransformable.Position<T>, ITransformable.Rotate, ITransformable.Scale, ITransformable.Size<T>, ITransformable.Translate| Modifier and Type | Field and Description |
|---|---|
protected boolean |
autoHeight |
protected int |
lineOffset |
protected java.util.List<java.lang.String> |
lines |
protected int |
lineSpacing |
canInteract, color, drawShadow, fontScale, text, textHeight, textWidth| Constructor and Description |
|---|
UIMultiLineLabel(MalisisGui gui) |
UIMultiLineLabel(MalisisGui gui,
java.lang.String text) |
| Modifier and Type | Method and Description |
|---|---|
void |
drawForeground(GuiRenderer renderer,
int mouseX,
int mouseY,
float partialTick)
Draws the foreground.
|
int |
getContentHeight() |
int |
getContentWidth() |
int |
getHorizontalPadding() |
int |
getLineHeight() |
float |
getOffsetX() |
float |
getOffsetY() |
float |
getScrollStep() |
int |
getVerticalPadding() |
void |
onSizeChange(SpaceChangeEvent.SizeChangeEvent<UIMultiLineLabel> event) |
void |
setOffsetX(float offsetX,
int delta) |
void |
setOffsetY(float offsetY,
int delta) |
UILabel |
setSize(int width) |
UIMultiLineLabel |
setText(java.lang.String text)
Sets the text of this
UILabel. |
calculateSize, drawBackground, getComponentAt, getFontScale, getPropertyString, getText, setColor, setDrawShadow, setFontScaleaddControlComponent, componentX, componentY, draw, fireEvent, fireKeyboardEvent, fireMouseEvent, getAlpha, getAnchor, getGui, getHeight, getName, getParent, getRawHeight, getRawWidth, getTooltip, getWidth, getX, getY, getZIndex, isDisabled, isFocused, isHovered, isInsideBounds, isRelativeHeight, isRelativeWidth, isVisible, onAddedToScreen, parentX, parentY, register, relativeX, relativeY, removeAllControlComponents, removeControlComponent, screenX, screenY, setAlpha, setAnchor, setDisabled, setFocused, setHovered, setName, setParent, setPosition, setPosition, setSize, setTooltip, setTooltip, setVisible, setZIndex, toString, unregisterprotected java.util.List<java.lang.String> lines
protected boolean autoHeight
protected int lineOffset
protected int lineSpacing
public UIMultiLineLabel(MalisisGui gui)
public UIMultiLineLabel(MalisisGui gui, java.lang.String text)
public UIMultiLineLabel setText(java.lang.String text)
UILabelUILabel. If no width was previously set, it will be recalculated for this text.public UILabel setSize(int width)
public int getLineHeight()
public int getContentWidth()
getContentWidth in interface IScrollablepublic int getContentHeight()
getContentHeight in interface IScrollablepublic float getOffsetX()
getOffsetX in interface IScrollablepublic void setOffsetX(float offsetX,
int delta)
setOffsetX in interface IScrollablepublic float getOffsetY()
getOffsetY in interface IScrollablepublic void setOffsetY(float offsetY,
int delta)
setOffsetY in interface IScrollablepublic float getScrollStep()
getScrollStep in interface IScrollablepublic int getVerticalPadding()
getVerticalPadding in interface IScrollablepublic int getHorizontalPadding()
getHorizontalPadding in interface IScrollablepublic void drawForeground(GuiRenderer renderer, int mouseX, int mouseY, float partialTick)
UILabeldrawForeground in class UILabelrenderer - the renderermouseX - the mouse xmouseY - the mouse ypartialTick - the partial tickpublic void onSizeChange(SpaceChangeEvent.SizeChangeEvent<UIMultiLineLabel> event)