Skip to content

Game.UI.DialogTitle

Assembly: Assembly-CSharp
Namespace: Game.UI

Type: public static class

Base: System.Object

Summary:
Utility helper for constructing localization keys for dialog titles used by the game's UI. Provides a common constant for the "Warning" dialog title key and a method to build other dialog title keys using the "Common.DIALOG_TITLE[...]" format. Intended for use with the game's localization/text lookup system to obtain a localized title string for dialogs.


Fields

  • public const string kWarning = "Common.DIALOG_TITLE[Warning]"
    A predefined localization key for warning dialogs. Use this constant when you need the standardized "Warning" dialog title key (e.g., to pass to the localization/text system).

Properties

  • This class exposes no properties.
    It is a static utility class and therefore has no instance properties.

Constructors

  • static DialogTitle()
    Static classes cannot be instantiated; there is no public instance constructor. Any static initialization would be performed by the runtime; this class contains only compile-time constants and static methods, so no explicit static constructor is required.

Methods

  • public static string GetId(string value)
    Returns a localization key formatted as "Common.DIALOG_TITLE[]". Use this to generate dialog title keys for custom dialog types (for example, DialogTitle.GetId("Error") returns "Common.DIALOG_TITLE[Error]"). Note: the method performs simple string concatenation and does not validate or escape the provided value.

Usage Example

// Using the predefined warning key
string warningKey = DialogTitle.kWarning; // "Common.DIALOG_TITLE[Warning]"
// Example: lookup localized text (pseudo-code, depends on game's localization API)
string warningText = Locale.Get(warningKey);
myDialog.Title = warningText;

// Generating a custom dialog title key
string saveKey = DialogTitle.GetId("Saved"); // "Common.DIALOG_TITLE[Saved]"
string saveText = Locale.Get(saveKey);
myDialog.Title = saveText;