Page 1 of 1
[Rseding91] [1.1.25] Changing key for confirming window does not change tooltip
Posted: Tue Feb 23, 2021 8:25 pm
by Gentil
Hi,
When you change the default key which is E by another key to close the inventory for example, it doesn't change the key in the little bubble info when you put the mouse on the cross, it still displays the E key.
And also when you put logistical requests and you want to validate with the enter key on the numeric keypad it doesn't work anymore, but in the previous versions it worked without even configuring the key to do this action, I don't know if it's wanted or not.
Re: [1.1.25] Changing key for confirming window does not change tooltip
Posted: Fri Feb 26, 2021 10:09 pm
by Honktown
The first 'issue' is not a bug. The displayed key is not updated until the game is restarted. (related to how a string is localised)
Re: [1.1.25] Changing key for confirming window does not change tooltip
Posted: Tue Mar 02, 2021 7:07 pm
by Daeruun
From a users POV i think that is a bug, Honktown.
The tooltip should be a localized string in the form of {Close (__1__ or __2__)} with parameters added on creation of the GUI.
I do it that way in my mod with tooltips containing icons and in some places names of entities and it works fine.
Re: [1.1.25] Changing key for confirming window does not change tooltip
Posted: Tue Mar 02, 2021 7:41 pm
by Silari
Daeruun wrote: Tue Mar 02, 2021 7:07 pm
From a users POV i think that is a bug, Honktown.
The tooltip should be a localized string in the form of {Close (__1__ or __2__)} with parameters added on creation of the GUI.
I do it that way in my mod with tooltips containing icons and in some places names of entities and it works fine.
It's probably more accurately a "Won't Fix", same as changing hotkey assignments won't update the key in a localized string - you have to load a savegame for it to update. See the response when I reported that issue:
viewtopic.php?p=517901#p517901
It's not that they're not using localization parameters, it's that the game doesn't update the strings.
Re: [1.1.25] Changing key for confirming window does not change tooltip
Posted: Tue Mar 02, 2021 9:13 pm
by Daeruun
I'm curious: What is the benefit of pre-building the strings with the controls?
I'd expect these strings to be parameterized at the time the GUI-element is (re)created.
If I understood correctly, the GUI-elements are destroyed on closing, so at least when rebuilding them, the strings could be filled with the correct parameters...
Re: [1.1.25] Changing key for confirming window does not change tooltip
Posted: Tue Mar 02, 2021 9:46 pm
by Rseding91
Daeruun wrote: Tue Mar 02, 2021 9:13 pm
I'm curious: What is the benefit of pre-building the strings with the controls?
I'd expect these strings to be parameterized at the time the GUI-element is (re)created.
If I understood correctly, the GUI-elements are destroyed on closing, so at least when rebuilding them, the strings could be filled with the correct parameters...
The translation result of any given localised string is stored in that localised string so it doesn't have to do the O(log(N) + O(N)) process of translating the result every time it's shown anywhere. As a result changing things like language and control settings often requires a game restart for them to be updated in-game.