Class TextFieldScreenAddon

java.lang.Object
com.hrznstudio.titanium.client.screen.addon.BasicScreenAddon
com.hrznstudio.titanium.client.screen.addon.TextFieldScreenAddon
All Implemented Interfaces:
IScreenAddon, net.minecraft.client.gui.components.events.GuiEventListener, net.minecraft.client.gui.components.TabOrderedElement

public class TextFieldScreenAddon extends BasicScreenAddon
  • Constructor Details

    • TextFieldScreenAddon

      public TextFieldScreenAddon(int posX, int posY)
  • Method Details

    • drawBackgroundLayer

      public void drawBackgroundLayer(net.minecraft.client.gui.GuiGraphics guiGraphics, net.minecraft.client.gui.screens.Screen screen, IAssetProvider provider, int guiX, int guiY, int mouseX, int mouseY, float partialTicks)
      Description copied from interface: IScreenAddon
      Draws the component in the background layer
      screen - The current open screen
      provider - The current asset provider used in the GUI
      guiX - The gui X in the top left corner
      guiY - The gui Y in the top left corner
      mouseX - The current mouse X
      mouseY - The current mouse Y
      partialTicks - Partial ticks
    • drawForegroundLayer

      public void drawForegroundLayer(net.minecraft.client.gui.GuiGraphics guiGraphics, net.minecraft.client.gui.screens.Screen screen, IAssetProvider provider, int guiX, int guiY, int mouseX, int mouseY, float partialTicks)
      Description copied from interface: IScreenAddon
      Draws the component in the foreground layer
      screen - The current open screen
      provider - The current asset provider used in the GUI
      guiX - The gui X in the top left corner
      guiY - The gui Y in the top left corner
      mouseX - The current mouse X
      mouseY - The current mouse Y
      partialTicks - Partial Ticks
    • init

      public void init(int guiX, int guiY)
      Description copied from interface: IScreenAddon
      Called when init is called in the screen.
      Parameters:
      guiX - the left point of the Screen
      guiY - the top point of the Screen
    • isMouseOver

      public boolean isMouseOver(double mouseX, double mouseY)
      Description copied from interface: IScreenAddon
      Checks whether the mouse if over a specific object or point
      Specified by:
      isMouseOver in interface net.minecraft.client.gui.components.events.GuiEventListener
      Specified by:
      isMouseOver in interface IScreenAddon
      Overrides:
      isMouseOver in class BasicScreenAddon
      Parameters:
      mouseX - The X position of the mouse
      mouseY - The Y position of the mouse
      Returns:
      Returns true if the mouse if over a specific object or point
    • getXSize

      public int getXSize()
      Specified by:
      getXSize in class BasicScreenAddon
    • getYSize

      public int getYSize()
      Specified by:
      getYSize in class BasicScreenAddon
    • setActive

      public void setActive(boolean active)
    • keyPressed

      public boolean keyPressed(int key, int scan, int modifiers)
      Description copied from interface: IScreenAddon
      Called when a key is pressed
      Parameters:
      key - The keyboard key that was pressed or released
      scan - The system-specific scancode of the key
      modifiers - The 'bitfield' describing which modifiers keys were held down (ctrl, alt, shift, etc)
      Returns:
      Returns true if the key press was handled
    • getGuiListener

      public net.minecraft.client.gui.components.events.GuiEventListener getGuiListener()
    • getText

      public String getText()