Class ImmersiveDialogSimple

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants

public class ImmersiveDialogSimple extends ImmersiveDialogCore
A generic immersive message dialog for providing information to the player in the campaign.

This dialog supports in-character (IC) and optional out-of-character (OOC) messages, enhancing the immersion of the game experience. It includes speaker information, a central message, and configurable buttons to interact with the dialog.

The use case for this dialog is any time you want to present information to the player, in an immersive manner, but don't need them to make any decisions and don't need access to any of the more advanced functionality offered by ImmersiveDialogCore

See Also:
  • Constructor Details

    • ImmersiveDialogSimple

      public ImmersiveDialogSimple(Campaign campaign, @Nullable Person leftSpeaker, @Nullable Person rightSpeaker, String centerMessage, @Nullable List<String> buttonLabels, @Nullable String outOfCharacterMessage, @Nullable ImageIcon imageIcon, boolean useVerticalLayout)
      Constructs a GenericImmersiveMessageDialog with the specified campaign, message details, and optional image and layout configuration.

      This dialog represents an immersive interaction, typically involving one or two characters "speaking" to the player. It provides a central message area, optional image display above the content, and customizable buttons for user interaction. The dialog is modal by default, blocking other interactions until it is closed.

      Parameters:
      campaign - The current game state, providing relevant campaign data.
      leftSpeaker - The Person appearing as the left speaker, or null if no speaker is displayed on the left side.
      rightSpeaker - The Person appearing as the right speaker, or null if no speaker is displayed on the right side.
      centerMessage - The primary message to be displayed in the center of the dialog. This typically conveys the main information or narrative of the dialog.
      buttonLabels - A List of custom button labels to display in the dialog. If the list is null, a default "Understood" button is displayed.
      outOfCharacterMessage - An optional out-of-character (OOC) message, or null if not applicable. This message is displayed outside the dialog's in-character context, usually to provide additional explanation or game-related information to the player.
      imageIcon - An optional ImageIcon, or null if not applicable. If specified, the image will appear above the center message to highlight or visually support the dialog's content. For example, it can represent a symbol, character, or important visual cue.
      useVerticalLayout - A boolean flag indicating whether to use a vertical layout. If true, the buttons are stacked vertically; otherwise, they are arranged side-by-side.