Make Simutrans speak your language.

Transparent white background in network mode chat window

Started by Ranran, May 07, 2021, 11:47:40 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


Question 1: Why is the chat window background transparent in network mode in default?

Question 2 (probably a bug or old spec remains):
Why is the transparent background color fixed at white?

if(  env_t::networkmode  ) {
set_transparent( env_t::chat_window_transparency, color_idx_to_rgb(COL_WHITE) );

In dark themes, the text color is often light, which makes the text unreadable.

The characters on the tab are almost unreadable.

# Chat window transparency (0=off, 25, 50 75 are possible)
chat_transparency = 75

Thirdly, I wonder something is wrong with the expression of the transparency setting.
transparency = 75 is 25% transparency. So chat_transparency = 75 isn't really very transparent, and chat_transparency = 25 is very transparent.
Does high transparency mean not transparent?
But I don't understand English so it may be wrong. (´・ω・`)


The transparency was demanded by players, because in normal games this window is not open that often and transparent backgrounds did not work then without tricks. However, it clashes with themes with transparent windows. I think the network window settings should only be contained in the themes folder.

Moreover, the transparency settings probably remained from the old implementation (which only had three levels), and then got it wrong.

So maybe put two new entries in theme files like
gui_chat_window_network_transparency = 0...100
gui_chat_window_network_background_color = color value

Please check r9793


Quote from: Ranran on May 07, 2021, 11:47:40 AMDoes high transparency mean not transparent?
Seems wrong to me.
What about renaming *_transparency settings to *_opacity ?
For sure the old name has to be retained, for backward compatibility but should be deprecated as it's missleading.


The new name uses the expected setting (0=opaque, 100=transprent).