Class ConfirmScreen

All Implemented Interfaces:
ContainerEventHandler, GuiEventListener, Widget
Direct Known Subclasses:
ConfirmLinkScreen

public class ConfirmScreen extends Screen
  • Field Details

    • MARGIN

      private static final int MARGIN
      See Also:
    • message

      private final Component message
    • multilineMessage

      private MultiLineLabel multilineMessage
    • yesButton

      protected Component yesButton
    • noButton

      protected Component noButton
    • delayTicker

      private int delayTicker
    • callback

      protected final it.unimi.dsi.fastutil.booleans.BooleanConsumer callback
    • exitButtons

      private final List<Button> exitButtons
  • 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
    • addButtons

      protected void addButtons(int p_169252_)
    • addExitButton

      protected void addExitButton(Button p_169254_)
    • render

      public void render(PoseStack p_95670_, int p_95671_, int p_95672_, float p_95673_)
      Specified by:
      render in interface Widget
      Overrides:
      render in class Screen
    • titleTop

      private int titleTop()
    • messageTop

      private int messageTop()
    • messageHeight

      private int messageHeight()
    • setDelay

      public void setDelay(int p_95664_)
    • tick

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

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

      public boolean keyPressed(int p_95666_, int p_95667_, int p_95668_)
      Specified by:
      keyPressed in interface ContainerEventHandler
      Specified by:
      keyPressed in interface GuiEventListener
      Overrides:
      keyPressed in class Screen