jellewie / Unity-Gnorts

Gnorts an RTS unity game
11 stars 7 forks source link

default Keybindings duplicates will not be colored #28

Closed jellewie closed 6 years ago

jellewie commented 6 years ago

Normally duplicate keybindings will be flagged with a color. This does not apply to the Default keybindings. When a user now manually set the keys to the same stuff it will be and this might cause confusion.

jellewie commented 6 years ago

The code also doesn't check on startup. And it doesn't highlight the other button (It's a bit harder to check if a duplicate flag has been cleared)

jellewie commented 6 years ago

Not sure whats the best way to go about this, suggestions are welcome.

I don't want to block users for using multiple keybindings, but I like to let them know about it,

Also it should only mark double ones, so when a double one is getting solved, the color of both needs to change unless it's a triple one... And that is why I leave this one be (for now)

JorisVanEijden commented 6 years ago

How about: when you select a key that's already in use a confirmation dialog asks you if you're sure and if you confirm the other action will be unbound? An example:

jellewie commented 6 years ago

@JorisVanEijden I think that's a fine way to handle the Input of it. But I like the player to be able to set double bindings. (but the option until 'emthy' is good and I will talk about that now)

But what I also image is that a user notice that W is used for something, so the user goes to the menu and checks, sees that the W is for forwards and just leaves, not noteing that it's also used to do something else, and the player might get confused.

While your solution doesn't solve this issue, it does make sure that the player would be notified about the issue, and to make sure that the player should know this in the future

JorisVanEijden commented 6 years ago

If you want to allow the same key for multiple functions you should split the config into "contexts". Like a "build" context for when you have something in-hand And a "combat" context for when you have military units selected ... And a "general" context for all other cases

Then you can have a tab with key settings for each context.

jellewie commented 6 years ago

I think that would be good, but it might be a hard thing to make sure it works correctly and keep it intuitive. This does need to be really well documentared if we do something like this I think

JorisVanEijden commented 6 years ago

If you have examples of duplicate keybindings that make sense then we can devise those contexts.

jellewie commented 6 years ago

Hmm not specific, just didn't want to limit the player too much. I do play games where I need double keybindings but the game doesn't allow it.

But since I can't really think of one for this game yet. I will agree with you and limit the user (since this way it's clearer of the user)