Click or drag to resize

ActionElementMap Class

Maps an Action to a Controller element.
Inheritance Hierarchy
SystemObject
  RewiredActionElementMap

Namespace:  Rewired
Assembly:  Rewired_Core (in Rewired_Core.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
[SerializableAttribute]
public sealed class ActionElementMap

The ActionElementMap type exposes the following members.

Constructors
  NameDescription
Public methodActionElementMap
Initializes a new instance of the ActionElementMap class
Public methodActionElementMap(ActionElementMap)
Initializes a new instance of the ActionElementMap class
Public methodActionElementMap(Int32, ControllerElementType, Int32)
Initializes a new instance of the ActionElementMap class
Public methodActionElementMap(Int32, ControllerElementType, Int32, Pole, AxisRange)
Initializes a new instance of the ActionElementMap class
Public methodActionElementMap(Int32, ControllerElementType, Int32, Pole, AxisRange, Boolean)
Initializes a new instance of the ActionElementMap class
Public methodActionElementMap(Int32, ControllerElementType, Pole, KeyboardKeyCode, ModifierKey, ModifierKey, ModifierKey)
Create an ActionElementMap for a keyboard key.
Top
Properties
  NameDescription
Public propertyactionDescriptiveName
Gets the descriptive name of the Action. For split axes, this will return the Positive or Negative Descriptive Name or the Descriptive Name with a +/- suffix. The returned value will be localized if localization is in use.
Public propertyactionId
Gets the id of the Action to which the element is bound.
Public propertyaxisContribution
The contribution to the Action's final value when queried as an axis. Describes how the binding contributes value to the Action when that Action is queried as an Axis. (Player.GetAxis()). Axis Contribution describes the Action, not the element. Axis Contribution is used to determine how button elements and split-axis element (one pole of an axis element) bindings contribute value to the Action's value when queried as an axis. Axis Contribution is not used when the Action is bound to a full-axis element. Instead invert is used to determine how the full-axis binding contributes value to the Action when queried as an axis.
Public propertyaxisRange
The range of the axis. Describes whether the Action is bound to the full, positive, or negative portion of the axis element. Axis Range describes the axis element, not the Action. Axis Range is not used when the Action is bound to a button element because buttons do not have a range of values or +/- poles. For Actions bound to buttons or only one pole of an axis, axisContribution.
Public propertyaxisType
The axis type. If this is an axis binding, this determines if it is full or split axis binding.
Public propertycontrollerMap
The parent Controller Map that contains this Action Element Map.
Public propertyelementIdentifierGlyph
The primary glyph for the element bound to the Action. If this is a keyboard binding, modifier keys may be in use, therefore you should use GetElementIdentifierGlyphs(ICollectionObject) instead to get the modifier key glyphs as well. You can check elementIdentifierGlyphCount to determine if this binding has more than one glyph to display. This will only return a glyph if a glyph provider is in use and a glyph has been defined for this element identifier.
Public propertyelementIdentifierGlyphCount
The number of glyphs for the element bound to the Action. If this is a keyboard binding and modifier keys are in use, the returned count will include the modifier key glyphs. This will only return a non-zero value if a glyph provider is in use and a glyph has been defined for this element identifier.
Public propertyelementIdentifierId
The controller element identifier id bound to the Action. Warning: Do not change this value during iteration of the list of element mappings in a Controller Map. If the element type changes based on the new element identifier id, the element mapping list will be changed resulting in an InvalidOperationException during iteration.
Public propertyelementIdentifierName
Gets the descriptive name of the element identifier bound to the Action. For split axes, this will return the Positive or Negative Descriptive Name or the Descriptive Name with a +/- suffix. The returned value will be localized if localization is in use.
Public propertyelementIndex
Gets the controller element index pointed to by this mapping.
Public propertyelementType
Gets the element type of the controller element bound to the Action.
Public propertyenabled
Is the Action Element Map enabled? Disabled maps will never return input.
Public propertyhasModifiers
Determines if any keyboard modifier keys are set. This only applies to keyboard bindings.
Public propertyid
Gets the unique runtime id of this ActionElementMap. This value is not consistent between game sessions, so do not store it.
Public propertyinvert
Is the axis inverted?
Public propertykeyboardKeyCode
The keyboard key code. Only used for keyboard bindings. Returns Rewired.KeyboardKeyCode value.
Public propertykeyCode
The keyboard key code. Only used for keyboard bindings. Returns UnityEngine.KeyCode value.
Public propertymodifierKey1
The first keyboard modifier key. Modifier keys should be set in ascending order because the modifier key list will be collapsed after a value is set.
Public propertymodifierKey2
The second keyboard modifier key. Modifier keys should be set in ascending order because the modifier key list will be collapsed after a value is set.
Public propertymodifierKey3
The third keyboard modifier key. Modifier keys should be set in ascending order because the modifier key list will be collapsed after a value is set.
Public propertymodifierKeyFlags
Flags representing all the assigned keyboard modifier keys.
Top
Methods
  NameDescription
Public methodCheckForAssignmentConflict(ActionElementMap)
Checks if there are any assignment conflicts between the incoming ActionElementMap and this map.
Public methodCheckForAssignmentConflict(ElementAssignment)
Checks if there are any assignment conflicts between the incoming ElementAssignment and this map.
Public methodGetElementIdentifierFinalGlyphKeys
Get final full glyph key paths for the element identfier(s) bound to the Action. If this is a keyboard binding and modifier keys are in use, modifier key glyphs will be returned first in the results and the primary key will be returned at the end of the list. If using modifier keys and any glyph is missing for either modifier keys or the primary key, no results will be returned. Glyphs will be added to the incoming results collection, so the results collection should normally be cleared before passing to this function. This will only return a glyph if a glyph provider is in use and a glyph has been defined for this element identifier.
Public methodGetElementIdentifierGlyphs(ICollectionObject)
Get glyphs for the element identfier(s) bound to the Action. If this is a keyboard binding and modifier keys are in use, modifier key glyphs will be returned first in the results and the primary key will be returned at the end of the list. If using modifier keys and any glyph is missing for either modifier keys or the primary key, no results will be returned. Glyphs will be added to the incoming results collection, so the results collection should normally be cleared before passing to this function. This will only return a glyph if a glyph provider is in use and a glyph has been defined for this element identifier.
Public methodGetElementIdentifierGlyphsT(ICollectionT)
Get glyphs for the element bound to the Action. If this is a keyboard binding and modifier keys are in use, modifier key glyphs will be returned first in the results and the primary key will be returned at the end of the list. If using modifier keys and any glyph is missing for either modifier keys or the primary key, no results will be returned. Glyphs will be added to the incoming results collection, so the results collection should normally be cleared before passing to this function. This will only return a glyph if a glyph provider is in use and a glyph has been defined for this element identifier.
Public methodIsTarget(ControllerElementTarget)
Is the Controller Element target mapped by this ActionElementMap?
Public methodIsTarget(IControllerElementTarget)
Is the Controller Element target mapped by this ActionElementMap?
Public methodShowInField
Should this Action Element Map be shown in a particular input field with the specified range? This makes it easy to determine whether to show this map in a full, positive, or negative input field when remapping controls.
Public methodToString (Overrides ObjectToString.)
Public methodStatic memberTryGetCombinedElementIdentifierFinalGlyphKey
Gets the combined final full glyph key path of the element identifiers bound to the Action if available. This can be used to get the key for an element that doesn't actually exist but is a sub-set of element members of a Compound Element. For example, when passing in two Action Element Maps that are bound buttons D-Pad Left and D-Pad Right, the glyph for D-Pad Horizontal will be returned if available. When passing in four Action Element Maps that are bound to all four buttons of a D-Pad, the key for D-Pad will be returned if available.
Public methodStatic memberTryGetCombinedElementIdentifierGlyph
Gets the combined glyph of the element identifiers bound to the Action if available. This can be used to get a glyph for an element that doesn't actually exist but is a sub-set of element members of a Compound Element. For example, when passing in two Action Element Maps that are bound buttons D-Pad Left and D-Pad Right, the glyph for D-Pad Horizontal will be returned if available. When passing in four Action Element Maps that are bound to all four buttons of a D-Pad, the glyph for D-Pad will be returned if available.
Public methodStatic memberTryGetCombinedElementIdentifierName
Gets the combined descriptive name of the element identifiers bound to the Action if available. This can be used to get a descriptive name of an element that doesn't actually exist but is a sub-set of element members of a Compound Element. For example, when passing in two Action Element Maps that are bound buttons D-Pad Left and D-Pad Right, "D-Pad Horizontal" will be returned. When passing in four Action Element Maps that are bound to all four buttons of a D-Pad, "D-Pad" will be returned. The returned value will be localized if localization is in use.
Top
See Also