Class InputGlyphs
Static class containing methods and properties to conveniently get Sprite and string information about Rewired input actions through Glyph queries.
Inherited Members
Namespace: LMirman.RewiredGlyphs
Assembly: .dll
Syntax
public static class InputGlyphs
Remarks
Requires the RewiredGlyphManager component to be added to your Rewired Input Manager
for the InputGlyphs system to function properly.
Common Query Functions
- GetCurrentGlyph(Rewired.Player,int,Rewired.Pole,out Rewired.AxisRange,bool,string): Get glyph to represent an action for the player's most recently used device
- GetSpecificCurrentGlyph(Rewired.Player,int,Rewired.Pole,out Rewired.AxisRange,LMirman.RewiredGlyphs.SymbolPreference,bool,string): Get glyph to represent an action for the player's most recently used device with hardware specific symbols
- GetGlyph(Rewired.Player,Rewired.ControllerType,int,Rewired.Pole,out Rewired.AxisRange,bool,string): Get glyph to represent an action for the player for a specific type of controller
- GetGlyphSet(Player, int, Pole, List<(Glyph, AxisRange)>, bool, SymbolPreference?, string): Outputs a list of all glyphs for a particular action for a player across all controller types
Other Useful Functionality - RebuildGlyphs: Event that is invoked when the output of Glyph queries may have changed (such as a user switching controller)
- LoadGlyphCollection(GlyphCollection, bool): Used for loading additional glyph collections and changing the default glyph collection
- SetGlyphPreferences(HardwarePreference, SymbolPreference): Set the preferred symbols to show for Joystick controllers and preferred type of controller to show glyphs for
- MarkGlyphsDirty(): Inform InputGlyphs that it should dispatch the RebuildGlyphs event next RewiredGlyphManager update.
Particularly important to use when Rewired data may have changed externally such as remapping controls
Properties
Name | Description |
---|---|
NullGlyph | Glyph representing an action that is invalid. Most commonly occurs due an invalid action name or action id. |
PreferredHardware | The preferred hardware (Controller or Mouse/Keyboard) to display in GetCurrentGlyph(int,Rewired.Pole,out Rewired.AxisRange,int,bool, string) |
PreferredSymbols | The preferred symbols to display for gamepad glyphs. |
UnboundGlyph | Glyph representing an action that does not have an input assigned. |
UninitializedGlyph | Glyph representing a query that occured before the InputGlyphs system was ready. |
Methods
Events
Name | Description |
---|---|
RebuildGlyphs | An event that is invoked when the output of the input glyph may have changed. This occurs usually when preferences are changed or the most recently used device by a player has changed. |