Class NullOptions
java.lang.Object
me.desht.pneumaticcraft.client.gui.pneumatic_armor.options.NullOptions
- All Implemented Interfaces:
IOptionPage
Special "empty" options page for the case where there are no upgrade screens at all.
Should not normally happen since core components page should always be visible, but
just to be safe...
-
Nested Class Summary
Nested classes/interfaces inherited from interface me.desht.pneumaticcraft.api.client.pneumatic_helmet.IOptionPage
IOptionPage.SimpleOptionPage<T extends IArmorUpgradeClientHandler<?>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanShould the "Settings" header be displayed?static NullOptionsget(ArmorMainScreen guiArmorMainScreen) Get the client upgrade handler that this screen is for.Get a reference to the IGuiScreen object.net.minecraft.network.chat.MutableComponentThis text is used in the GUI button for this page.booleanCan this upgrade be toggled on & off? If true, a checkbox (with the ability to bind a key) will be automatically displayed in this upgrade's GUI.booleankeyPressed(int keyCode, int scanCode, int modifiers) Called byScreen.keyPressed(int, int, int)when a key is pressed.booleankeyReleased(int keyCode, int scanCode, int modifiers) Called byContainerEventHandler.keyReleased(int, int, int)when a key is released.booleanmouseClicked(double x, double y, int button) Called when mouse is clicked viaContainerEventHandler.mouseClicked(double, double, int)booleanmouseDragged(double mouseX, double mouseY, int button, double dragX, double dragY) Called when the mouse is dragged across the GUIbooleanmouseScrolled(double x, double y, double dir) Called when the mouse wheel is rolled.voidpopulateGui(IGuiScreen gui) Here you can initialize your buttons and stuff like with aScreen.voidrenderPost(net.minecraft.client.gui.GuiGraphics graphics, int x, int y, float partialTicks) Called immediately afterScreen.render(GuiGraphics, int, int, float)Here you can render additional things like text.voidrenderPre(net.minecraft.client.gui.GuiGraphics graphics, int x, int y, float partialTicks) Called immediately beforeScreen.render(GuiGraphics, int, int, float)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface me.desht.pneumaticcraft.api.client.pneumatic_helmet.IOptionPage
getKeybindingButton, settingsYposition, tick
-
Constructor Details
-
NullOptions
-
-
Method Details
-
get
-
getGuiScreen
Description copied from interface:IOptionPageGet a reference to the IGuiScreen object. You can use this to get the font renderer, for example.- Specified by:
getGuiScreenin interfaceIOptionPage- Returns:
- the screen
-
getPageName
public net.minecraft.network.chat.MutableComponent getPageName()Description copied from interface:IOptionPageThis text is used in the GUI button for this page.- Specified by:
getPageNamein interfaceIOptionPage- Returns:
- the page name
-
populateGui
Description copied from interface:IOptionPageHere you can initialize your buttons and stuff like with aScreen.- Specified by:
populateGuiin interfaceIOptionPage- Parameters:
gui- the holding GUI
-
renderPre
public void renderPre(net.minecraft.client.gui.GuiGraphics graphics, int x, int y, float partialTicks) Description copied from interface:IOptionPageCalled immediately beforeScreen.render(GuiGraphics, int, int, float)- Specified by:
renderPrein interfaceIOptionPage- Parameters:
graphics- the GUI draw contextx- mouse Xy- mouse YpartialTicks- partial ticks since last world ticks
-
renderPost
public void renderPost(net.minecraft.client.gui.GuiGraphics graphics, int x, int y, float partialTicks) Description copied from interface:IOptionPageCalled immediately afterScreen.render(GuiGraphics, int, int, float)Here you can render additional things like text.- Specified by:
renderPostin interfaceIOptionPage- Parameters:
graphics- the GUI draw contextx- mouse Xy- mouse YpartialTicks- partial ticks since last world ticks
-
keyPressed
public boolean keyPressed(int keyCode, int scanCode, int modifiers) Description copied from interface:IOptionPageCalled byScreen.keyPressed(int, int, int)when a key is pressed.- Specified by:
keyPressedin interfaceIOptionPage- Parameters:
keyCode- typed keycodescanCode- the scan code (rarely useful)modifiers- key modifiers- Returns:
- true if the event has been handled, false otherwise
-
keyReleased
public boolean keyReleased(int keyCode, int scanCode, int modifiers) Description copied from interface:IOptionPageCalled byContainerEventHandler.keyReleased(int, int, int)when a key is released.- Specified by:
keyReleasedin interfaceIOptionPage- Parameters:
keyCode- typed keycodescanCode- the scan code (rarely useful)modifiers- key modifiers- Returns:
- true if the event has been handled, false otherwise
-
mouseClicked
public boolean mouseClicked(double x, double y, int button) Description copied from interface:IOptionPageCalled when mouse is clicked viaContainerEventHandler.mouseClicked(double, double, int)- Specified by:
mouseClickedin interfaceIOptionPage- Parameters:
x- mouse Xy- mouse Ybutton- mouse button- Returns:
- true if the event has been handled, false otherwise
-
mouseScrolled
public boolean mouseScrolled(double x, double y, double dir) Description copied from interface:IOptionPageCalled when the mouse wheel is rolled.- Specified by:
mouseScrolledin interfaceIOptionPage- Parameters:
x- mouse Xy- mouse Ydir- scroll direction- Returns:
- true if the event has been handled, false otherwise
-
mouseDragged
public boolean mouseDragged(double mouseX, double mouseY, int button, double dragX, double dragY) Description copied from interface:IOptionPageCalled when the mouse is dragged across the GUI- Specified by:
mouseDraggedin interfaceIOptionPage- Parameters:
mouseX- mouse XmouseY- mouse Ybutton- mouse buttondragX- drag XdragY- drag Y- Returns:
- true if the event has been handled, false otherwise
-
isToggleable
public boolean isToggleable()Description copied from interface:IOptionPageCan this upgrade be toggled on & off? If true, a checkbox (with the ability to bind a key) will be automatically displayed in this upgrade's GUI.- Specified by:
isToggleablein interfaceIOptionPage- Returns:
- true if the upgrade is toggleable, false otherwise
-
displaySettingsHeader
public boolean displaySettingsHeader()Description copied from interface:IOptionPageShould the "Settings" header be displayed?- Specified by:
displaySettingsHeaderin interfaceIOptionPage- Returns:
- true if the header should be displayed, false otherwise
-
getClientUpgradeHandler
Description copied from interface:IOptionPageGet the client upgrade handler that this screen is for.- Specified by:
getClientUpgradeHandlerin interfaceIOptionPage- Returns:
- the client upgrade handler
-