public abstract class DropDownScreen
extends net.minecraft.client.gui.screen.Screen
| Modifier and Type | Field and Description |
|---|---|
protected DropDownManager |
dropDownManager
The drop-down manager for the screen.
|
protected int |
guiLeft
Starting X position for the Gui.
|
protected int |
guiTop
Starting Y position for the Gui.
|
protected int |
xSize |
protected int |
ySize
The Y size of the inventory window in pixels.
|
| Modifier | Constructor and Description |
|---|---|
protected |
DropDownScreen(net.minecraft.util.text.ITextComponent title)
Initializes a container.
|
| Modifier and Type | Method and Description |
|---|---|
<T> DropDown<T> |
addDropDown(DropDown<T> dropDown)
Adds a drop-down menu to the screen.
|
protected boolean |
disableMenus()
Checks if drop-down menus are disabled and uninteractable.
|
protected abstract void |
drawBackgroundUnderMenus(com.mojang.blaze3d.matrix.MatrixStack matrix,
float partialTicks,
int mouseX,
int mouseY)
Draws the screen background under the drop-down menus.
|
protected void |
drawGuiContainerBackgroundLayer(com.mojang.blaze3d.matrix.MatrixStack matrix,
float partialTicks,
int mouseX,
int mouseY) |
protected void |
drawGuiContainerForegroundLayer(com.mojang.blaze3d.matrix.MatrixStack matrix,
int mouseX,
int mouseY) |
void |
init() |
boolean |
isPauseScreen() |
boolean |
mouseClicked(double mouseX,
double mouseY,
int button) |
boolean |
mouseClickedUnderMenus(double mouseX,
double mouseY,
int button)
Handles mouse input when a drop-down menu is not clicked.
|
boolean |
mouseDragged(double p_231045_1_,
double p_231045_3_,
int p_231045_5_,
double p_231045_6_,
double p_231045_8_) |
boolean |
mouseScrolled(double mouseX,
double mouseY,
double delta) |
void |
removeDropDown(DropDown<?> dropDown)
Removes a drop-down menu from the screen.
|
void |
render(com.mojang.blaze3d.matrix.MatrixStack matrix,
int mouseX,
int mouseY,
float partialTicks) |
addButton, addWidget, children, getMinecraft, getNarrationMessage, getTitle, getTooltipFromItem, handleComponentClicked, hasAltDown, hasControlDown, hasShiftDown, init, insertText, isCopy, isCut, isMouseOver, isPaste, isSelectAll, isValidCharacterForName, keyPressed, onClose, onFilesDrop, removed, renderBackground, renderBackground, renderComponentHoverEffect, renderComponentTooltip, renderDirtBackground, renderTooltip, renderTooltip, renderTooltip, renderToolTip, renderWrappedToolTip, resize, sendMessage, sendMessage, shouldCloseOnEsc, tick, wrapScreenErrorgetFocused, isDragging, setDragging, setFocusedblit, blit, blit, blit, blit, blitOutlineBlack, drawCenteredString, drawCenteredString, drawString, drawString, fill, fillGradient, fillGradient, getBlitOffset, hLine, setBlitOffset, vLineclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprotected int xSize
protected int ySize
protected int guiLeft
protected int guiTop
protected final DropDownManager dropDownManager
protected DropDownScreen(net.minecraft.util.text.ITextComponent title)
public void init()
init in class net.minecraft.client.gui.screen.Screenpublic void render(com.mojang.blaze3d.matrix.MatrixStack matrix,
int mouseX,
int mouseY,
float partialTicks)
render in interface net.minecraft.client.gui.IRenderablerender in class net.minecraft.client.gui.screen.Screenprotected void drawGuiContainerForegroundLayer(com.mojang.blaze3d.matrix.MatrixStack matrix,
int mouseX,
int mouseY)
protected void drawGuiContainerBackgroundLayer(com.mojang.blaze3d.matrix.MatrixStack matrix,
float partialTicks,
int mouseX,
int mouseY)
protected abstract void drawBackgroundUnderMenus(com.mojang.blaze3d.matrix.MatrixStack matrix,
float partialTicks,
int mouseX,
int mouseY)
partialTicks - The current number of partial ticks.mouseX - The x coordinate of the mouse.mouseY - The y coordinate of the mouse.public boolean mouseClicked(double mouseX,
double mouseY,
int button)
public boolean mouseDragged(double p_231045_1_,
double p_231045_3_,
int p_231045_5_,
double p_231045_6_,
double p_231045_8_)
public boolean mouseScrolled(double mouseX,
double mouseY,
double delta)
public boolean mouseClickedUnderMenus(double mouseX,
double mouseY,
int button)
mouseX - The x coordinate of the mouse.mouseY - The y coordinate of the mouse.button - The index of the clicked button.public <T> DropDown<T> addDropDown(DropDown<T> dropDown)
dropDown - The drop-down menu to add.public void removeDropDown(DropDown<?> dropDown)
dropDown - The drop-down menu to remove.protected boolean disableMenus()
public boolean isPauseScreen()
isPauseScreen in class net.minecraft.client.gui.screen.Screen