Class BookSignScreen

All Implemented Interfaces:
ContainerEventHandler, GuiEventListener, Renderable, TabOrderedElement

public class BookSignScreen extends Screen
  • Field Details

    • EDIT_TITLE_LABEL

      private static final Component EDIT_TITLE_LABEL
    • FINALIZE_WARNING_LABEL

      private static final Component FINALIZE_WARNING_LABEL
    • TITLE

      private static final Component TITLE
    • TITLE_EDIT_BOX

      private static final Component TITLE_EDIT_BOX
    • bookEditScreen

      private final BookEditScreen bookEditScreen
    • owner

      private final Player owner
    • pages

      private final List<String> pages
    • hand

      private final InteractionHand hand
    • ownerText

      private final Component ownerText
    • titleBox

      private EditBox titleBox
    • titleValue

      private String titleValue
  • Constructor Details

  • Method Details

    • init

      protected void init()
      Overrides:
      init in class Screen
    • setInitialFocus

      protected void setInitialFocus()
      Overrides:
      setInitialFocus in class Screen
    • saveChanges

      private void saveChanges()
    • keyPressed

      public boolean keyPressed(int pKeyCode, int pScanCode, int pModifiers)
      Called when a keyboard key is pressed within the GUI element.

      Specified by:
      keyPressed in interface ContainerEventHandler
      Specified by:
      keyPressed in interface GuiEventListener
      Overrides:
      keyPressed in class Screen
      Parameters:
      pKeyCode - the key code of the pressed key.
      pScanCode - the scan code of the pressed key.
      pModifiers - the keyboard modifiers.
      Returns:
      true if the event is consumed, false otherwise.
    • render

      public void render(GuiGraphics pGuiGraphics, int pMouseX, int pMouseY, float pPartialTick)
      Renders the graphical user interface (GUI) element.
      Specified by:
      render in interface Renderable
      Overrides:
      render in class Screen
      Parameters:
      pGuiGraphics - the GuiGraphics object used for rendering.
      pMouseX - the x-coordinate of the mouse cursor.
      pMouseY - the y-coordinate of the mouse cursor.
      pPartialTick - the partial tick time.
    • renderBackground

      public void renderBackground(GuiGraphics pGuiGraphics, int pMouseX, int pMouseY, float pPartialTick)
      Overrides:
      renderBackground in class Screen