Class KeybindSetting
- Namespace
- Exiled.API.Features.Core.UserSettings
- Assembly
- Exiled.API.dll
Represents a keybind setting.
public class KeybindSetting : SettingBase, IWrapper<ServerSpecificSettingBase>, IWrapper<SSKeybindSetting>
- Inheritance
-
KeybindSetting
- Inherited Members
- Extension Methods
Constructors
KeybindSetting(int, string, KeyCode, bool, bool, string, HeaderSetting, Action<Player, SettingBase>)
Initializes a new instance of the KeybindSetting class.
[Obsolete("Will be removed in Exiled 10 in favour of ctor with more params.")]
public KeybindSetting(int id, string label, KeyCode suggested, bool preventInteractionOnGUI, bool allowSpectatorTrigger, string hintDescription, HeaderSetting header, Action<Player, SettingBase> onChanged)
Parameters
idintlabelstringsuggestedKeyCodepreventInteractionOnGUIboolallowSpectatorTriggerboolhintDescriptionstringheaderHeaderSettingonChangedAction<Player, SettingBase>
KeybindSetting(int, string, KeyCode, bool, bool, string, byte, HeaderSetting, Action<Player, SettingBase>)
Initializes a new instance of the KeybindSetting class.
public KeybindSetting(int id, string label, KeyCode suggested, bool preventInteractionOnGUI = false, bool allowSpectatorTrigger = false, string hintDescription = "", byte collectionId = 255, HeaderSetting header = null, Action<Player, SettingBase> onChanged = null)
Parameters
idintlabelstringsuggestedKeyCodepreventInteractionOnGUIboolallowSpectatorTriggerboolhintDescriptionstringcollectionIdbyteheaderHeaderSettingonChangedAction<Player, SettingBase>
KeybindSetting(int, string, KeyCode, bool, string, HeaderSetting, Action<Player, SettingBase>)
Initializes a new instance of the KeybindSetting class.
[Obsolete("This method will be removed next major version because of a new feature. Use the constructor with \"CollectionId\" instead.")]
public KeybindSetting(int id, string label, KeyCode suggested, bool preventInteractionOnGUI, string hintDescription, HeaderSetting header, Action<Player, SettingBase> onChanged)
Parameters
idintlabelstringsuggestedKeyCodepreventInteractionOnGUIboolhintDescriptionstringheaderHeaderSettingonChangedAction<Player, SettingBase>
Properties
AllowSpectatorTrigger
Gets or sets a value indicating whether the interaction is prevented in spectator roles.
public bool AllowSpectatorTrigger { get; set; }
Property Value
Base
Gets the base UserSettings.ServerSpecific.SSKeybindSetting that this class is wrapping.
public SSKeybindSetting Base { get; }
Property Value
- SSKeybindSetting
IsPressed
Gets a value indicating whether the key is pressed.
public bool IsPressed { get; }
Property Value
KeyCode
Gets or sets the assigned key.
public KeyCode KeyCode { get; set; }
Property Value
- KeyCode
PreventInteractionOnGUI
Gets or sets a value indicating whether the interaction is prevented while player is in RA, Settings etc.
public bool PreventInteractionOnGUI { get; set; }
Property Value
Methods
ToString()
Returns a representation of this KeybindSetting.
public override string ToString()
Returns
- string
A string in human-readable format.