类 ScrollPanel
java.lang.Object
net.minecraft.client.gui.components.events.AbstractContainerEventHandler
net.minecraftforge.client.gui.widget.ScrollPanel
- 所有已实现的接口:
ContainerEventHandler
,GuiEventListener
,Renderable
,TabOrderedElement
,NarratableEntry
,NarrationSupplier
public abstract class ScrollPanel
extends AbstractContainerEventHandler
implements Renderable, NarratableEntry
Abstract scroll panel class.
-
嵌套类概要
从接口继承的嵌套类/接口 net.minecraft.client.gui.narration.NarratableEntry
NarratableEntry.NarrationPriority
-
字段概要
字段修饰符和类型字段说明private final int
private final int
private final int
private final int
private final int
private 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
从接口继承的字段 net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS
-
构造器概要
构造器构造器说明ScrollPanel
(Minecraft client, int width, int height, int top, int left) ScrollPanel
(Minecraft client, int width, int height, int top, int left, int border) ScrollPanel
(Minecraft client, int width, int height, int top, int left, int border, int barWidth) ScrollPanel
(Minecraft client, int width, int height, int top, int left, int border, int barWidth, int bgColor) ScrollPanel
(Minecraft client, int width, int height, int top, int left, int border, int barWidth, int bgColorFrom, int bgColorTo) ScrollPanel
(Minecraft client, int width, int height, int top, int left, int border, int barWidth, int bgColorFrom, int bgColorTo, int barBgColor, int barColor, int barBorderColor) Base constructor -
方法概要
修饰符和类型方法说明private void
List
<? extends GuiEventListener> children()
protected boolean
clickPanel
(double mouseX, double mouseY, int button) protected void
drawBackground
(GuiGraphics guiGraphics, Tesselator tess, float partialTick) Draws the background of the scroll panel.protected void
drawGradientRect
(GuiGraphics guiGraphics, int left, int top, int right, int bottom, int color1, int color2) protected abstract void
drawPanel
(GuiGraphics guiGraphics, int entryRight, int relativeY, Tesselator 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 mouseX, double mouseY, int button) boolean
mouseScrolled
(double mouseX, double mouseY, double deltaX, double deltaY) void
render
(GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTick) 从类继承的方法 net.minecraft.client.gui.components.events.AbstractContainerEventHandler
getFocused, isDragging, setDragging, setFocused
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
从接口继承的方法 net.minecraft.client.gui.components.events.ContainerEventHandler
charTyped, getChildAt, getCurrentFocusPath, isFocused, keyPressed, keyReleased, nextFocusPath, setFocused
从接口继承的方法 net.minecraft.client.gui.components.events.GuiEventListener
getBorderForArrowNavigation, getRectangle, mouseMoved
从接口继承的方法 net.minecraft.client.gui.narration.NarratableEntry
getNarratables, isActive, narrationPriority
从接口继承的方法 net.minecraft.client.gui.narration.NarrationSupplier
updateNarration
从接口继承的方法 net.minecraft.client.gui.components.TabOrderedElement
getTabOrderGroup
-
字段详细资料
-
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 -
barWidth
private final int barWidth -
barLeft
private final int barLeft -
bgColorFrom
private final int bgColorFrom -
bgColorTo
private final int bgColorTo -
barBgColor
private final int barBgColor -
barColor
private final int barColor -
barBorderColor
private final int barBorderColor
-
-
构造器详细资料
-
ScrollPanel
- 参数:
client
- the minecraft instance this ScrollPanel should usewidth
- the widthheight
- the heighttop
- the offset from the top (y coord)left
- the offset from the left (x coord)
-
ScrollPanel
- 参数:
client
- the minecraft instance this ScrollPanel should usewidth
- the widthheight
- the heighttop
- the offset from the top (y coord)left
- the offset from the left (x coord)border
- the size of the border
-
ScrollPanel
public ScrollPanel(Minecraft client, int width, int height, int top, int left, int border, int barWidth) - 参数:
client
- the minecraft instance this ScrollPanel should usewidth
- the widthheight
- the heighttop
- the offset from the top (y coord)left
- the offset from the left (x coord)border
- the size of the borderbarWidth
- the width of the scroll bar
-
ScrollPanel
public ScrollPanel(Minecraft client, int width, int height, int top, int left, int border, int barWidth, int bgColor) - 参数:
client
- the minecraft instance this ScrollPanel should usewidth
- the widthheight
- the heighttop
- the offset from the top (y coord)left
- the offset from the left (x coord)border
- the size of the borderbarWidth
- the width of the scroll barbgColor
- the color for the background
-
ScrollPanel
public ScrollPanel(Minecraft client, int width, int height, int top, int left, int border, int barWidth, int bgColorFrom, int bgColorTo) - 参数:
client
- the minecraft instance this ScrollPanel should usewidth
- the widthheight
- the heighttop
- the offset from the top (y coord)left
- the offset from the left (x coord)border
- the size of the borderbarWidth
- the width of the scroll barbgColorFrom
- the start color for the background gradientbgColorTo
- the end color for the background gradient
-
ScrollPanel
public ScrollPanel(Minecraft client, int width, int height, int top, int left, int border, int barWidth, int bgColorFrom, int bgColorTo, int barBgColor, int barColor, int barBorderColor) Base constructor- 参数:
client
- the minecraft instance this ScrollPanel should usewidth
- the widthheight
- the heighttop
- the offset from the top (y coord)left
- the offset from the left (x coord)border
- the size of the borderbarWidth
- the width of the scroll barbgColorFrom
- the start color for the background gradientbgColorTo
- the end color for the background gradientbarBgColor
- the color for the scroll bar backgroundbarColor
- the color for the scroll bar handlebarBorderColor
- the border color for the scroll bar handle
-
-
方法详细资料
-
getContentHeight
protected abstract int getContentHeight() -
drawBackground
Draws the background of the scroll panel. This runs AFTER Scissors are enabled. -
drawPanel
protected abstract void drawPanel(GuiGraphics guiGraphics, int entryRight, int relativeY, Tesselator tess, int mouseX, int mouseY) Draw anything special on the screen. Scissor (RenderSystem.enableScissor) is enabled for anything that is rendered outside the view box. Do not mess with Scissor unless you support this. -
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 deltaX, double deltaY) - 指定者:
mouseScrolled
在接口中ContainerEventHandler
- 指定者:
mouseScrolled
在接口中GuiEventListener
-
getScrollAmount
protected int getScrollAmount() -
isMouseOver
public boolean isMouseOver(double mouseX, double mouseY) - 指定者:
isMouseOver
在接口中GuiEventListener
-
mouseClicked
public boolean mouseClicked(double mouseX, double mouseY, int button) - 指定者:
mouseClicked
在接口中ContainerEventHandler
- 指定者:
mouseClicked
在接口中GuiEventListener
-
mouseReleased
public boolean mouseReleased(double mouseX, double mouseY, int button) - 指定者:
mouseReleased
在接口中ContainerEventHandler
- 指定者:
mouseReleased
在接口中GuiEventListener
-
getBarHeight
private int getBarHeight() -
mouseDragged
public boolean mouseDragged(double mouseX, double mouseY, int button, double deltaX, double deltaY) - 指定者:
mouseDragged
在接口中ContainerEventHandler
- 指定者:
mouseDragged
在接口中GuiEventListener
-
render
- 指定者:
render
在接口中Renderable
-
drawGradientRect
protected void drawGradientRect(GuiGraphics guiGraphics, int left, int top, int right, int bottom, int color1, int color2) -
children
- 指定者:
children
在接口中ContainerEventHandler
-