Class ConfirmScreen

All Implemented Interfaces:
ContainerEventHandler, GuiEventListener, Renderable, TabOrderedElement
Direct Known Subclasses:
ClientCommonPacketListenerImpl.PackConfirmScreen, ConfigurationScreen.TooltipConfirmScreen, ConfirmLinkScreen, DeathScreen.TitleConfirmScreen, DialogScreen.WarningScreen

public class ConfirmScreen extends Screen
  • Field Details

    • message

      private final Component message
    • layout

      protected LinearLayout layout
    • yesButtonComponent

      protected Component yesButtonComponent
    • noButtonComponent

      protected Component noButtonComponent
    • yesButton

      @Nullable protected Button yesButton
      The text shown for the first button in GuiYesNo
    • noButton

      @Nullable protected Button noButton
      The text shown for the second button in GuiYesNo
    • delayTicker

      private int delayTicker
    • callback

      protected final it.unimi.dsi.fastutil.booleans.BooleanConsumer callback
  • Constructor Details

    • ConfirmScreen

      public ConfirmScreen(it.unimi.dsi.fastutil.booleans.BooleanConsumer p_95654_, Component p_95655_, Component p_95656_)
    • ConfirmScreen

      public ConfirmScreen(it.unimi.dsi.fastutil.booleans.BooleanConsumer p_95658_, Component p_95659_, Component p_95660_, Component p_95661_, Component p_95662_)
  • Method Details

    • getNarrationMessage

      public Component getNarrationMessage()
      Overrides:
      getNarrationMessage in class Screen
    • init

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

      protected void repositionElements()
      Overrides:
      repositionElements in class Screen
    • addAdditionalText

      protected void addAdditionalText()
    • addButtons

      protected void addButtons(LinearLayout pLayout)
    • setDelay

      public void setDelay(int pTicksUntilEnable)
      Sets the number of ticks to wait before enabling the buttons.
    • tick

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

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

      public boolean keyPressed(int pKeyCode, int pScanCode, int pModifiers)
      Description copied from class: Screen
      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.