Gears
API ReferenceAttributes

SettingListenerAttribute

Base for attributes that bind a static method to a setting's event. The setting path must be in the form "tabName.CategoryName.SettingName" for global settings and "CategoryName.SettingName" for world settings.

Abstract classNamespace GearsAPI.AttributesAssembly GearsAPI.dllSource
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
public abstract class SettingListenerAttribute : SettingPathAttribute

Write * as the setting name, as in "tabName.CategoryName.*" or "CategoryName.*", to bind the method to every setting in the category that fits it. Settings that do not fit, such as a value setting of a different T, are skipped without a log line. A path that fits no setting at all is reported. The wildcard expands when BindSettingsClass runs, so a setting created in the category later is not bound.

Inheritance: Object → Attribute → SettingPathAttribute → SettingListenerAttribute
Derived: SettingOnValueChangedAttribute · SettingOnAppliedAttribute · SettingOnSelectedChangedAttribute · SettingOnEnabledAttribute
Attributes: AttributeUsageAttribute

Constructors

SettingListenerAttribute(String)

protected SettingListenerAttribute(string settingPath)

Protected. Passes settingPath to the base constructor.

On this page