Class BookEditScreen

All Implemented Interfaces:
ContainerEventHandler, GuiEventListener, Widget

public class BookEditScreen extends Screen
  • Field Details

  • Constructor Details

  • Method Details

    • setClipboard

      private void setClipboard(String p_98148_)
    • getClipboard

      private String getClipboard()
    • getNumPages

      private int getNumPages()
    • tick

      public void tick()
      Overrides:
      tick in class Screen
    • init

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

      private void pageBack()
    • pageForward

      private void pageForward()
    • removed

      public void removed()
      Overrides:
      removed in class Screen
    • updateButtonVisibility

      private void updateButtonVisibility()
    • eraseEmptyTrailingPages

      private void eraseEmptyTrailingPages()
    • saveChanges

      private void saveChanges(boolean p_98161_)
    • updateLocalCopy

      private void updateLocalCopy(boolean p_182575_)
    • appendPageToBook

      private void appendPageToBook()
    • keyPressed

      public boolean keyPressed(int p_98100_, int p_98101_, int p_98102_)
      Specified by:
      keyPressed in interface ContainerEventHandler
      Specified by:
      keyPressed in interface GuiEventListener
      Overrides:
      keyPressed in class Screen
    • charTyped

      public boolean charTyped(char p_98085_, int p_98086_)
    • bookKeyPressed

      private boolean bookKeyPressed(int p_98153_, int p_98154_, int p_98155_)
    • keyUp

      private void keyUp()
    • keyDown

      private void keyDown()
    • changeLine

      private void changeLine(int p_98098_)
    • keyHome

      private void keyHome()
    • keyEnd

      private void keyEnd()
    • titleKeyPressed

      private boolean titleKeyPressed(int p_98164_, int p_98165_, int p_98166_)
    • getCurrentPageText

      private String getCurrentPageText()
    • setCurrentPageText

      private void setCurrentPageText(String p_98159_)
    • render

      public void render(PoseStack p_98104_, int p_98105_, int p_98106_, float p_98107_)
      Specified by:
      render in interface Widget
      Overrides:
      render in class Screen
    • renderCursor

      private void renderCursor(PoseStack p_98109_, BookEditScreen.Pos2i p_98110_, boolean p_98111_)
    • renderHighlight

      private void renderHighlight(Rect2i[] p_98139_)
    • convertScreenToLocal

      private BookEditScreen.Pos2i convertScreenToLocal(BookEditScreen.Pos2i p_98115_)
    • convertLocalToScreen

      private BookEditScreen.Pos2i convertLocalToScreen(BookEditScreen.Pos2i p_98146_)
    • mouseClicked

      public boolean mouseClicked(double p_98088_, double p_98089_, int p_98090_)
    • selectWord

      private void selectWord(int p_98142_)
    • mouseDragged

      public boolean mouseDragged(double p_98092_, double p_98093_, int p_98094_, double p_98095_, double p_98096_)
    • getDisplayCache

      private BookEditScreen.DisplayCache getDisplayCache()
    • clearDisplayCache

      private void clearDisplayCache()
    • clearDisplayCacheAfterPageChange

      private void clearDisplayCacheAfterPageChange()
    • rebuildDisplayCache

      private BookEditScreen.DisplayCache rebuildDisplayCache()
    • findLineFromPos

      static int findLineFromPos(int[] p_98150_, int p_98151_)
    • createPartialLineSelection

      private Rect2i createPartialLineSelection(String p_98120_, StringSplitter p_98121_, int p_98122_, int p_98123_, int p_98124_, int p_98125_)
    • createSelection

      private Rect2i createSelection(BookEditScreen.Pos2i p_98117_, BookEditScreen.Pos2i p_98118_)