Page 1 of 1

Updating localised texts using control bindings on their change

Posted: Tue Feb 12, 2019 7:11 pm
by Muppet9010
At present, it seems if I use a custom-input key in a tooltip there isn't a way to detect when this key is changed so I can recreate the tooltips.

If I have in my locale

Code: Select all

to do stuff press: __CONTROL__my-custom-key__
1: mod has the custom-input default to CONTROL + M
2: on player join server create GUI tooltip using the above locale it shows "COTNROL + M".
2: change my control bindings to be CONTROL + T
3: look at tooltip and it still says CONTROL + M

It would be nice for either the base game to update the localisation (if possible?) or to have a control binding event that I can react to and then recreate my tooltip for that user so it uses the new control binding.

Re: Updating localised texts using control bindings on their change

Posted: Wed Feb 13, 2019 4:32 am
by Rseding91
That's currently how loclization works in the game. If you change controls/language you need to restart before everything is updated.

Due to how locale is used in the game it would be near impossible to make sure anything that used a control in a translation was updated when the control changes without just restarting the game.

Re: Updating localised texts using control bindings on their change

Posted: Wed Feb 13, 2019 12:20 pm
by Muppet9010
Fair enough, seemed worth asking.