java.lang.Object
me.desht.pneumaticcraft.client.gui.pneumatic_armor.options.NullOptions
All Implemented Interfaces:
IOptionPage

public class NullOptions extends Object implements 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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Should the "Settings" header be displayed?
    get(ArmorMainScreen guiArmorMainScreen)
     
    Get the client upgrade handler that this screen is for.
    Get a reference to the IGuiScreen object.
    net.minecraft.network.chat.MutableComponent
    This text is used in the GUI button for this page.
    boolean
    Can 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.
    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 ContainerEventHandler.keyReleased(int, int, int) when a key is released.
    boolean
    mouseClicked(double x, double y, int button)
    Called when mouse is clicked via ContainerEventHandler.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
    Here you can initialize your buttons and stuff like with a Screen.
    void
    renderPost(net.minecraft.client.gui.GuiGraphics graphics, int x, int y, float partialTicks)
    Called immediately after Screen.render(GuiGraphics, int, int, float) Here you can render additional things like text.
    void
    renderPre(net.minecraft.client.gui.GuiGraphics graphics, int x, int y, float partialTicks)
    Called immediately before Screen.render(GuiGraphics, int, int, float)

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface me.desht.pneumaticcraft.api.client.pneumatic_helmet.IOptionPage

    getKeybindingButton, settingsYposition, tick
  • Constructor Details

    • NullOptions

      public NullOptions(IGuiScreen screen)
  • Method Details

    • get

      public static NullOptions get(ArmorMainScreen guiArmorMainScreen)
    • getGuiScreen

      public IGuiScreen getGuiScreen()
      Description copied from interface: IOptionPage
      Get a reference to the IGuiScreen object. You can use this to get the font renderer, for example.
      Specified by:
      getGuiScreen in interface IOptionPage
      Returns:
      the screen
    • getPageName

      public net.minecraft.network.chat.MutableComponent getPageName()
      Description copied from interface: IOptionPage
      This text is used in the GUI button for this page.
      Specified by:
      getPageName in interface IOptionPage
      Returns:
      the page name
    • populateGui

      public void populateGui(IGuiScreen gui)
      Description copied from interface: IOptionPage
      Here you can initialize your buttons and stuff like with a Screen.
      Specified by:
      populateGui in interface IOptionPage
      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: IOptionPage
      Called immediately before Screen.render(GuiGraphics, int, int, float)
      Specified by:
      renderPre in interface IOptionPage
      Parameters:
      graphics - the GUI draw context
      x - mouse X
      y - mouse Y
      partialTicks - 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: IOptionPage
      Called immediately after Screen.render(GuiGraphics, int, int, float) Here you can render additional things like text.
      Specified by:
      renderPost in interface IOptionPage
      Parameters:
      graphics - the GUI draw context
      x - mouse X
      y - mouse Y
      partialTicks - partial ticks since last world ticks
    • keyPressed

      public boolean keyPressed(int keyCode, int scanCode, int modifiers)
      Description copied from interface: IOptionPage
      Called by Screen.keyPressed(int, int, int) when a key is pressed.
      Specified by:
      keyPressed in interface IOptionPage
      Parameters:
      keyCode - typed keycode
      scanCode - 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: IOptionPage
      Called by ContainerEventHandler.keyReleased(int, int, int) when a key is released.
      Specified by:
      keyReleased in interface IOptionPage
      Parameters:
      keyCode - typed keycode
      scanCode - 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: IOptionPage
      Called when mouse is clicked via ContainerEventHandler.mouseClicked(double, double, int)
      Specified by:
      mouseClicked in interface IOptionPage
      Parameters:
      x - mouse X
      y - mouse Y
      button - 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: IOptionPage
      Called when the mouse wheel is rolled.
      Specified by:
      mouseScrolled in interface IOptionPage
      Parameters:
      x - mouse X
      y - mouse Y
      dir - 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: IOptionPage
      Called when the mouse is dragged across the GUI
      Specified by:
      mouseDragged in interface IOptionPage
      Parameters:
      mouseX - mouse X
      mouseY - mouse Y
      button - mouse button
      dragX - drag X
      dragY - drag Y
      Returns:
      true if the event has been handled, false otherwise
    • isToggleable

      public boolean isToggleable()
      Description copied from interface: IOptionPage
      Can 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:
      isToggleable in interface IOptionPage
      Returns:
      true if the upgrade is toggleable, false otherwise
    • displaySettingsHeader

      public boolean displaySettingsHeader()
      Description copied from interface: IOptionPage
      Should the "Settings" header be displayed?
      Specified by:
      displaySettingsHeader in interface IOptionPage
      Returns:
      true if the header should be displayed, false otherwise
    • getClientUpgradeHandler

      public IArmorUpgradeClientHandler<?> getClientUpgradeHandler()
      Description copied from interface: IOptionPage
      Get the client upgrade handler that this screen is for.
      Specified by:
      getClientUpgradeHandler in interface IOptionPage
      Returns:
      the client upgrade handler