Skip to content

Game.Settings.SettingsUIConfirmationAttribute

Assembly: Assembly-CSharp.dll
Namespace: Game.Settings

Type: class

Base: System.Attribute

Summary:
Attribute used to mark a settings UI element that requires user confirmation when changed. It allows specifying either a localization ID for the confirmation message or a literal override message string (or both). When present, the settings UI should present a confirmation dialog using the provided message id (for localized text) or the provided message value.


Fields

  • public readonly string confirmMessageValue
    Holds an optional literal override message text to display in the confirmation dialog. If set, this string should be used directly as the dialog message (bypassing localization).

  • public readonly string confirmMessageId
    Holds an optional localization key (ID) for the confirmation message. If set, the UI should look up the localized message using this key. If both fields are provided, confirmMessageValue typically takes precedence for display.

Properties

  • None.
    This attribute exposes no properties; message data are provided via public readonly fields.

Constructors

  • public SettingsUIConfirmationAttribute(string overrideConfirmMessageId = null, string overrideConfirmMessageValue = null)
    Creates a new SettingsUIConfirmationAttribute. Parameters:
  • overrideConfirmMessageId: optional localization key for the confirmation message.
  • overrideConfirmMessageValue: optional literal message string to display.

Methods

  • None.
    This attribute only stores metadata and does not define behavior or methods.

Usage Example

// Use a localization key for the confirmation message:
[SettingsUIConfirmation("settings.confirm.reset")]
public bool ResetProgress { get; set; }

// Use a literal override message:
[SettingsUIConfirmation(null, "Are you sure you want to reset your progress? This cannot be undone.")]
public bool ResetProgress { get; set; }