Driftwood2D / Driftwood

Driftwood 2D Tiling Game Engine and Development Suite
http://tileengine.org/
MIT License
24 stars 1 forks source link

InputManager Contexts #190

Closed seisatsu closed 7 years ago

seisatsu commented 7 years ago

Implement contexts for InputManager, such that each context has a separate set of registered keybinds, and they can be switched between.

Completion of stdlib menus is blocking on this issue.

pmer commented 7 years ago

There are a couple of things this could be but I don't want to guess. :) What is an InputManager context?

seisatsu commented 7 years ago

It's a key to a dictionary containing InputManager's current setup. Change the key, change the setup. So, you can switch the keybinds and callbacks around. For example, menus can create a new context and then hijack the arrow keys.