AutoSizeActionButtonUI

TOCK by NullSave\Input Cog\Scripts\Support\AutoSizeActionButtonUI.cs

Description

Ties a set of visual elements to a PlatformControllerAction to visually represent the correct input regardless of what PlatformController is currently being used.

This is only updated at start and when a controller changes, by subscribing to the InputCog controllerChanged event. All items are checked for null, so use only the elements you wish. Elements are automatically sized to fit contents.

Properties

Action Name Name of PlatformControllerAction to watch.
Icon Size ActionUISize of image to display.
Spacing Horizontal spacing between elements
Key Format When the PlatformControllerInput is a KeyCode {0} will be replaced with the name of KeyCode.
Action Text Text element to display name of action.
Keyboard Key Text Text element to display keyboard text.
Input Sprite Image element to display sprite.
Input Background Image element to display sprite background.
Input Text Text element to display sprite text.