Package net.minecraftforge.client.gui
Class ScrollPanel
- java.lang.Object
-
- net.minecraft.client.gui.AbstractGui
-
- net.minecraft.client.gui.FocusableGui
-
- net.minecraftforge.client.gui.ScrollPanel
-
- All Implemented Interfaces:
IGuiEventListener,INestedGuiEventHandler,IRenderable
- Direct Known Subclasses:
ModListScreen.InfoPanel
public abstract class ScrollPanel extends FocusableGui implements IRenderable
-
-
Field Summary
Fields Modifier and Type Field Description private intbarLeftprivate intbarWidthprotected intborderprotected intbottomprotected booleancaptureMouseprivate Minecraftclientprotected intheightprotected intleftprotected intrightprotected floatscrollDistanceprivate booleanscrollingprotected inttopprotected intwidth-
Fields inherited from class net.minecraft.client.gui.AbstractGui
BACKGROUND_LOCATION, GUI_ICONS_LOCATION, STATS_ICON_LOCATION
-
-
Constructor Summary
Constructors Constructor Description ScrollPanel(Minecraft client, int width, int height, int top, int left)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description private voidapplyScrollLimits()java.util.List<? extends IGuiEventListener>children()protected booleanclickPanel(double mouseX, double mouseY, int button)protected voiddrawBackground()protected voiddrawGradientRect(MatrixStack mStack, int left, int top, int right, int bottom, int color1, int color2)protected abstract voiddrawPanel(MatrixStack mStack, int entryRight, int relativeY, Tessellator tess, int mouseX, int mouseY)Draw anything special on the screen.private intgetBarHeight()protected abstract intgetContentHeight()private intgetMaxScroll()protected intgetScrollAmount()booleanisMouseOver(double mouseX, double mouseY)booleanmouseClicked(double mouseX, double mouseY, int button)booleanmouseDragged(double mouseX, double mouseY, int button, double deltaX, double deltaY)booleanmouseReleased(double p_mouseReleased_1_, double p_mouseReleased_3_, int p_mouseReleased_5_)booleanmouseScrolled(double mouseX, double mouseY, double scroll)voidrender(MatrixStack matrix, int mouseX, int mouseY, float partialTicks)-
Methods inherited from class net.minecraft.client.gui.FocusableGui
getFocused, isDragging, setDragging, setFocused
-
Methods inherited from class net.minecraft.client.gui.AbstractGui
blit, blit, blit, blit, blit, blitOutlineBlack, drawCenteredString, drawCenteredString, drawString, drawString, fill, fillGradient, fillGradient, getBlitOffset, hLine, setBlitOffset, vLine
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.minecraft.client.gui.IGuiEventListener
mouseMoved
-
Methods inherited from interface net.minecraft.client.gui.INestedGuiEventHandler
changeFocus, charTyped, getChildAt, keyPressed, keyReleased, magicalSpecialHackyFocus, setInitialFocus
-
-
-
-
Field Detail
-
client
private final Minecraft client
-
width
protected final int width
-
height
protected final int height
-
top
protected final int top
-
bottom
protected final int bottom
-
right
protected final int right
-
left
protected final int left
-
scrolling
private boolean scrolling
-
scrollDistance
protected float scrollDistance
-
captureMouse
protected boolean captureMouse
-
border
protected final int border
- See Also:
- Constant Field Values
-
barWidth
private final int barWidth
- See Also:
- Constant Field Values
-
barLeft
private final int barLeft
-
-
Constructor Detail
-
ScrollPanel
public ScrollPanel(Minecraft client, int width, int height, int top, int left)
-
-
Method Detail
-
getContentHeight
protected abstract int getContentHeight()
-
drawBackground
protected void drawBackground()
-
drawPanel
protected abstract void drawPanel(MatrixStack mStack, int entryRight, int relativeY, Tessellator tess, int mouseX, int mouseY)
Draw anything special on the screen. GL_SCISSOR is enabled for anything that is rendered outside of the view box. Do not mess with SCISSOR unless you support this.- Parameters:
mouseY-mouseX-
-
clickPanel
protected boolean clickPanel(double mouseX, double mouseY, int button)
-
getMaxScroll
private int getMaxScroll()
-
applyScrollLimits
private void applyScrollLimits()
-
mouseScrolled
public boolean mouseScrolled(double mouseX, double mouseY, double scroll)- Specified by:
mouseScrolledin interfaceIGuiEventListener- Specified by:
mouseScrolledin interfaceINestedGuiEventHandler
-
getScrollAmount
protected int getScrollAmount()
-
isMouseOver
public boolean isMouseOver(double mouseX, double mouseY)- Specified by:
isMouseOverin interfaceIGuiEventListener
-
mouseClicked
public boolean mouseClicked(double mouseX, double mouseY, int button)- Specified by:
mouseClickedin interfaceIGuiEventListener- Specified by:
mouseClickedin interfaceINestedGuiEventHandler
-
mouseReleased
public boolean mouseReleased(double p_mouseReleased_1_, double p_mouseReleased_3_, int p_mouseReleased_5_)- Specified by:
mouseReleasedin interfaceIGuiEventListener- Specified by:
mouseReleasedin interfaceINestedGuiEventHandler
-
getBarHeight
private int getBarHeight()
-
mouseDragged
public boolean mouseDragged(double mouseX, double mouseY, int button, double deltaX, double deltaY)- Specified by:
mouseDraggedin interfaceIGuiEventListener- Specified by:
mouseDraggedin interfaceINestedGuiEventHandler
-
render
public void render(MatrixStack matrix, int mouseX, int mouseY, float partialTicks)
- Specified by:
renderin interfaceIRenderable
-
drawGradientRect
protected void drawGradientRect(MatrixStack mStack, int left, int top, int right, int bottom, int color1, int color2)
-
children
public java.util.List<? extends IGuiEventListener> children()
- Specified by:
childrenin interfaceINestedGuiEventHandler
-
-