quasilyte / ebitengine-input

A Godot-inspired action input handling system for Ebitengine
MIT License
66 stars 8 forks source link

Request: An example loading a key map from a file #6

Closed mcarpenter622 closed 1 year ago

mcarpenter622 commented 1 year ago

It would be awesome to see a small example where you load the key map from a file.

quasilyte commented 1 year ago

This is something I wanted to implement for a while now. I'll try to figure out a solution and share it here with you along with an example. Stay tuned.

quasilyte commented 1 year ago

https://github.com/quasilyte/ebitengine-input/blob/master/_examples/configfile/keymap.json Here is an example.

Although I don't know how to solve the action=>string step properly. stringer can't help with an external type like input.Action.

mcarpenter622 commented 1 year ago

Thank you!