Rewired Glyphs Docs Rewired Glyphs Docs
Rewired Glyphs Docs Rewired Glyphs Docs
Rewired Glyphs

Search Results for

    Class InputGlyphs

    Static class containing methods and properties to conveniently get Sprite and string information about Rewired input actions through Glyph queries.

    Inheritance
    object
    InputGlyphs
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    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

    Name Description
    FlushPlayersCache()

    Clear out the player cache of the input glyph system.

    GetCurrentGlyph(Player, int, Pole, out AxisRange, bool, string)
    GetCurrentGlyph(int, Pole, out AxisRange, int, bool, string)
    GetGlyph(ControllerType, int, Pole, out AxisRange, int, bool, string)
    GetGlyph(Player, ControllerType, int, Pole, out AxisRange, bool, string)

    Get a Glyph to represent an action for the user.

    Will pick an icon to represent the controllerType

    GetGlyphSet(Player, int, Pole, List<(Glyph, AxisRange)>, bool, SymbolPreference?, string)

    Get a list of all glyphs that could represent a particular action.

    GetJoystickGlyph(Player, int, Controller, Pole, out AxisRange, bool, string)

    Get a Glyph to represent an action for the user for the Joystick device.

    GetJoystickGlyph(int, Controller, Pole, out AxisRange, int, bool, string)
    GetKeyboardGlyph(Player, int, Pole, out AxisRange, bool, string)

    Get a Glyph to represent an action for the user for the Keyboard device.

    GetKeyboardGlyph(int, Pole, out AxisRange, int, bool, string)
    GetKeyboardMouseGlyph(Player, int, Pole, out AxisRange, bool, string)

    Get a Glyph to represent an action for the user for the mouse or keyboard devices (in that order).

    GetKeyboardMouseGlyph(int, Pole, out AxisRange, int, bool, string)
    GetMouseGlyph(Player, int, Pole, out AxisRange, bool, string)

    Get a Glyph to represent an action for the user for the Mouse device.

    GetMouseGlyph(int, Pole, out AxisRange, int, bool, string)
    GetNativeGlyphFromGuidMap(Controller, int, string)
    GetNativeGlyphFromGuidMap(ControllerType, Guid, int, string)
    GetNativeGlyphFromTemplateMap(SymbolPreference, int, string)

    Retrieve a SymbolPreference styled glyph for this templateElementID via the generic glyph mapping.

    GetSpecificCurrentGlyph(Player, int, Pole, out AxisRange, SymbolPreference, bool, string)

    Get a Glyph to represent an action for the user for the most recently used device.

    GetSpecificCurrentGlyph(int, Pole, out AxisRange, SymbolPreference, int, bool, string)
    GetSpecificGlyph(ControllerType, int, Pole, out AxisRange, SymbolPreference, int, bool, string)
    GetSpecificGlyph(Player, ControllerType, int, Pole, out AxisRange, SymbolPreference, bool, string)

    Get a Glyph to represent an action for the user.

    Will pick an icon to represent the controllerType

    GetSpecificJoystickGlyph(Player, int, Controller, Pole, out AxisRange, SymbolPreference, bool, string)

    Get a Glyph to represent an action for the user for the Joystick device with a specific SymbolPreference .

    GetSpecificJoystickGlyph(int, Controller, Pole, out AxisRange, SymbolPreference, int, bool, string)
    InvokeRebuild(bool)

    Will invoke RebuildGlyphs event when glyphs are dirty or forceRebuild parameter is true.

    LoadGlyphCollection(GlyphCollection, bool)

    Additively load a GlyphCollection into runtime memory on InputGlyphs, allowing it to be utilized by Glyph queries.

    Provides the setAsDefault parameter to determine if this glyph should be used as the primary (default) glyph collection for queries.

    MarkGlyphsDirty()

    Notify the glyph system that input state has changed and glyphs should be reevaluated.

    SetGlyphPreferences(HardwarePreference, SymbolPreference)

    Set the user preference for glyph display.

    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.

    See Also

    GetGlyphSet(Player, int, Pole, List<(Glyph, AxisRange)>, bool, SymbolPreference?, string)
    RebuildGlyphs
    LoadGlyphCollection(GlyphCollection, bool)
    SetGlyphPreferences(HardwarePreference, SymbolPreference)
    MarkGlyphsDirty()
    Docs generated for Rewired-Glyphs Unity Package. Package distributed under MIT license.