Game.Settings.SettingsUIButtonGroupAttribute
Assembly:
Assembly-CSharp.dll
Namespace: Game.Settings
Type: class
Base: System.Attribute
Summary:
Attribute used to mark a settings property as belonging to a named UI button group. Apply this attribute to properties (typically in a settings container or view-model) to indicate the grouping name the UI should use when rendering or organizing related buttons.
Fields
public readonly string name
Holds the group identifier provided when the attribute is applied. This string is intended to be used by the settings UI code to group buttons together (for example, to show them in the same visual group or handle them as a set).
Properties
- (none)
This attribute exposes no properties; it only exposes the readonly field set by the constructor.
Constructors
public SettingsUIButtonGroupAttribute(string name)
Creates a new instance of the attribute and stores the provided group name in the readonlyname
field. The attribute is restricted to be used on properties (see AttributeUsage).
Methods
- (none)
The attribute type contains no methods beyond those inherited from System.Attribute.
Usage Example
using Game.Settings;
public class MySettings
{
// This property is marked as belonging to the "export" button group.
[SettingsUIButtonGroup("export")]
public bool ExportButtonVisible { get; set; }
// Alternatively, attribute class name can be used explicitly:
[SettingsUIButtonGroupAttribute("import")]
public bool ImportButtonVisible { get; set; }
}