Interface DialogBase.Builder

Enclosing interface:
DialogBase

@NonExtendable public static interface DialogBase.Builder
Builder interface for creating dialog bases.
  • Method Details

    • externalTitle

      @Contract(value="_ -> this", mutates="this") DialogBase.Builder externalTitle(@Nullable Component externalTitle)
      Sets the external title of the dialog. This title is used on buttons that open this dialog.
      Parameters:
      externalTitle - the external title of the dialog, or null if not set
      Returns:
      this builder
    • canCloseWithEscape

      @Contract(value="_ -> this", mutates="this") DialogBase.Builder canCloseWithEscape(boolean canCloseWithEscape)
      Sets whether the dialog can be closed with the "escape" keybind.
      Parameters:
      canCloseWithEscape - if the dialog can be closed with "escape"
      Returns:
      this builder
    • pause

      @Contract(value="_ -> this", mutates="this") DialogBase.Builder pause(boolean pause)
      Sets whether the dialog should pause the game when opened (single-player only).
      Parameters:
      pause - if the dialog should pause the game
      Returns:
      this builder
    • afterAction

      @Contract(value="_ -> this", mutates="this") DialogBase.Builder afterAction(DialogBase.DialogAfterAction afterAction)
      Sets the action to take after the dialog is closed.
      Parameters:
      afterAction - the action to take after the dialog is closed
      Returns:
      this builder
    • body

      @Contract(value="_ -> this", mutates="this") DialogBase.Builder body(List<? extends DialogBody> body)
      Sets the body of the dialog.
      Parameters:
      body - the body of the dialog
      Returns:
      this builder
    • inputs

      @Contract(value="_ -> this", mutates="this") DialogBase.Builder inputs(List<? extends DialogInput> inputs)
      Sets the inputs of the dialog.
      Parameters:
      inputs - the inputs of the dialog
      Returns:
      this builder
    • build

      @Contract(pure=true, value="-> new") DialogBase build()
      Builds the dialog base.
      Returns:
      the built dialog base