simonoliver / InputSystemActionPrompts

Automatically set controller prompts in text and icons in your Unity game UI.
MIT License
84 stars 10 forks source link

Feat: add a list of Custom Sprites for each devices. Add bool 'setNativeSize' in PromptImage #11

Closed xick closed 11 months ago

xick commented 12 months ago

This will add a list of custom sprites that can be defined for each device. Then each can be called by the entry name with the script 'DeviceSpriteSwap' that will automatically swap an Image based on the connected device. This is useful e.g. for a Gamepad image. This pull request also introduce a bool 'setNativeSize' for PromptIcon. Actually it's always set to native size, which is not always desirable. image image

simonoliver commented 11 months ago

Hey thanks for the contribution - this is a great addition. Do you happen to have any example images to use for included controllers? Future work could be really nice to have a system that also includes prefab UI elements with a marker for each button so that UIs can be generated automatically for config etc.

xick commented 11 months ago

Thanks to you for open source releasing such a great asset! Unfortunately it's very hard to find cc images, there are fews on platform like freepik but at least requires attribution. Also official platform specific controllers vectors aren't public domain or requires special permission afaik. I was thinking too on a way to inverse retrieving the associated binding for a key. Something like you specify the key 'space' and you get one or all possible bindings. With this should be possible to dynamically populate a controller/keyboard with non static bindings description (also allowing remapping )