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 int
barLeft
private int
barWidth
protected int
border
protected int
bottom
protected boolean
captureMouse
private Minecraft
client
protected int
height
protected int
left
protected int
right
protected float
scrollDistance
private boolean
scrolling
protected int
top
protected int
width
-
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 void
applyScrollLimits()
java.util.List<? extends IGuiEventListener>
children()
protected boolean
clickPanel(double mouseX, double mouseY, int button)
protected void
drawBackground()
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
getBarHeight()
protected abstract int
getContentHeight()
private int
getMaxScroll()
protected int
getScrollAmount()
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 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:
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
public void render(MatrixStack matrix, int mouseX, int mouseY, float partialTicks)
- Specified by:
render
in 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:
children
in interfaceINestedGuiEventHandler
-
-