public static class IOptionPage.SimpleOptionPage<T extends IArmorUpgradeClientHandler<?>> extends java.lang.Object implements IOptionPage
IOptionPage.SimpleOptionPage<T extends IArmorUpgradeClientHandler<?>>| Constructor and Description |
|---|
SimpleOptionPage(IGuiScreen screen,
T clientUpgradeHandler) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
displaySettingsHeader()
Should the "Settings" header be displayed?
|
protected T |
getClientUpgradeHandler() |
IGuiScreen |
getGuiScreen()
Get a reference to the IGuiScreen object.
|
net.minecraft.util.text.IFormattableTextComponent |
getPageName()
This text is used in the GUI button for this page.
|
boolean |
isToggleable()
Can this upgrade be toggled off & on? If true, a checkbox (with the ability to bind a key) will be
automatically displayed in this upgrade's GUI.
|
boolean |
keyPressed(int keyCode,
int scanCode,
int modifiers)
Called by
Screen.keyPressed(int, int, int) when a key is pressed. |
boolean |
keyReleased(int keyCode,
int scanCode,
int modifiers)
Called by
INestedGuiEventHandler.keyReleased(int, int, int) when a key is released. |
boolean |
mouseClicked(double x,
double y,
int button)
Called when mouse is clicked via
INestedGuiEventHandler.mouseClicked(double, double, int) |
boolean |
mouseDragged(double mouseX,
double mouseY,
int button,
double dragX,
double dragY)
Called when the mouse is dragged across the GUI
|
boolean |
mouseScrolled(double x,
double y,
double dir)
Called when the mouse wheel is rolled.
|
void |
populateGui(IGuiScreen gui)
Here you can initialize your buttons and stuff like with a
Screen. |
void |
renderPost(com.mojang.blaze3d.matrix.MatrixStack matrixStack,
int x,
int y,
float partialTicks)
Called immediately after
Screen.render(MatrixStack, int, int, float)
Here you can render additional things like text. |
void |
renderPre(com.mojang.blaze3d.matrix.MatrixStack matrixStack,
int x,
int y,
float partialTicks)
Called immediately before
Screen.render(MatrixStack, int, int, float) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetKeybindingButton, settingsYposition, tickpublic SimpleOptionPage(IGuiScreen screen, T clientUpgradeHandler)
protected T getClientUpgradeHandler()
public IGuiScreen getGuiScreen()
IOptionPagegetGuiScreen in interface IOptionPagepublic net.minecraft.util.text.IFormattableTextComponent getPageName()
IOptionPagegetPageName in interface IOptionPagepublic void populateGui(IGuiScreen gui)
IOptionPageScreen.populateGui in interface IOptionPagegui - the holding GUIpublic void renderPre(com.mojang.blaze3d.matrix.MatrixStack matrixStack,
int x,
int y,
float partialTicks)
IOptionPageScreen.render(MatrixStack, int, int, float)renderPre in interface IOptionPagematrixStack - the matrix stackx - mouse Xy - mouse YpartialTicks - partial ticks since last world tickspublic void renderPost(com.mojang.blaze3d.matrix.MatrixStack matrixStack,
int x,
int y,
float partialTicks)
IOptionPageScreen.render(MatrixStack, int, int, float)
Here you can render additional things like text.renderPost in interface IOptionPagematrixStack - the matrix stackx - mouse Xy - mouse YpartialTicks - partial ticks since last world tickspublic boolean keyPressed(int keyCode,
int scanCode,
int modifiers)
IOptionPageScreen.keyPressed(int, int, int) when a key is pressed.keyPressed in interface IOptionPagekeyCode - typed keycodescanCode - the scan code (rarely useful)modifiers - key modifierspublic boolean keyReleased(int keyCode,
int scanCode,
int modifiers)
IOptionPageINestedGuiEventHandler.keyReleased(int, int, int) when a key is released.keyReleased in interface IOptionPagekeyCode - typed keycodescanCode - the scan code (rarely useful)modifiers - key modifierspublic boolean mouseClicked(double x,
double y,
int button)
IOptionPageINestedGuiEventHandler.mouseClicked(double, double, int)mouseClicked in interface IOptionPagex - mouse Xy - mouse Ybutton - mouse buttonpublic boolean mouseDragged(double mouseX,
double mouseY,
int button,
double dragX,
double dragY)
IOptionPagemouseDragged in interface IOptionPagemouseX - mouse XmouseY - mouse Ybutton - mouse buttondragX - drag XdragY - drag Ypublic boolean mouseScrolled(double x,
double y,
double dir)
IOptionPagemouseScrolled in interface IOptionPagex - mouse Xy - mouse Ydir - scroll directionpublic boolean isToggleable()
IOptionPageisToggleable in interface IOptionPagepublic boolean displaySettingsHeader()
IOptionPagedisplaySettingsHeader in interface IOptionPage