Class GenericWaitingScreen

All Implemented Interfaces:
ContainerEventHandler, GuiEventListener, Renderable, TabOrderedElement

public class GenericWaitingScreen extends Screen
  • Field Details

    • TITLE_Y

      private static final int TITLE_Y
      See Also:
    • MESSAGE_Y

      private static final int MESSAGE_Y
      See Also:
    • MESSAGE_MAX_WIDTH

      private static final int MESSAGE_MAX_WIDTH
      See Also:
    • messageText

      @Nullable private final Component messageText
    • buttonLabel

      private final Component buttonLabel
    • buttonCallback

      private final Runnable buttonCallback
    • message

      @Nullable private MultiLineLabel message
    • button

      private Button button
    • disableButtonTicks

      private int disableButtonTicks
  • Constructor Details

    • GenericWaitingScreen

      protected GenericWaitingScreen(Component pTitle, @Nullable Component pMessageText, Component pButtonLabel, Runnable pButtonCallback, int pDisableButtonTicks)
  • Method Details

    • createWaiting

      public static GenericWaitingScreen createWaiting(Component pTitle, Component pButtonLabel, Runnable pButtonCallback)
    • createCompleted

      public static GenericWaitingScreen createCompleted(Component pTitle, Component pMessageText, Component pButtonLabel, Runnable pButtonCallback)
    • init

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

      public void tick()
      Overrides:
      tick in class Screen
    • 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.
    • shouldCloseOnEsc

      public boolean shouldCloseOnEsc()
      Overrides:
      shouldCloseOnEsc in class Screen
    • onClose

      public void onClose()
      Overrides:
      onClose in class Screen
    • getNarrationMessage

      public Component getNarrationMessage()
      Overrides:
      getNarrationMessage in class Screen