public class GuiComponentLongText extends BaseComponent
Modifier and Type | Field and Description |
---|---|
protected int |
colorDefault |
protected int |
currentLine |
protected boolean |
downSelected |
protected int |
height |
protected java.util.List<java.lang.String> |
lines |
protected int |
lineWidth |
protected int |
textScale |
protected int |
u |
protected boolean |
upSelected |
protected int |
v |
protected int |
width |
fontRenderer, keyboardEventListener, mouseEventListener, parent, toolTip, xPos, yPos
Constructor and Description |
---|
GuiComponentLongText(GuiBase<?> parent,
int x,
int y,
int w,
int h,
int u,
int v,
java.lang.String text,
int textScale)
Creates the long text object
IMPORTANT: The up and down arrows should be together, up on top down on bottom.
|
Modifier and Type | Method and Description |
---|---|
int |
getCurrentLine() |
int |
getHeight()
Used to find how tall this is
|
java.util.List<java.lang.String> |
getLines() |
int |
getTextScale() |
int |
getU() |
int |
getV() |
int |
getWidth()
Used to find how wide this is
|
boolean |
mouseClicked(double x,
double y,
int button)
Called when the mouse is pressed
|
boolean |
mouseReleased(double x,
double y,
int button)
Called when the mouse button is over the component and released
|
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 |
setCurrentLine(int currentLine) |
void |
setHeight(int height) |
void |
setLines(java.util.List<java.lang.String> lines) |
void |
setTextScale(int textScale) |
void |
setU(int u) |
void |
setV(int v) |
void |
setWidth(int width)
Accessors/Mutators *
|
getArea, getDynamicToolTip, getKeyboardEventListener, getMouseEventListener, getParent, getToolTip, getXPos, getYPos, isMouseOver, keyTyped, mouseDown, mouseDrag, 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 int width
protected int height
protected int u
protected int v
protected int textScale
protected boolean upSelected
protected boolean downSelected
protected int colorDefault
protected int lineWidth
protected int currentLine
protected java.util.List<java.lang.String> lines
public GuiComponentLongText(GuiBase<?> parent, int x, int y, int w, int h, int u, int v, java.lang.String text, int textScale)
parent
- The parent GUIx
- The x posy
- The y posw
- The widthh
- The heightu
- The arrows uv
- The arrows vtext
- The text to displaytextScale
- The text scale, default size is 100public boolean mouseClicked(double x, double y, int button)
x
- Mouse X Positiony
- Mouse Y Positionbutton
- Mouse Buttonpublic boolean mouseReleased(double x, double y, int button)
x
- Mouse X Positiony
- Mouse Y Positionbutton
- Mouse Buttonpublic void mouseScrolled(int dir)
mouseScrolled
in class BaseComponent
dir
- 1 for positive, -1 for negativepublic 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 void setWidth(int width)
public void setHeight(int height)
public int getU()
public void setU(int u)
public int getV()
public void setV(int v)
public int getTextScale()
public void setTextScale(int textScale)
public int getCurrentLine()
public void setCurrentLine(int currentLine)
public java.util.List<java.lang.String> getLines()
public void setLines(java.util.List<java.lang.String> lines)