public abstract class GuidePart
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
GuidePart.PagePosition
Stores information about the current rendering position
|
Modifier and Type | Field and Description |
---|---|
protected GuiGuide |
gui |
static int |
INDENT_WIDTH |
static int |
LINE_HEIGHT |
protected boolean |
wasHovered |
protected boolean |
wasIconHovered |
Modifier and Type | Method and Description |
---|---|
IFontRenderer |
getFontRenderer() |
abstract GuidePart.PagePosition |
handleMouseClick(int x,
int y,
int width,
int height,
GuidePart.PagePosition current,
int index,
int mouseX,
int mouseY)
Like
renderIntoArea(int, int, int, int, PagePosition, int) but for a mouse click. |
void |
handleMouseDragFinish(int startX,
int startY,
int endX,
int endY,
int button) |
void |
handleMouseDragPartial(int startX,
int startY,
int currentX,
int currentY,
int button) |
abstract GuidePart.PagePosition |
renderIntoArea(int x,
int y,
int width,
int height,
GuidePart.PagePosition current,
int index) |
protected GuidePart.PagePosition |
renderLine(GuidePart.PagePosition current,
PageLine line,
int x,
int y,
int width,
int height,
int pageRenderIndex) |
protected GuidePart.PagePosition |
renderLines(java.lang.Iterable<PageLine> lines,
GuidePart.PagePosition part,
int x,
int y,
int width,
int height,
int index) |
protected GuidePart.PagePosition |
renderLines(java.lang.Iterable<PageLine> lines,
int x,
int y,
int width,
int height,
int index) |
protected void |
renderTextLine(java.lang.String text,
int x,
int y,
int colour)
Renders a raw line at the position, lowering it appropriately
|
void |
setFontRenderer(IFontRenderer fontRenderer) |
void |
updateScreen() |
boolean |
wasHovered() |
public static final int INDENT_WIDTH
public static final int LINE_HEIGHT
protected final GuiGuide gui
protected boolean wasHovered
protected boolean wasIconHovered
public GuidePart(GuiGuide gui)
public IFontRenderer getFontRenderer()
public void setFontRenderer(IFontRenderer fontRenderer)
public boolean wasHovered()
public void updateScreen()
protected void renderTextLine(java.lang.String text, int x, int y, int colour)
public abstract GuidePart.PagePosition renderIntoArea(int x, int y, int width, int height, GuidePart.PagePosition current, int index)
x
- y
- width
- height
- current
- The current position to render fromindex
- The current page index to render onpublic abstract GuidePart.PagePosition handleMouseClick(int x, int y, int width, int height, GuidePart.PagePosition current, int index, int mouseX, int mouseY)
renderIntoArea(int, int, int, int, PagePosition, int)
but for a mouse click.public void handleMouseDragPartial(int startX, int startY, int currentX, int currentY, int button)
public void handleMouseDragFinish(int startX, int startY, int endX, int endY, int button)
protected GuidePart.PagePosition renderLine(GuidePart.PagePosition current, PageLine line, int x, int y, int width, int height, int pageRenderIndex)
current
- The current location of the rendering. This will be different from start if this line needed to
render over 2 (or more!) pagesline
- The line to renderx
- The x position the page rendering started fromy
- The y position the page rendering started fromwidth
- The width of rendering space availableheight
- The height of rendering space availableprotected GuidePart.PagePosition renderLines(java.lang.Iterable<PageLine> lines, GuidePart.PagePosition part, int x, int y, int width, int height, int index)
protected GuidePart.PagePosition renderLines(java.lang.Iterable<PageLine> lines, int x, int y, int width, int height, int index)