Game.UI.DialogAction
Assembly:
Assembly-CSharp (inferred — main game assembly where UI helpers typically reside)
Namespace:
Game.UI
Type:
public static class
Base:
System.Object (static classes are sealed and inherit from object)
Summary:
Utility holder for dialog action localization keys. This static class provides predefined constant keys for common dialog actions (Yes/No) and a helper to construct the standardized dialog-action key string for any arbitrary action name. These keys follow the pattern "Common.DIALOG_ACTION[
Fields
-
public const string kYes
Constant key for the "Yes" dialog action. Value: "Common.DIALOG_ACTION[Yes]". Use this when you need the localized/localization-key string for a confirmation/positive dialog action. -
public const string kNo
Constant key for the "No" dialog action. Value: "Common.DIALOG_ACTION[No]". Use this for negative/cancel dialog actions.
Properties
- None.
This static helper class does not expose any properties.
Constructors
- None (static class).
There are no instance constructors or explicit static constructors defined — the class is static and only contains constants and a static method.
Methods
public static string GetId(string value)
Builds and returns a dialog-action key string in the standard format: "Common.DIALOG_ACTION[]".
Parameters:- value: The action name to embed in the key (for example "Accept", "Cancel", "Retry").
Returns: - A formatted string to be used as the dialog action key.
Usage Example
// Using predefined constants
string yesKey = DialogAction.kYes; // "Common.DIALOG_ACTION[Yes]"
string noKey = DialogAction.kNo; // "Common.DIALOG_ACTION[No]"
// Generating a custom action key
string acceptKey = DialogAction.GetId("Accept"); // "Common.DIALOG_ACTION[Accept]"
// Example usage in dialog code (pseudo)
// dialog.AddButton(acceptKey, OnAccept);
// dialog.AddButton(DialogAction.kNo, OnCancel);