[Rseding91] [1.1.25] Changing key for confirming window does not change tooltip

This subforum contains all the issues which we already resolved.
Post Reply
Gentil
Inserter
Inserter
Posts: 29
Joined: Mon Jun 10, 2019 1:50 pm
Contact:

[Rseding91] [1.1.25] Changing key for confirming window does not change tooltip

Post 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.
Attachments
Capture.PNG
Capture.PNG (35.2 KiB) Viewed 2223 times

Honktown
Smart Inserter
Smart Inserter
Posts: 1025
Joined: Thu Oct 03, 2019 7:10 am
Contact:

Re: [1.1.25] Changing key for confirming window does not change tooltip

Post 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)
I have mods! I guess!
Link

Daeruun
Inserter
Inserter
Posts: 43
Joined: Thu May 04, 2017 8:37 pm
Contact:

Re: [1.1.25] Changing key for confirming window does not change tooltip

Post 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.

User avatar
Silari
Filter Inserter
Filter Inserter
Posts: 488
Joined: Sat Jan 27, 2018 10:04 pm
Contact:

Re: [1.1.25] Changing key for confirming window does not change tooltip

Post 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.

Daeruun
Inserter
Inserter
Posts: 43
Joined: Thu May 04, 2017 8:37 pm
Contact:

Re: [1.1.25] Changing key for confirming window does not change tooltip

Post 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...

Rseding91
Factorio Staff
Factorio Staff
Posts: 13173
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [1.1.25] Changing key for confirming window does not change tooltip

Post 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.
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Resolved Problems and Bugs”