public class DropDownManager
extends java.lang.Object
DropDown
on a screen.Constructor and Description |
---|
DropDownManager() |
Modifier and Type | Method and Description |
---|---|
void |
addDropDown(DropDown dropDown)
Adds a drop-down menu to the manager.
|
void |
clearDropDowns()
Removes all drop-down menus from the manager.
|
void |
drawDropDowns(com.mojang.blaze3d.matrix.MatrixStack matrix,
float partialTicks,
int mouseX,
int mouseY)
Draws each active drop-down menu and handles mouse inputs.
|
boolean |
isMouseOver(int mouseX,
int mouseY)
Checks if the mouse is over any drop-down menus.
|
boolean |
mouseClicked(double mouseX,
double mouseY,
int mouseButton)
Focuses or unfocuses drop-down menus when the mouse is clicked.
|
boolean |
mouseScrolled(double mouseX,
double mouseY,
double delta) |
void |
removeDropDown(DropDown dropDown)
Removes a drop-down menu from the manager.
|
public void drawDropDowns(com.mojang.blaze3d.matrix.MatrixStack matrix, float partialTicks, int mouseX, int mouseY)
partialTicks
- The current number of partial ticks.mouseX
- The mouse's x coordinate.mouseY
- The mouse's y coordinate.public boolean mouseClicked(double mouseX, double mouseY, int mouseButton)
mouseX
- The mouse's x coordinate.mouseY
- The mouse's y coordinate.mouseButton
- The index of the clicked mouse button.public boolean mouseScrolled(double mouseX, double mouseY, double delta)
public void addDropDown(DropDown dropDown)
dropDown
- The drop-down menu to add.public void removeDropDown(DropDown dropDown)
dropDown
- The drop-down menu to remove.public void clearDropDowns()
public boolean isMouseOver(int mouseX, int mouseY)
mouseX
- The x coordinate of the mouse.mouseY
- The y coordinate of the mouse.