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
-
Field Summary
Modifier and TypeFieldDescriptionprivate final int
private final int
protected final int
protected final int
protected boolean
private final Minecraft
protected final int
protected final int
protected final int
protected float
private boolean
protected final int
protected final int
Fields inherited from class net.minecraft.client.gui.AbstractGui
BACKGROUND_LOCATION, GUI_ICONS_LOCATION, STATS_ICON_LOCATION
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate void
List<? extends IGuiEventListener>
children()
protected boolean
clickPanel
(double mouseX, double mouseY, int button) protected void
protected void
drawGradientRect
(MatrixStack mStack, int left, int top, int right, int bottom, int color1, int color2) protected abstract void
drawPanel
(MatrixStack mStack, int entryRight, int relativeY, Tessellator tess, int mouseX, int mouseY) Draw anything special on the screen.private int
protected abstract int
private int
protected int
boolean
isMouseOver
(double mouseX, double mouseY) boolean
mouseClicked
(double mouseX, double mouseY, int button) boolean
mouseDragged
(double mouseX, double mouseY, int button, double deltaX, double deltaY) boolean
mouseReleased
(double p_mouseReleased_1_, double p_mouseReleased_3_, int p_mouseReleased_5_) boolean
mouseScrolled
(double mouseX, double mouseY, double scroll) void
render
(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 Details
-
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:
-
barWidth
private final int barWidth- See Also:
-
barLeft
private final int barLeft
-
-
Constructor Details
-
ScrollPanel
-
-
Method Details
-
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:
mouseScrolled
in interfaceIGuiEventListener
- Specified by:
mouseScrolled
in interfaceINestedGuiEventHandler
-
getScrollAmount
protected int getScrollAmount() -
isMouseOver
public boolean isMouseOver(double mouseX, double mouseY) - Specified by:
isMouseOver
in interfaceIGuiEventListener
-
mouseClicked
public boolean mouseClicked(double mouseX, double mouseY, int button) - Specified by:
mouseClicked
in interfaceIGuiEventListener
- Specified by:
mouseClicked
in interfaceINestedGuiEventHandler
-
mouseReleased
public boolean mouseReleased(double p_mouseReleased_1_, double p_mouseReleased_3_, int p_mouseReleased_5_) - Specified by:
mouseReleased
in interfaceIGuiEventListener
- Specified by:
mouseReleased
in interfaceINestedGuiEventHandler
-
getBarHeight
private int getBarHeight() -
mouseDragged
public boolean mouseDragged(double mouseX, double mouseY, int button, double deltaX, double deltaY) - Specified by:
mouseDragged
in interfaceIGuiEventListener
- Specified by:
mouseDragged
in interfaceINestedGuiEventHandler
-
render
- Specified by:
render
in interfaceIRenderable
-
drawGradientRect
protected void drawGradientRect(MatrixStack mStack, int left, int top, int right, int bottom, int color1, int color2) -
children
- Specified by:
children
in interfaceINestedGuiEventHandler
-