Page 1 of 1

Rich text captures clicks which closed dialogs

Posted: Thu Oct 27, 2022 8:09 pm
by duskwuff
Summary: If the user clicks a UI element in a dialog which closes the dialog, and a message in the chat history contains rich text which is under where the user clicked, the game will behave as if the user had clicked that rich text.

Here's a somewhat contrived test case:
  1. Open your inventory and alt-click an empty slot to start setting a filter.
  2. Control-alt-click the ground to post a location tag to chat.
  3. Click an item in the "Select filter" dialog which overlaps with the rich text for the location. (Depending on screen size and UI scale, you might have to move the dialog to make this happen.)
  4. Notice that the game behaves as if you had clicked the location without the dialog being in the way.
Obviously, this doesn't come up very often in single-player games, but can become more of an issue if mods frequently print messages containing rich text. One example that does this a lot is Logistic Train Network, which uses rich text for the source, destination, and contents of every train it dispatches.

This behavior affects other select-a-thing dialogs as well (like selecting an icon for a map tag, or a signal for a combinator), and may affect other dialogs as well -- I haven't tested this extensively.

Re: Rich text captures clicks which closed dialogs

Posted: Fri Oct 28, 2022 9:04 pm
by atomizer
Can confirm (in 1.1.70), seems to only apply to select-a-thing popups.