The International Simutrans Forum

 

Author Topic: Transparent white background in network mode chat window  (Read 860 times)

0 Members and 1 Guest are viewing this topic.

Offline Ranran

  • Devotee
  • *
  • Posts: 1723
  • 今日は兎汁よー
  • Languages: ja
Transparent white background in network mode chat window
« on: May 07, 2021, 11:47:40 AM »
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?
Code: [Select]
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.


Code: [Select]
# 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. (´・ω・`)

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 11060
  • Languages: De,EN,JP
Re: Transparent white background in network mode chat window
« Reply #1 on: May 20, 2021, 02:53:38 AM »
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

Online Sirius

  • Devotee
  • *
  • Posts: 1658
  • Languages: DE, EN
Re: Transparent white background in network mode chat window
« Reply #2 on: May 20, 2021, 01:20:45 PM »
Does 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.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 11060
  • Languages: De,EN,JP
Re: Transparent white background in network mode chat window
« Reply #3 on: May 20, 2021, 01:26:09 PM »
The new name uses the expected setting (0=opaque, 100=transprent).