public class UITooltip extends UIComponent
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 Animation |
animation |
protected int |
delay |
protected java.util.List<java.lang.String> |
lines |
protected int |
padding |
Constructor and Description |
---|
UITooltip(MalisisGui gui) |
UITooltip(MalisisGui gui,
int delay) |
UITooltip(MalisisGui gui,
java.lang.String text) |
UITooltip(MalisisGui gui,
java.lang.String text,
int delay) |
Modifier and Type | Method and Description |
---|---|
void |
animate() |
protected void |
calcSize() |
void |
drawBackground(GuiRenderer renderer,
int mouseX,
int mouseY,
float partialTick)
Called first when drawing this
UIComponent . |
void |
drawForeground(GuiRenderer renderer,
int mouseX,
int mouseY,
float partialTick)
Called last when drawing this
UIComponent . |
int |
getDelay() |
protected int |
getOffsetX() |
protected int |
getOffsetY() |
UITooltip |
setDelay(int delay) |
UITooltip |
setText(java.util.List<java.lang.String> lines) |
UITooltip |
setText(java.lang.String text) |
addControlComponent, componentX, componentY, draw, fireEvent, getAlpha, getAnchor, getComponentAt, getGui, getHeight, getName, getParent, getPropertyString, getRawHeight, getRawWidth, getTooltip, getWidth, getX, getY, getZIndex, isDisabled, isFocused, isHovered, isInsideBounds, isRelativeHeight, isRelativeWidth, isVisible, onAddedToScreen, onButtonPress, onButtonRelease, onClick, onDoubleClick, onDrag, onKeyTyped, onMouseMove, onRightClick, onScrollWheel, parentX, parentY, register, relativeX, relativeY, removeAllControlComponents, removeControlComponent, screenX, screenY, setAlpha, setAnchor, setDisabled, setFocused, setHovered, setName, setParent, setPosition, setPosition, setSize, setTooltip, setTooltip, setVisible, setZIndex, toString, unregister
protected java.util.List<java.lang.String> lines
protected int padding
protected int delay
protected Animation animation
public UITooltip(MalisisGui gui)
public UITooltip(MalisisGui gui, java.lang.String text)
public UITooltip(MalisisGui gui, int delay)
public UITooltip(MalisisGui gui, java.lang.String text, int delay)
public UITooltip setText(java.lang.String text)
public UITooltip setText(java.util.List<java.lang.String> lines)
public UITooltip setDelay(int delay)
public int getDelay()
protected void calcSize()
protected int getOffsetX()
protected int getOffsetY()
public void animate()
public void drawBackground(GuiRenderer renderer, int mouseX, int mouseY, float partialTick)
UIComponent
UIComponent
.drawBackground
in class UIComponent
renderer
- the renderermouseX
- the mouse xmouseY
- the mouse ypartialTick
- the partial tickpublic void drawForeground(GuiRenderer renderer, int mouseX, int mouseY, float partialTick)
UIComponent
UIComponent
.drawForeground
in class UIComponent
renderer
- the renderermouseX
- the mouse xmouseY
- the mouse ypartialTick
- the partial tick