Class UltimatumSidePickerDialog

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

public class UltimatumSidePickerDialog extends JDialog
The Oracle Console-styled picker for a Faction Standing ultimatum's decision.

Every side of the ultimatum, followed by going rogue as a Mercenary or a Pirate, is a card in a carousel. The player browses with the arrow buttons, the arrow keys, the chip row, or by clicking a neighboring card, and then commits. Browsing never commits anything. The player can instead ignore the ultimatum outright, with the "Ignore Ultimatum (GM)" button, which is always offered.

The dialog is modal: construct it, then read getSelectedChoice() or wasIgnored(). Closing it from the window frame leaves both unset.

Since:
0.51.01
See Also:
  • Constructor Details

    • UltimatumSidePickerDialog

      public UltimatumSidePickerDialog(@Nullable JFrame owner, UltimatumSidePickerDialog.PickerContent content)
      Builds and shows the picker. Returns once the player commits, ignores the ultimatum, or closes the window.
      Parameters:
      owner - the owning frame
      content - what the picker shows
      Since:
      0.51.01
  • Method Details

    • getSelectedChoice

      @Nullable public UltimatumSidePickerDialog.PickerChoice getSelectedChoice()
      Returns:
      the choice the player committed to, or null if they ignored the ultimatum or closed the window
      Since:
      0.51.01
    • wasIgnored

      public boolean wasIgnored()
      Returns:
      true if the player chose to ignore the ultimatum
      Since:
      0.51.01