Prototype icon indicating copy to clipboard operation
Prototype copied to clipboard

Create Keybinding System

Open pcen opened this issue 3 years ago • 3 comments

Create a system around keybinding instead of checking keycodes directly in game logic.

This will make it easier to modify keybindings in the future or make them customizable.

pcen avatar Mar 28 '22 18:03 pcen

When we implement this, do we want to allow the user to bind multiple keys to the same action? Like, in the current version of Civ 3, x and j both can be used for stack moving units, the arrow+fn and numpad keys can both be used to move units, etc. It may make the implementation of this ticket more difficult but would keep in line with what exists in the game right now.

Sean-Brown avatar Mar 29 '22 23:03 Sean-Brown

In general we want to be as faithful to Civ3 as possible, especially with the UI. So ultimately yes we should allow all the same configurations. And maybe this goes without saying, but look into how this is done with Godot before coding up something yourself.

WildWeazel avatar Mar 30 '22 03:03 WildWeazel

https://docs.godotengine.org/en/3.4/classes/class_inputmap.html#inputmap

pcen avatar Mar 30 '22 04:03 pcen