Skip to content

Game.UI.DismissibleConfirmationDialog

Assembly: Game
Namespace: Game.UI

Type: class

Base: ConfirmationDialogBase

Summary:
A simple confirmation dialog type that is explicitly dismissible. This class only customizes the dismissible behavior of the base confirmation dialog and exposes a constructor that forwards title, message and action labels to the base. It disables the "copy" button and passes a null value for the optional icon parameter when calling the base constructor. The class uses LocalizedString for all user-facing text and accepts nullable title and cancelAction parameters.


Fields

  • (none)
    This class declares no new instance fields; it relies entirely on behavior inherited from ConfirmationDialogBase.

Properties

  • protected override bool dismissible => true
    Overrides the base dialog's dismissible flag to allow the dialog to be dismissed (closed without choosing one of the explicit actions).

Constructors

  • public DismissibleConfirmationDialog(LocalizedString? title, LocalizedString message, LocalizedString confirmAction, LocalizedString? cancelAction, [CanBeNull] params LocalizedString[] otherActions)
    Creates a new dismissible confirmation dialog. Parameters:
  • title: optional LocalizedString for the dialog title (nullable).
  • message: LocalizedString for the dialog message/body.
  • confirmAction: LocalizedString for the primary/confirm button label.
  • cancelAction: optional LocalizedString for the cancel button label (nullable).
  • otherActions: optional additional action labels; marked with [CanBeNull] and variadic. The constructor forwards these values to the base constructor as: base(title, message, null, copyButton: false, confirmAction, cancelAction, otherActions).

Methods

  • (none)
    No additional methods are declared; all runtime behavior is inherited from ConfirmationDialogBase except for the overridden dismissible property.

Usage Example

// Example usage - create and show a dismissible confirmation dialog
var title = new LocalizedString("Confirm Action");
var message = new LocalizedString("Are you sure you want to proceed?");
var confirm = new LocalizedString("Yes");
var cancel = new LocalizedString("No");

var dialog = new DismissibleConfirmationDialog(title, message, confirm, cancel);
dialog.Show(); // Assuming the base class exposes a Show() method