RigsOfRods / rigs-of-rods

Main development repository for Rigs of Rods soft-body physics simulator
https://www.rigsofrods.org
GNU General Public License v3.0
995 stars 175 forks source link

Fixed ControlsUI not showing built-in defaults #2967

Closed ohlidalp closed 1 year ago

ohlidalp commented 1 year ago

only entries actually present in 'input.map' were shown, other controls were missing.

If you edit an entry which wasn't present in 'input.map' before, it will be added.

tritonas00 commented 1 year ago

With this, controls panel indeed show all keys but it confuses things. Purpose of controls panel is to show, edit and preserve values in input.map, not hardcoded values.

If those keys are shown with disabled button or something, so its obvious that you can not change them, it makes sense.

ohlidalp commented 1 year ago

@tritonas00 The way you describe it, overriding a default means the user must first manually add the entry to input.map and only then they are allowed to use the editing capability of the Settings UI. This makes no sense to me - I'd expect it to display everything and add modified entries to input.map.

tritonas00 commented 1 year ago

So if i make a change on one of those extra controls it will be preserved in input.map? If yes then its good.

But again we have hardcoded text in game for example save/load:

kk

kk

ohlidalp commented 1 year ago

But again we have hardcoded text in game for example save/load:

Well that's a bug, controls should be displayed using InputEngine functions which follow the config.

So if i make a change on one of those extra controls it will be preserved in input.map? If yes then its good.

I just tested to make sure - yes, the modified defaults are added to input.map.

CuriousMike56 commented 1 year ago

I don't see any problems with this change besides the hardcoded text already mentioned. However I did just notice CHARACTER_RUN (https://github.com/RigsOfRods/rigs-of-rods/blob/master/resources/skeleton/config/input.map#L72) has two keys assigned in input.map which results in the second key name being blank: image This isn't a problem introduced by this PR, but I figured it makes sense for it to get fixed here.

ohlidalp commented 1 year ago

@CuriousMike56 What seems to you like a blank line is actually single row with double vertical size. But yes, it's confusing, so I added small numbers to make it obvious: obrazek I didn't figure any solution to the hardcoded hotkeys in top menubar, but I'd let it pass for now.