Class IOptionPage.SimpleOptionPage<T extends IArmorUpgradeClientHandler<?>>

java.lang.Object
me.desht.pneumaticcraft.api.client.pneumatic_helmet.IOptionPage.SimpleOptionPage<T>
All Implemented Interfaces:
IOptionPage
Direct Known Subclasses:
AbstractSliderOptions, AirConditionerOptions, BlockTrackOptions, ChestplateLauncherOptions, CoordinateTrackerOptions, CoreComponentsOptions, DroneDebuggerOptions, EntityTrackOptions, HackOptions, KickOptions, SearchOptions
Enclosing interface:
IOptionPage

public static class IOptionPage.SimpleOptionPage<T extends IArmorUpgradeClientHandler<?>> extends Object implements IOptionPage
Convenience class for simple armor features with no additional settings.
  • 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
    SimpleOptionPage(IGuiScreen screen, T clientUpgradeHandler)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Should the "Settings" header be displayed?
    protected T
     
    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(com.mojang.blaze3d.vertex.PoseStack matrixStack, int x, int y, float partialTicks)
    Called immediately after Screen.render(PoseStack, int, int, float) Here you can render additional things like text.
    void
    renderPre(com.mojang.blaze3d.vertex.PoseStack matrixStack, int x, int y, float partialTicks)
    Called immediately before Screen.render(PoseStack, 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

    • SimpleOptionPage

      public SimpleOptionPage(IGuiScreen screen, T clientUpgradeHandler)
  • Method Details

    • getClientUpgradeHandler

      protected T getClientUpgradeHandler()
    • 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(com.mojang.blaze3d.vertex.PoseStack matrixStack, int x, int y, float partialTicks)
      Description copied from interface: IOptionPage
      Called immediately before Screen.render(PoseStack, int, int, float)
      Specified by:
      renderPre in interface IOptionPage
      Parameters:
      matrixStack - the matrix stack
      x - mouse X
      y - mouse Y
      partialTicks - partial ticks since last world ticks
    • renderPost

      public void renderPost(com.mojang.blaze3d.vertex.PoseStack matrixStack, int x, int y, float partialTicks)
      Description copied from interface: IOptionPage
      Called immediately after Screen.render(PoseStack, int, int, float) Here you can render additional things like text.
      Specified by:
      renderPost in interface IOptionPage
      Parameters:
      matrixStack - the matrix stack
      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
    • 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
    • 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
    • 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