collinsmith/riiablo

Add function to reset key bindings

Opened this issue · 0 comments

Add console command to reset key bindings to their default values. Default values passed via key creation are not actually preserved -- perhaps it makes sense to preserve them and provide an API to reset them to their default value via some console command.

Preface:
LibGDX decided to change constants around for the keys causing an issue with saved keys. This was fixed by temporarily having com.riiablo.GdxKeyMapper#load(MappedKey) return null, i.e., the initial value is never changed to a loaded one from the preferences, and when the program terminated, the default values were saved instead. I don't expect anyone to know how to do this themselves, so this issue should be solved to protect me from any further LibGDX key const changes.